The objective is to get fractional labels (not in decimal) for both vertical and horizontal axes.

In my experience, non-trigonometric labels are written in decimals and trigonometric labels can be written in fractional via trigLabels and trigLabelBase. I attempted to abuse these keys to get fractional non-trigonometric by using \let\pi=\relax, but it causes a problem where

  • \pi/n becomes /n (that should be 1/n),

  • -\pi/n becomes -/n (that should be -1/n),

  • -\pi becomes - (that should be -1),

  • \pi becomes <empty> (that should be 1) where <empty> stands for empty .

My question, what is the best trick to convert every \pi to relax but prevent the problems from happening?






enter image description here

More general case

Sometimes I need to change \pi to \sqrt{2}, for example. I tried with


but it does not compile.


The version 1.71 from http://texnik.dante.de/tex/generic/pst-plot/ knows fractionLabel:



However, there is a spurious space which needs some more investigation.

enter image description here

  • Sorry, is it possible to change \pi with e, \sqrt{m}, etc such that we can have \frac{e}{n}, \frac{\sqrt{m}}{n}, etc where n is the fractionLabelBase? Aug 24 '14 at 9:33
  • 1
    for example: xlabelFactor=\sqrt{2} or \def\pi{e}
    – user2478
    Aug 24 '14 at 9:38
  • Sorry. Using xlabelFactor makes the factor appear on the right of the fractional labels rather than in the numerator of the fractional labels. As a result, there are some "oddities" such as -1\sqrt{2} and 1\sqrt{2}. It will be better if we can change \pi in the numerator with \sqrt{2}, for example. Aug 24 '14 at 9:49
  • 1
    \def\pi{\sqrt{2}} for example
    – user2478
    Aug 24 '14 at 9:57
  • The update of pst-plot was done on August 24 but up to now it has not been propagated to TeXLive mirrors. A weird thing happened: pst-poly updated on August 28 has been propagated to TeXLive mirrors. Sep 1 '14 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.