6

I don't want to use \psaxes, \psgrid, or manually recreate my own grid with multido, etc.

I just want to reuse the available grid of pspicture. Is there any option to change Dx and Dy such that the grid labels can be multiple of 5, for example, instead of 1?

\documentclass[pstricks,border=12pt,12pt]{standalone}
\psset{unit=5mm}
\newpsstyle{gridstyle}
{
    gridlabels=8pt,
    gridfont=Arial,
    %   
    gridcolor=red,
    subgridcolor=gray,
    %
    subgriddiv=5,
    %
    gridwidth=.8pt,
    subgridwidth=.4pt,
    %
    griddots=10,
    subgriddots=5,
}
\begin{document}
\begin{pspicture}[showgrid](25,25)

\end{pspicture}
\end{document}

enter image description here

Bonus: how to slightly shift the horizontal labels to the left and vertical labels downward?

Display Name
  • 46,933

1 Answers1

2

With the version 2.99 (available tomorrow)

\documentclass[pstricks,border=5mm,12pt]{standalone}
\psset{unit=5mm}
\newpsstyle{gridstyle}{gridlabels=8pt,gridfont=Helvetica,gridcolor=red,subgridcolor=gray,subgriddiv=5,
   gridwidth=.8pt, subgridwidth=.4pt,griddots=10,subgriddots=5,
   griddx=5,
   griddy=2,
}
\begin{document}
\begin{pspicture}[showgrid](25,25)
\end{pspicture}
\end{document}

enter image description here

user187802
  • 16,850