[pstricks] Plot files

Xavier Pessoles pessoles at crans.org
Mon Oct 19 10:18:25 CEST 2009


Herbert Voss a écrit :
> Xavier Pessoles schrieb:
> 
>> I am a newbie and I would like to know how to plot a file with pstricks :
>>
>> My data file have 4 columns (t,x,y,z), and I would like to plot
>> x y and z in fonction of t.
>>
>> My file can reach more than 10000 lines.
>>
>> Moreover, I wish I knew if it is possible to manipulate data :
>> I would like to plot, for exemple :
>> x+50 in fonction of t.
> 
> have a look at the documentation of pstricks-add.
> http://mirror.ctan.org/graphics/pstricks/contrib/pstricks-add/
> 
> Herbert

Hi,
Thanks for the indication.

I solve my problem with pstricks add.

For information,
My file has this format :
t x y z

My file has 4 columns >> plotNoMax=4.

The first column is always used for x-axis.

To plot y in fonction of t, the command is :
\listplot[linecolor=red,plotNo=2,plotNoMax=4]{\Data}


++
xabi

-- 


\documentclass[a4paper,10pt]{article}
\usepackage{pstricks,pstricks-add}
\usepackage{amsmath,amsfonts,amssymb}
\begin{document}
   \readdata\Data{JAVX.txt}
   \psset{xunit=0.05cm, yunit=1cm}
   \begin{center}
  \begin{pspicture}(-1,-3)(200,3)
   \psaxes[Dx=50,Dy=1]{->}(0,0)(-1,-2)(200,2.5)
  \listplot[linecolor=green,plotNo=1,plotNoMax=4]{\Data}
  \listplot[linecolor=red,plotNo=2,plotNoMax=4]{\Data}
  \listplot[linecolor=blue,plotNo=3,plotNoMax=4]{\Data}
  \end{pspicture}
\end{center}
\end{document}



More information about the PSTricks mailing list