[pstricks] scaling data passed to the \psBoxplot macro
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Fri Feb 28 10:16:17 CET 2014
Am 28.02.2014 05:48, schrieb $naKe:
> when plotting data that lies in a very narrow range, I understand that
> it is better to rescale them using \pstScalePoints. However, this macro
> is only valid for the \listplot macro. Is there any similar way to deal
> with the \psBoxplot macro?
it is easier if you rescale the axes to 1x10. With \psset{yunit=0.5}
you'll get it at a height of 5cm.
You have a range from 0.993 to 0.994 which is the same as a
range from 0 to 10 if you do
0.993 sub 10000 mul with each value
That can be pass to the macro via the optional argument postAction.
It needs the latest pstricks-add.tex from
http://texnik.dante.de/tex/generic/pstricks-add/
I'll upload it in the next few days.
\documentclass{minimal}
\usepackage{pstricks-add}
\begin{document}
% the following is working fine
\savedata{\data}[0.936 0.937 0.934 0.936 0.937 0.938 0.934 0.933
0.932 0.935]
\def\ymin{0.930}
\def\ymax{0.940}
\def\Dy{.005}
\begin{psgraph}[Oy=\ymin,Dy=\Dy](0,\ymin)(1,\ymax){1cm}{5cm}
\rput(.5,0){\psBoxplot[barwidth=.5\psxunit]{\data}}
\end{psgraph}
%
\psset{yunit=0.5}
\begin{pspicture}(-2,-1)(2,11)
\savedata{\data}[0.9936 0.9937 0.9934 0.9936 0.9937 0.9938 0.9934
0.9933 0.9930 0.9935]
\psaxes[Oy=0.9930,Dy=0.0005,dy=2cm](0,0)(1,10)
\rput(.5,0){\psBoxplot[barwidth=.5\psxunit,postAction=0.993 sub
10000 mul]{\data}}
\end{pspicture}
\end{document}
it is easier not to use psgraph because you need only a simple axis.
Herbert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xyz.png
Type: image/png
Size: 6812 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20140228/c70e1caf/attachment.png>
More information about the PSTricks
mailing list