2

Consider the following example:

\documentclass{article}

\usepackage{pst-plot}

\begin{document}

\psset{
  xunit = 0.05,
  yunit = 0.003,
  algebraic
}
\begin{pspicture}(-17,-140)(213,2540)
  % Axes
  \psaxes[
    dx = 20,
    dy = 250,
    labels = none,
    ticklinestyle = dotted,
    tickwidth = 0.5pt,
    xticksize = 0 2250,
    yticksize = 0 200
  ]{->}(0,0)(-4,-60)(210,2400)[$x$,0][$y$,90]
  \psaxes[
    dx = 20,
    Dx = 20,
    dy = 250,
    Dy = 250
  ](0,0)(-4,-60)(210,2400)
  % Functions.
  \psplot[linecolor = red]{0}{200}{1.75*x+500}
  \rput(190,700){$y$}
  \psplot[linecolor = blue]{0}{200}{10*x}
  \rput(190,2030){$z$}
\end{pspicture}

\end{document}

output

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?

2
  • 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, 2013 at 13:10
  • Okay, thank you. (Indeed, it would be going back to start (and not using an advice from @Herbert on PSTricks).) Sep 2, 2013 at 13:16

1 Answer 1

1
{\psset{xunit=20,yunit=250}
      
  \psgrid[subgriddiv=0,griddots=10,gridlabels=0pt](0,0)(10,9)%
    
}
4
  • I really don't understand this. When should I use \psgrid and when not? Sep 2, 2013 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, 2013 at 8:19
  • @Christoph Okay. Thank you for the explanation. Sep 3, 2013 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, 2013 at 9:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .