3

I am trying to create some graph with a logarithmic y-axis in PSTricks. My Code Looks like this:

\psset{xunit=0.5cm,yunit=2cm}
\begin{pspicture}(-0.5,-17)(8,1)
    \readdata[ignoreLines=1]{\DataSDEOne}{QR2-5x5-SDE1.dat}
    \psaxes[axesstyle=frame,Dx=2,ylogBase=10,Oy=-3](0,-3)(20,0)
    \dataplot[plotstyle=curve,linecolor=red]{\DataSDEOne}
\end{pspicture}

The data-file Looks like this:

Iteration   SDE1
0   0.918238878000000000000000000000
1   0.781163156000000000000000000000
2   0.683383048000000000000000000000
3   0.671932101000000000000000000000
4   0.559252858000000000000000000000
5   0.336966991000000000000000000000
6   0.193554908000000000000000000000
7   0.120545782000000000000000000000
8   0.089903891100000000000000000000
9   0.072258718300000000000000000000
10  0.041734408600000000000000000000
11  0.023705897900000000000000000000
12  0.000000003599741840000000000000
13  0.000000000000000434642119000000
14  0.000000000000000434642119000000

It seems to be that the dataplot does not use the scale given by the \psaxes command? Another strange behaviour: If I increase yunit to 5cm, the whole graphic disappears.

I wanted to create a Picture like this

2
\psset{xunit=0.5cm,yunit=0.5cm}
\begin{pspicture}(-0.5,-18)(15,1)
    \psaxes[axesstyle=frame,Dx=2,ylogBase=10,Dy=2,Oy=-18](0,-18)(15,0)
    \readdata[ignoreLines=1]{\DataSDEOne}{QR2-5x5-SDE1.dat}
    \pstScalePoints(1,1){}{ log }
    \listplot[linecolor=red]{\DataSDEOne}
\end{pspicture}

you want to show the y values as log(y), the reason why you have to scale the points with \pstScalePoints

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.