[pstricks] PSTricks Digest, Vol 142, Issue 9

Herbert Voss Herbert.Voss at FU-Berlin.DE
Wed Nov 26 17:56:32 CET 2014


Am 26.11.2014 um 13:52 schrieb cyrille piatecki:

> it is
> 
> x y1 y2
> 
> 
> I have tried to adapt one of your exemples
> 
> \readdata{\data}{hamilton.dat}%
>  \pstScalePoints(1,1){1989 sub}{}
>  \psset{llx=-0.5cm,lly=-1cm, xAxisLabel=Year,yAxisLabel=Whatever,%
>  xAxisLabelPos={c,-0.4in},yAxisLabelPos={-0.4in,c}}
>  \psgraph[axesstyle=frame,Dx=5,Ox=1505,subticks=2](0,0)(12,6){4in}{2in}%
>  \listplot[linecolor=red,linewidth=2pt]{\data}
>  \endpsgraph

A _complete_ example would be fine!

\documentclass{article}

\usepackage{pst-plot}
\def\data{
1505  371     40.6
1510  1187   38.76
1515  2383   41.16
1520  3376   42.06
1525  3510   50.39
1530  4548   56.78
1535  6198   48.95
1540  10136  58.20
1545  15090  59.49
1550  20599  69.05
1555  30465  71.02
1560  38464  79.09
1565  49672  92.38
1570  62803  93.84
1575  74710   103.71
1580  91962   102.77
1585  121337  111.35
1590  145170  113.97
1595  180355  114.08
1600  214784  137.23
1605  239187  142.20
1610  270592  130.57
1615  295120  127.86
1620  325232  129.94
1625  352243  124.21
1630  377198  136.77
1635  394309  126.81
1640  410624  121.46
1645  424388  132.91
1650  436159  143.22 }

\begin{document}
%\readdata{\data}{hamilton.dat}%
 \psset{llx=-1cm,lly=-1cm, xAxisLabel=Year,yAxisLabel=Whatever,%
  xAxisLabelPos={c,-0.4in},yAxisLabelPos={-0.6in,c}}
 \psgraph[axesstyle=frame,Dx=20,Ox=1505,subticks=2,Dy=10,
  ylabelFontSize=\red\scriptstyle,
  xlabelFontSize=\scriptstyle,ylabelFactor=\cdot
10^4](0,0)(160,50){4in}{2in}%
 \pstScalePoints(1,1){1505 sub}{10000 div}
 \listplot[linecolor=red,linewidth=2pt,plotNoMax=2,plotNo=1]{\data}
 \pstScalePoints(1,1){1505 sub}{3 div}
 \listplot[linecolor=blue,linewidth=2pt,plotNoMax=2,plotNo=2]{\data}
\psaxes[xAxis=false,Dy=30,dy=10,labelFontSize=\scriptstyle\blue,
  ylabelPos=r,ylabelFactor={}](0,0)(0,50)
 \endpsgraph

\end{document}

Herbert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto vom 2014-11-26 17:55:01.png
Type: image/png
Size: 14726 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20141126/3a3eddfd/attachment-0001.png>


More information about the PSTricks mailing list