#327 minus symbols on axis labels


I wish gnuplot printed minus symbols on the axes in place of hyphens. Currently, negative numbers are printed with hyphens; e.g., "-100", which is not beautiful and looks unprofessional. If it's not easy to implement for all terminals, at least it would be nice to see an extension to "set format" that would allow the user to use the proper minus symbol for the PostScript terminal. For example,

set format x minussymbol "{/Symbol \OOO}"

where \OOO is the code of the minus symbol. There may be a better solution.


  • Ethan Merritt

    Ethan Merritt - 2012-05-18
    • status: open --> closed-rejected
  • Ethan Merritt

    Ethan Merritt - 2012-05-18

    Formatting is done using the standard C library routines, so I think anything of this sort would have to be done at the level of clib.

  • Ethan Merritt

    Ethan Merritt - 2012-06-07

    Here is a PostScript-specific answer to your quest.

    gnuplot> set encoding iso_8859_15 # or some other encoding
    gnuplot> set term post font "Times"
    gnuplot> set output 'whatever.ps'
    ... plot commands

    In the Prolog of your PostScript output file whatever.ps is
    an encoding table that looks like this:

    /ISOLatin15Encoding [
    ] def
    /Times reencodeISO15 def

    Edit the 6th line of this encoding table to replace "minus" with "endash".

    All the minus signs in your PostScript file will now be printed using
    en dash rather than hyphen/minus. If you want to make this change
    permanently, you can edit the master copy of the encoding files in
    the shared directory /usr/local/share/gnuplot/VERSION/PostScript/

    Let me know if you like it.
    We could add it to the FAQ if you think it's generally useful.

  • Ethan Merritt

    Ethan Merritt - 2012-06-07
    • status: closed-rejected --> open-rejected
  • Ethan Merritt

    Ethan Merritt - 2012-06-29

    Offline discussion established that "set encoding ..." already provides the requested remapping for PostScript output.

  • Ethan Merritt

    Ethan Merritt - 2012-06-29
    • status: open-rejected --> closed-rejected

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks