[pstricks] listplot
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Sun Jul 2 08:02:59 CEST 2017
Poul Riis schrieb:
> Graphics with PSTricks <pstricks at tug.org> writes:
>>give a _complete_ example!
> Here is one (data file attached):
>
\documentclass{article}
\usepackage[dvips,x11names]{pstricks}
\usepackage{pst-plot}
\makeatletter
\def\psbar at iii{%
newpath
n 1 sub {
/Yval exch def /Xval exch def
2 copy /YNext exch def Xval sub /DX exch def
Xval 0 moveto % Start Point
0 YNext rlineto % relative move
DX 0 rlineto
0 YNext neg rlineto
DX neg 0 rlineto
} repeat
}%
\makeatother
\thispagestyle{empty}
\begin{document}
\readdata{\data}{../Downloads/simon.dat}%%%% my path
\psset{xAxisLabel=Time (minutes),
yAxisLabel=Load (W),xAxisLabelPos={c,-10},yAxisLabelPos={-5,c}}%
\begin{psgraph}[axesstyle=frame,xticksize=0 110,yticksize=0
100,Dx=10,Dy=10,xsubticks=5,subticksize=1](0,0)(100,110){15cm}{11cm}
\listplot[linecolor=Red1,fillcolor=Cornsilk1,fillstyle=solid,
linewidth=0.1pt,plotstyle=bar,barwidth=0.4]{\data}
\listplot[linecolor=Blue1, linewidth=2pt]{\data}
\psline[arrows=->](0,0)(100,0)
\psline[arrows=->](0,0)(0,110)
\end{psgraph}
\end{document}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 5.png
Type: image/png
Size: 105779 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20170702/02304235/attachment-0001.png>
More information about the PSTricks
mailing list