Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8919349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:59:55+00:00 2026-06-15T05:59:55+00:00

Short question : How do I display the _ (underscore) character in a title

  • 0

Short question:
How do I display the _ (underscore) character in a title in gnuplot that is assigned from a variable name in gnuplot?

Details:
I have something like the following code:

items = "foo_abc foo_bcd bar_def"
do for [item in items] {
  set title item
  set output item.eps
  plot item."-input.txt" using 1:2 title item with linespoints
}

This works fine with gnuplot except that the title get changed from foo_abc to fooabc. I don’t know if I want to use an escape character because I don’t want that to be in the file name. I’ve tried a couple of different options with single vs. double quotes but I haven’t found what I need yet.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T05:59:57+00:00Added an answer on June 15, 2026 at 5:59 am

    If you are using the enhanced eps terminal, that is the reason you need to escape the underscore in the first place. There was another related question today which explains the issue a bit. When you set the terminal, try:

    set terminal postscript noenhanced <whatever else here...>
    

    That works for me (Arch linux, gnuplot 4.7.0). If the enhanced terminal is essential, below is a partial solution I found. The assumption is that the underscore always appears in the same place in the string.

    set terminal postscript enhanced
    items = 'foo\_abc foo\_bcd bar\_def'
    do for [item in items] {
      set output item[1:3].item[5:*].'.eps'
      set title item
      plot sin(x)
    }
    

    This way you can escape the underscore and not have the \ appear in the filename. Note the use of single quotes for the ‘items’ string; see the previously linked question for details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Short question. I have two models: class Author(models.Model): name = models.CharField(max_length=250) class Book(models.Model): title
From this old question: What's the difference between "bundle display name" and "bundle name"
Short question , I have added a file field from content types ( I
Short question: Is the parent of an entity group included in that entity group
Short question: I'm trying to make that in a given page (uses tabs) back
Short version of question: see title Long version of question: I've used jquery's show()
Short Question I have a 50dip by 40dip button in my Android XML layout.
I have a short jsp page that tries to establish the connection to the
Short Question: If I have a Silverlight application built in SL3 can I detect
I'm pretty new to this, and I have a question that is probably pretty

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.