[pstricks] pst-plot

Patrice MÉGRET Patrice.MEGRET at umons.ac.be
Fri Jun 10 14:03:03 CEST 2011


Dear Herbert,

I have data located between (30,1583.9) and (100,1584.0) and I have trouble with pst-plot.

My first idea was to use

\begin{psgraph}[mathLabel=false,labelFontSize=\small,Dy=0.1, Oy=1593.0,Ox=30,Dx=10]{->}(30,1593)(110,1584){8cm}{5cm}
\end{psgraph}
but I get this error message:

! Dimension too large.
<recently read> \pst at yunit

l.40 ...x=10]{->}(30,1583.0)(110,1584.0){8cm}{5cm}

By the way,
\begin{psgraph}[mathLabel=false,labelFontSize=\small,Dy=0.1,Ox=30,Dx=10]{->}(30,0)(110,1){8cm}{5cm}
\end{psgraph}
perfectly works but here ymin=0 and ymax=1 .


To overcome this problem, I used \pstScalePoints(1,1000){}{1584 sub} to scale y-values by 1000 and to locate my data between (30,0) and (110,800).
By letting  Dy=0.1,dy=100,Oy=1584.0,Ox=30,Dx=10 in psgraph I can re-create "by hand" the correct axes and  the picture is correct.

Now, I would like to add a frame and extend the x and y ticks to draw the grid.
So I just add   xticksize=0 800, yticksize=0 80 to psgraph and I still get the error:

! Dimension too large.
<recently read> \@psunit

l.57 ..., yticksize=0 80](30,0)(110,800){8cm}{5cm}


Below the %%%%%%%%%%%%%%%, you will find the code with the three tests.

Have any idea of the problem and how I can solve it?



Best regards,
Patrice



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[11pt,a4paper]{book}
\usepackage[sectionbib]{chapterbib}

\usepackage{t1enc}                                             %utilisation de l'encodage T1
\usepackage[latin1]{inputenc}         %utilisation du clavier Latin1

\usepackage{pstricks}
\usepackage{pst-plot}
\usepackage{pstricks-add}
\usepackage{amsmath}

\usepackage[dvips]{graphicx}
\usepackage[cdot,Gray,squaren]{SIunits}  %pour utiliser le système international des unités très facilement


\begin{document}
\savedata{\myData}[
3.0000000e+001  1.5839701e+003
4.0000000e+001  1.5840458e+003
5.0000000e+001  1.5841626e+003
6.0000000e+001  1.5842590e+003
7.0000000e+001  1.5843775e+003
8.0000000e+001  1.5844801e+003
9.0000000e+001  1.5845833e+003
1.0000000e+002  1.5847256e+003
]


\psset{llx=-1cm,urx=1cm,lly=-1cm,ury=1cm}
\psset{xAxisLabel={Temperature ($\celsius$)},xAxisLabelPos={c,-1cm},yAxisLabel={Bragg wavelength ($\nano\meter$)},yAxisLabelPos={-2cm,c}}

\begin{psgraph}[mathLabel=false,labelFontSize=\small,Dy=0.1,Ox=30,Dx=10]{->}(30,0)(110,1){8cm}{5cm}
\end{psgraph}


\pslegend[lt]{%
\color{orange}\textbullet & measured \\
\color{blue}\rule[1ex]{2em}{1pt} & linear fit
}

\begin{psgraph}[mathLabel=false,labelFontSize=\small,Dy=0.1,dy=100,Oy=1584.0,Ox=30,Dx=10]{->}(30,0)(110,800){8cm}{5cm}
\pstScalePoints(1,1000){}{1584 sub}
\listplot[plotstyle=LSM,showpoints=true,dotstyle=*,linecolor=blue,linewidth=1.5pt]{\myData}
\listplot[plotstyle=dots,showpoints=true,dotstyle=*,linecolor=orange,linewidth=1.5pt]{\myData}
\end{psgraph}

\iffalse
\begin{psgraph}[axesstyle=frame,mathLabel=false,labelFontSize=\small,Dy=0.1,dy=100,Oy=1584,Ox=30,Dx=10,xticksize=0 800, yticksize=0 80](30,0)(110,800){8cm}{5cm}
\pstScalePoints(1,1000){}{1584 sub}
\listplot[plotstyle=LSM,showpoints=true,dotstyle=*,linecolor=blue,linewidth=1.5pt]{\myData}
\listplot[plotstyle=dots,showpoints=true,dotstyle=*,linecolor=orange,linewidth=1.5pt]{\myData}
\end{psgraph}
\fi
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20110610/b1fc1f5c/attachment.html>


More information about the PSTricks mailing list