1

I'm using pstricks to plot the time from some experiments, I have the data in .dat

\readdata{\pk1}{P1k1avg.dat}
\readdata{\pk2}{P1k2avg.dat}
\readdata{\pk3}{P1k3avg.dat}
\psset{xAxisLabel=\small{Number of Nodes},yAxisLabel=\small{CPU Time}, xAxisLabelPos={c,-25}, yAxisLabelPos={-30,c},mathLabel=false, xlabelsep=-5pt, xLabels={,\tiny{$100$},\tiny{$200$},\tiny{$300$},\tiny{$400$},\tiny{$500$},\tiny{$600$},\tiny{$700$},\tiny{$800$},\tiny{$900$},\tiny{$1000$}},labelFontSize=\scriptsize}
\begin{figure}[h]
\centering
\pslegend[lt]{\blue\rule[1ex]{0.5em}{1pt} & \tiny{$(P1_k)$ 1} \\
\red\rule[1ex]{0.5em}{1pt} & \tiny{$(P1_k)$ 2}\\
 \green\rule[1ex]{0.5em}{1pt} & \tiny{$(P1_k)$ 3}}
\psgraph[axesstyle=frame,Oy=0,Dy=10,Ox=0,Dx=1,ysubticks=2](0,0)(10,150){6cm}{4.2cm}
\listplot[linewidth=0.5pt,linecolor=blue]{\pk1}
\listplot[linewidth=0.5pt,linecolor=red]{\pk2}
\listplot[linewidth=0.5pt,linecolor=green]{\pk3}
\endpsgraph
\vspace{22pt}
\caption{Average Solve Time}
\label{fig1}}
\end{figure}

and the packages:

\usepackage{pstricks-add} 
\usepackage{pst-all}

But i get in my pdf "D 1 3 D 2 4.0 D ...", where the numbers are the data un a row and the "D" i don't know where they come from. And the graph don't show the data. I don't want to change the call of xelatex because i have to send to someone the tex and it has to run in his computer.

1 Answer 1

1

Do not use such macro names:

\readdata{\pk1}{P1k1avg.dat}
\readdata{\pk2}{P1k2avg.dat}
\readdata{\pk3}{P1k3avg.dat}

Use only letters, for example:

\readdata{\pkA}{P1k1avg.dat}
\readdata{\pkB}{P1k2avg.dat}
\readdata{\pkC}{P1k3avg.dat}

and then also for \listplot

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .