Skip to main content
deleted 2 characters in body
Source Link
Svend Tveskæg
  • 32.2k
  • 18
  • 84
  • 200

A PSTricks solution:

\documentclass{article} \usepackage{pst-plot} \begin{document} % parameter \def\size{5} % positivenatural integernumber \begin{pspicture}(-\size,-\size)(\size.57,\size.62)% found manually \multido{\iA = -\size+1}{\numexpr2*\size+1}{% \multido{\iB = -\size+1}{\numexpr2*\size+1}{% \psset{linewidth = 0.5\pslinewidth, linestyle = dashed, linecolor = gray!50} \psline(-\size,\iA)(\size,\iA) \psline(\iB,-\size)(\iB,\size)}} \psaxes[labels = none]{->}(0,0)(-\size,-\size)(\size.21,\size.21)[$x$,0][$y$,90] \end{pspicture} \end{document} 

output

All you have to do is choose the value of \size and the drawing will be adjusted accordingly.

I've drawn the grid manually since pstricks-add's function for this makes it look wierd, I think.

A PSTricks solution:

\documentclass{article} \usepackage{pst-plot} \begin{document} % parameter \def\size{5} % positive integer \begin{pspicture}(-\size,-\size)(\size.57,\size.62)% found manually \multido{\iA = -\size+1}{\numexpr2*\size+1}{% \multido{\iB = -\size+1}{\numexpr2*\size+1}{% \psset{linewidth = 0.5\pslinewidth, linestyle = dashed, linecolor = gray!50} \psline(-\size,\iA)(\size,\iA) \psline(\iB,-\size)(\iB,\size)}} \psaxes[labels = none]{->}(0,0)(-\size,-\size)(\size.21,\size.21)[$x$,0][$y$,90] \end{pspicture} \end{document} 

output

All you have to do is choose the value of \size and the drawing will be adjusted accordingly.

I've drawn the grid manually since pstricks-add's function for this makes it look wierd, I think.

A PSTricks solution:

\documentclass{article} \usepackage{pst-plot} \begin{document} % parameter \def\size{5} % natural number \begin{pspicture}(-\size,-\size)(\size.57,\size.62)% found manually \multido{\iA = -\size+1}{\numexpr2*\size+1}{% \multido{\iB = -\size+1}{\numexpr2*\size+1}{% \psset{linewidth = 0.5\pslinewidth, linestyle = dashed, linecolor = gray!50} \psline(-\size,\iA)(\size,\iA) \psline(\iB,-\size)(\iB,\size)}} \psaxes[labels = none]{->}(0,0)(-\size,-\size)(\size.21,\size.21)[$x$,0][$y$,90] \end{pspicture} \end{document} 

output

All you have to do is choose the value of \size and the drawing will be adjusted accordingly.

I've drawn the grid manually since pstricks-add's function for this makes it look wierd, I think.

added 19 characters in body
Source Link
Svend Tveskæg
  • 32.2k
  • 18
  • 84
  • 200

A PSTricks solution:

\documentclass{article} \usepackage{pst-plot} \begin{document} % parameter \def\size{5} % positive integer \begin{pspicture}(-\size,-\size)(\size.57,\size.62)% found manually \multido{\iA = -\size+1}{\numexpr2*\size+1}{% \multido{\iB = -\size+1}{\numexpr2*\size+1}{% \psset{linewidth = 0.5\pslinewidth, linestyle = dashed, linecolor = gray!50} \psline(-\size,\iA)(\size,\iA) \psline(\iB,-\size)(\iB,\size)}} \psaxes[labels = none]{->}(0,0)(-\size,-\size)(\size.21,\size.21)[$x$,0][$y$,90] \end{pspicture} \end{document} 

output

All you have to do is choose the value of \size and the drawing will be adjusted accordingly.

I've drawn the grid manually since pstricks-add's function for this makes it look wierd, I think.

A PSTricks solution:

\documentclass{article} \usepackage{pst-plot} \begin{document} % parameter \def\size{5} \begin{pspicture}(-\size,-\size)(\size.57,\size.62)% found manually \multido{\iA = -\size+1}{\numexpr2*\size+1}{% \multido{\iB = -\size+1}{\numexpr2*\size+1}{% \psset{linewidth = 0.5\pslinewidth, linestyle = dashed, linecolor = gray!50} \psline(-\size,\iA)(\size,\iA) \psline(\iB,-\size)(\iB,\size)}} \psaxes[labels = none]{->}(0,0)(-\size,-\size)(\size.21,\size.21)[$x$,0][$y$,90] \end{pspicture} \end{document} 

output

All you have to do is choose the value of \size and the drawing will be adjusted accordingly.

I've drawn the grid manually since pstricks-add's function for this makes it look wierd, I think.

A PSTricks solution:

\documentclass{article} \usepackage{pst-plot} \begin{document} % parameter \def\size{5} % positive integer \begin{pspicture}(-\size,-\size)(\size.57,\size.62)% found manually \multido{\iA = -\size+1}{\numexpr2*\size+1}{% \multido{\iB = -\size+1}{\numexpr2*\size+1}{% \psset{linewidth = 0.5\pslinewidth, linestyle = dashed, linecolor = gray!50} \psline(-\size,\iA)(\size,\iA) \psline(\iB,-\size)(\iB,\size)}} \psaxes[labels = none]{->}(0,0)(-\size,-\size)(\size.21,\size.21)[$x$,0][$y$,90] \end{pspicture} \end{document} 

output

All you have to do is choose the value of \size and the drawing will be adjusted accordingly.

I've drawn the grid manually since pstricks-add's function for this makes it look wierd, I think.

added 2 characters in body
Source Link
Svend Tveskæg
  • 32.2k
  • 18
  • 84
  • 200

A PSTricks solution:

\documentclass{article} \usepackage{pstrickspst-addplot} \begin{document} % parameter \def\size{5} \begin{pspicture}(-\size,-\size)(\size.57,\size.62)% found manually \multido{\iA = -\size+1}{\numexpr2*\size+1\relax\numexpr2*\size+1}{% \multido{\iB = -\size+1}{\numexpr2*\size+1\relax\numexpr2*\size+1}{% \psset{linewidth = 0.5\pslinewidth, linestyle = dashed, linecolor = gray!50} \psline(-\size,\iA)(\size,\iA) \psline(\iB,-\size)(\iB,\size)}} \psaxes[labels = none]{->}(0,0)(-\size,-\size)(\size.21,\size.21)[$x$,0][$y$,90] \end{pspicture} \end{document} 

output

All you have to do is choose the value of \size and the drawing will be adjusted accordingly.

I've drawn the grid manually since pstricks-add's function for this makes it look wierd, I think.

A PSTricks solution:

\documentclass{article} \usepackage{pstricks-add} \begin{document} % parameter \def\size{5} \begin{pspicture}(-\size,-\size)(\size.57,\size.62)% found manually \multido{\iA = -\size+1}{\numexpr2*\size+1\relax}{ \multido{\iB = -\size+1}{\numexpr2*\size+1\relax}{ \psset{linewidth = 0.5\pslinewidth, linestyle = dashed, linecolor = gray!50} \psline(-\size,\iA)(\size,\iA) \psline(\iB,-\size)(\iB,\size)}} \psaxes[labels = none]{->}(0,0)(-\size,-\size)(\size.21,\size.21)[$x$,0][$y$,90] \end{pspicture} \end{document} 

output

All you have to do is choose the value of \size and the drawing will be adjusted accordingly.

I've drawn the grid manually since pstricks-add's function for this makes it look wierd, I think.

A PSTricks solution:

\documentclass{article} \usepackage{pst-plot} \begin{document} % parameter \def\size{5} \begin{pspicture}(-\size,-\size)(\size.57,\size.62)% found manually \multido{\iA = -\size+1}{\numexpr2*\size+1}{% \multido{\iB = -\size+1}{\numexpr2*\size+1}{% \psset{linewidth = 0.5\pslinewidth, linestyle = dashed, linecolor = gray!50} \psline(-\size,\iA)(\size,\iA) \psline(\iB,-\size)(\iB,\size)}} \psaxes[labels = none]{->}(0,0)(-\size,-\size)(\size.21,\size.21)[$x$,0][$y$,90] \end{pspicture} \end{document} 

output

All you have to do is choose the value of \size and the drawing will be adjusted accordingly.

I've drawn the grid manually since pstricks-add's function for this makes it look wierd, I think.

added 240 characters in body
Source Link
Svend Tveskæg
  • 32.2k
  • 18
  • 84
  • 200
Loading
added 231 characters in body
Source Link
Svend Tveskæg
  • 32.2k
  • 18
  • 84
  • 200
Loading
Source Link
Svend Tveskæg
  • 32.2k
  • 18
  • 84
  • 200
Loading