2

If I want to devide a grid into subgrids using PSTricks, I use the command \psgrid with the option subgriddiv=<integer>. This, however, sets the number of subgrids to the same on both axis; is it possible to get a different subdivision for each axis?

2
  • use \psaxes instead of \psgrid – user2478 Sep 1 '13 at 7:53
  • @Herbert Can you maybe give an example? It is probably something trivial but I cannot figure out how to use \psaxes to get what I want. – Svend Tveskæg Sep 1 '13 at 9:54
3
\documentclass{article}
\usepackage{pst-plot}
\begin{document}
\begin{pspicture}(0,0)(5,7)
\psaxes[xsubticks=5, xticksize=0 7, xsubticksize=1,
        ysubticks=2, yticksize=0 5, ysubticksize=1,
        subtickcolor=black!30](5,7)
\end{pspicture} 
\end{document}

enter image description here

7
  • I didn't knew of those options at all. Great, Herbert! – Svend Tveskæg Sep 1 '13 at 10:05
  • How do I set the linestyle for the grid and subgrid? I cannot find anything in the pstricks-add manual. – Svend Tveskæg Sep 1 '13 at 10:38
  • Specifically, I would like to make the grid and subgrid lines dotted. – Svend Tveskæg Sep 1 '13 at 12:18
  • there are a lot of examples in the documentation. – user2478 Sep 1 '13 at 12:37
  • I cannot find any examples of this, unfortunately. (Can you give a page numbers or something?) I have tried to envoke \psaxes[...,linestyle=dotted,...](x,y) but then the axes themselves become dotted and the grid disappears. – Svend Tveskæg Sep 1 '13 at 12:48

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.