Consider the following example:




  xunit = 0.05,
  yunit = 0.003,
  % Axes
    dx = 20,
    dy = 250,
    labels = none,
    ticklinestyle = dotted,
    tickwidth = 0.5pt,
    xticksize = 0 2250,
    yticksize = 0 200
    dx = 20,
    Dx = 20,
    dy = 250,
    Dy = 250
  % Functions.
  \psplot[linecolor = red]{0}{200}{1.75*x+500}
  \psplot[linecolor = blue]{0}{200}{10*x}



What is the 'correct'/'best' way to add both a grid with dotted lines and solid tick marks to a graph using pst-plot? As can be seen in the example above, I have done it by drawing two coordinate systems, but is there a simpler way of getting the same?

  • You could use \psgrid, bit AFAIKS that would bring you back to where you started from. But as there are now different options to generate tics and grid, I can't see a 'better' way. – Christoph Sep 2 '13 at 13:10
  • Okay, thank you. (Indeed, it would be going back to start (and not using an advice from @Herbert on PSTricks).) – Svend Tveskæg Sep 2 '13 at 13:16
  • I really don't understand this. When should I use \psgrid and when not? – Svend Tveskæg Sep 2 '13 at 20:35
  • @SvendTveskæg Depends ;). The \psgrid will have different dot spacing in x and y-direction because you have different units. The \psaxes has equals dot spacing in both directions. – Christoph Sep 3 '13 at 8:19
  • @Christoph Okay. Thank you for the explanation. – Svend Tveskæg Sep 3 '13 at 8:31
  • @SvendTveskæg: You asked for an alternative to \psaxes. There is no "best way". It depends to your axes – user2478 Sep 3 '13 at 9:32

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.