1

I would like to slightly modify this pspicture:

enter image description here

Each of the crosses (as well as the numbers, although that is not so important) should be centred at the centre of their each squares. As you can see in the example below, I have tried both using \rputand uput, but neither seems to work. One provides correctly the x-coordinate, while the other gets correctly only the y-coordinate.

The mwe below uses the answer to this question. Although there is some imporvement, some crosses are still off:

enter image description here

How could I achieve the desire result?

Thank you in advance.

PS: Any modifications regarding the cells with the numbers is also very welcome.

Here is the mwe:

\documentclass{article}

\usepackage{mathtools}
\usepackage[dvipsnames]{xcolor}
\usepackage[dvipsnames]{pstricks}
\usepackage{pst-solides3d}
\usepackage{pst-all}



\begin{document}

\begin{pspicture}(-6,-6)(6,6)
%\psset{unit = 1}

\psaxes[linewidth=.4pt,linecolor=gray,showorigin=false,labels=none,ticks=none]{->}(-5,-5)(-5.5,-5.5)(5.5,5.5)[$u$,0][$v$,90]
\psaxes[linewidth=0pt,linecolor=gray,dx=2,Ox=0]{-}(-4,-5)(-4,-5)(4,-5)
\psaxes[linewidth=0pt,linecolor=gray,dy=2,Oy=0]{-}(-5,-4)(-5,-4)(-5,4)

   
%GRID
\psline{-}(-5,-5)(5,-5)
\psline{-}(-5,-3)(5,-3)
\psline{-}(-5,-1)(5,-1)
\psline{-}(-5,1)(5,1)
\psline{-}(-5,3)(5,3)
\psline{-}(-5,5)(5,5)
\psline{-}(-5,-5)(-5,5)
\psline{-}(-3,-5)(-3,5)
\psline{-}(-1,-5)(-1,5)
\psline{-}(1,-5)(1,5)
\psline{-}(3,-5)(3,5)
\psline{-}(5,-5)(5,5)

%LABELS
%zeroth row
\rput[B](-4,-4){$\substack{(0,0)\\ \! \\(4,2)}$}
\rput[B](-2,-4){$\substack{(1,0)\\ \! \\(3,2)}$}
\rput[B](0,-4){$\substack{(2,0)\\ \! \\(2,2)}$}
\rput[B](2,-4){$\bigtimes$}
\rput[B](4,-4){$\bigtimes$}
%first row
\rput[B](-4,-2){$\bigtimes$}
\rput[B](-2,-2){$\substack{(1,1)\\ \! \\(3,1)}$}
\rput[B](0,-2){$\substack{(2,1)\\ \! \\(2,1)}$}
\rput[B](2,-2){$\substack{(1,0)\\ \! \\(3,1)}$}
\rput[B](4,-2){$\bigtimes$}
%second row
\rput[B](-4,0){$\bigtimes$}
\uput[0](-4,0){$\bigtimes$}
\rput[B](-2,0){$\bigtimes$}
\rput[B](0,0){$\substack{(2,0)\\ \! \\(2,2)}$}
\rput[B](2,0){$\substack{(1,0)\\ \! \\(3,2)}$}
\rput[B]{0}(4,0){$\substack{(0,0)\\ \! \\(4,2)}$}
%third row
\rput[B](2,2){$\bigtimes$}
\rput[B](4,2){$\bigtimes$}
%fourth row
\rput[B](4,4){$\bigtimes$}


\psline{-}(-4,-2)(-4,0)
\psline{-}(-4,0)(-2,0)
\psline{-}(2,-4)(4,-4)
\psline{-}(4,-4)(4,-2)


\end{pspicture}



\end{document}

1 Answer 1

0

instead of \rput[B](-4,0){$\bigtimes$} use

\psdot[dotstyle=x,dotscale=3](-4,0)
1
  • Oh, sorry. I thought the code was \rput(! \pstnodescale\space -4 0){$\bigtimes$}. Anyway, your solution works perfectly. Thank you! (I can't upvote yet because of my low reputation.)
    – Javi
    Aug 24, 2023 at 11:15

You must log in to answer this question.

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