[pstricks] Horizontal displacement in points of a graphic

Herbert Voss LaTeX at zedat.fu-berlin.de
Sat Sep 2 08:01:46 CEST 2006


Rafael Castro Triguero wrote:

> I would like to know how can I delete only the 0 in the horizontal axes and why the points have a little displacement in the horizontal axe.

put all non drawing macros outside the environment
or at least put a % at the end. Otherwise you'll
get trailing spaces.

Herbert

\savedata{\malladoA}[{{1, 6.1}, {2, 15.3}, {3, 15.7}, {4, 20.1}}}]
\savedata{\malladoB}[{{1, 4}, {2, 8.1}, {3, 12}, {4, 7.5}}}]
\savedata{\malladoC}[{{1, 2.9}, {2, 5.3}, {3, 7.8}, {4, 5.2}}}]
\savedata{\malladoD}[{{1, 2.3}, {2, 3.9}, {3, 5.6}, {4, 4}}}]
\def\pshlabel#1{\footnotesize #1}
\def\psvlabel#1{\footnotesize #1}

\begin{pspicture}(-3.5,-1)(5.5,4.5)
   \psset{yunit=0.2cm}%
   \listplot[showpoints=true,dotstyle=*,linecolor=green]{\malladoA}
   \listplot[showpoints=true,dotstyle=*,linecolor=red]{\malladoB}
   \listplot[showpoints=true,dotstyle=*,linecolor=blue]{\malladoC}
   \listplot[showpoints=true,dotstyle=*,linecolor=yellow]{\malladoD}
   \uput[0](-2.5,14){\footnotesize mallado A}
   \psline[linecolor=green](-3.5,14)(-3,14)
   \uput[0](-2.5,10){\footnotesize mallado B}
   \psline[linecolor=red](-3.5,10)(-3,10)
   \uput[0](-2.5,6){\footnotesize mallado C}
   \psline[linecolor=blue](-3.5,6)(-3,6)
   \uput[0](-2.5,2){\footnotesize mallado D}
   \psline[linecolor=yellow](-3.5,2)(-3,2)
   \psaxes[showorigin=false,ticksize=1pt,Dx=1,Dy=2]{-}(0,0)(0,0)(5,20)
   \uput[180](0,0){\footnotesize 0}
   \uput{0.5cm}[-90](5,0){\footnotesize frecuencia}
   \uput{0.6cm}[180](0,20){\footnotesize \% error}
\end{pspicture}





More information about the PSTricks mailing list