[pstricks] plotting a data series with pstricks & psplot

Andrew Enterline ajenter at gmail.com
Sat Mar 25 03:54:05 CET 2006


herbert,

i am very grateful for your assistance; it worked like a charm. my strength
appears to lie in beautifying figures, rather than figuring out grid
conversions, but your example should get me started toward cracking the
latter mystery.

thanks,
andrew

On 3/24/06, Herbert Voss <LaTeX at zedat.fu-berlin.de> wrote:
>
> Andrew Enterline wrote:
>
> > however, i am experiencing difficulty wrapping my brain around getting
> > my data series values to match up with my axis labels.  more precisely,
> > i'm having difficulty translating my data series into the proper plot
> > coordinates.  i am wondering if anybody has a nifty way to translate
> > data series values into the appropriate coordinates in a plot. below,
> > i'm pasting an illustration of my problem. the axis labels are correct,
> > but the line plotted is incorrect.
>
> \documentclass[12pt]{article}
> \usepackage{pstricks}
> \usepackage{pst-plot}
>
> \begin{document}
> \def\data{
>   1 0.03  2 0.04  4 0.05  6 0.06
>   8 0.07 10 0.08 12 0.08 14 0.09
> 16 0.09 18 0.1  20 0.1  22 0.11
> 24 0.11 26 0.12 28 0.12 30 0.12
> 32 0.13 34 0.13 36 0.13 38 0.14
> 40 0.14 42 0.14 44 0.15 46 0.15
> 48 0.15 50 0.15}
>
> \psset{xunit=0.2, yunit=50}% to get 10cm x 10cm with the data values
> \begin{pspicture}(0,0)(50,0.2)
>    \psaxes[tickstyle=bottom,Dx=5,Dy=.02,dx=1cm,dy=1cm]{->}(0,0)(50,0.2)
>    \listplot[linecolor=red]{\data}%
> \end{pspicture}
>
> \end{document}
>
>
> Herbert
>
>
> _______________________________________________
> pstricks mailing list
> pstricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20060324/1457bb12/attachment.html 


More information about the PSTricks mailing list