Menu

#1321 epspdflatex minus symbol on axis numeric labels

closed-works-for-me
nobody
None
5
2015-03-23
2014-01-17
Ryo
No

Hi,

This is just a wish, not a bug report. It would be nice if the numeric labels on axes used minus symbols for negative numbers with the epslatex driver.

Currently, I edit the LaTeX file produced by the driver and to replace, say, "-600" to "$-$600". It would be nice if this were done by the driver.

Regards,
Ryo

Discussion

  • Bastian Märkisch

    • labels: wish -->
    • status: open --> closed-works-for-me
     
  • Bastian Märkisch

    The correct tracker for this would have been "Feature Requests". But you can already easily achieve what you want with

    set format x "$%g$"
    set format y "$%g$"
    

    The current development version includes the math mode marks $$ already in the default format for LaTeX terminals.

     
    • Ryo

      Ryo - 2014-01-18

      The correct tracker for this would have been "Feature Requests".
      But you can already easily achieve what you want with

      set format x "$%g$"
      set format y "$%g$"

      Thank you for the solution!!

      The following is a little discussion about this solution,
      which might be useful for some people in the future.

      In addition to the "$%g$" setting, I've found that
      switching to a sans-serif math font gives a better result:

      set terminal epslatex . . . font "phv,12" \
      header "\usepackage{newtxmath}"

      For numeric axis labels, a sans-serif font is usually better
      (and that's why most plotting programs use a Helvetica-like font)
      and LaTeX's default math font isn't quite suitable for axis numeric
      labels. For that reason, I initially didn't like the "$%g$" solution,
      which results in "$-600$" rather than "$-$600". (Note that I switch
      to a san-serif font, phv, but math environments use a different
      font.)

      So, changing the math font combined with "$%g$" is probably the
      best solution so far.

      Ryo

       

Log in to post a comment.

MongoDB Logo MongoDB