[pstricks] pstricks and psaxes problem

Herbert Voss Herbert.Voss at FU-Berlin.de
Sun Oct 18 10:16:39 CEST 2009


pluton schrieb:

> I'd like to start my x-axis at -0.5 and finish it at 6.5 (in order to
> avoir the first and last bars to lie on the axis-frame. Unfortunately,
> if I try something like:
> 
> \psaxes
> [Dy=0.1,Dx=1,linewidth=0.5pt,axesstyle=frame,ticksize=3pt,tickstyle=inner,Oy=0,Ox=-0.5,labelsep=3pt]

as already said, the number of decimal digits must be the same.
It will be fixed in one of the next updates.

\documentclass{article}
\usepackage{pstricks-add}

\savedata{\mydata}[{
{0,0.5}
{1,0.25}
{2,0.125}
{3,0.0625}
{4,0.0313}
{5,0.0156}
{6,0.0078}}]
\begin{document}

\psset{xunit=0.8cm, yunit=8.33cm}
\begin{pspicture}(-1,0)(7,0.6)
\psaxes[Dy=0.1,Dx=1.0,Ox=-0.5,linewidth=0.5pt,axesstyle=frame,
  ticksize=3pt,tickstyle=inner,labelsep=3pt](-1,0)(7.0,0.6001)
\dataplot[showpoints=true,linewidth=1pt,
  plotstyle=bar,barwidth=0.4cm,
  fillcolor=lightgray,fillstyle=solid]{\mydata}
\end{pspicture}

\end{document}

there is also a PSTricks mailing list, see http://PSTricks.tug.org

Herbert


More information about the PSTricks mailing list