3

With the code shown below, the grid is on the foreground (one can see red lines on the labels...):

\documentclass[11pt]{article} 

\usepackage[letterpaper, textwidth=7in, textheight=9.5in]{geometry}

\usepackage{amsfonts,amsmath,amssymb}

\usepackage{pstricks}
\usepackage{pst-plot}

\begin{document}

\begin{pspicture}(-5,-5)(5,5)
\psaxes[Ox=0,Oy=0,Dx=1,Dy=1,showorigin=false,tickstyle=top]{->}(0,0)(-5.5,-5.5)(5.5,5.5)
\psgrid[gridcolor=red,gridwidth=0.75pt,gridlabels=0,subgriddiv=5,subgridwidth=0.25pt](0,0)(-5,-5)(5,5)
\end{pspicture}

\end{document}

enter image description here

Is it possible to have the axes instead of the grid in the foreground?

  • 1
    Just swap your two lines of code... (Draw the grid before the axes.) – Paul Gessler Aug 12 '14 at 2:02
2

Well as Paul Gessler said it only takes to swap the 8 and 9 lines. Like this

\documentclass[11pt]{article} 
\usepackage[letterpaper, textwidth=7in, textheight=9.5in]{geometry}
\usepackage{amsfonts,amsmath,amssymb}
\usepackage{pstricks}
\usepackage{pst-plot}

\begin{document}
\begin{pspicture}(-5,-5)(5,5)
\psgrid[gridcolor=red,gridwidth=0.75pt,gridlabels=0,subgriddiv=5,subgridwidth=0.25pt](0,0)(-5,-5)(5,5)
\psaxes[Ox=0,Oy=0,Dx=1,Dy=1,showorigin=false,tickstyle=top]{->}(0,0)(-5.5,-5.5)(5.5,5.5)
\end{pspicture}
\end{document}

And the result is

Axes on the Foreground

| improve this answer | |

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.