[pstricks] log plot

Patrice Megret Patrice.Megret at fpms.ac.be
Fri Oct 21 11:01:43 CEST 2005


Dear Herbert,

 

Please find enclosed some more trials with the log plots.

 

As you can see the behaviour is different when (xm,ym) are negative or
positive: when it is negative, pstricks-add assumes that Ox=xm and Oy=xm
but when they are positive Ox and Oy keep their default values (0,0). So
the way we have to build our log plots depends on the minimum values.

 

See my example 1: to get the correct behaviour I should use Ox=2, Oy=1

 

Moreover; for negative values of xm (resp. ym), Ox=0 (resp. Oy) (but not
Ox different of 0)  has no effect since there is a test in line 1437 if
Ox=0 then Ox=#3 if xm is negative.  

 

See my example 2: to get the same behaviour as in example 1 I should use
Ox=0, Oy=0 but it is not working.

 

The situation is even more difficult in example 3 where xm is positive
and ym negative

 

 

I finally came to the conclusion that it is probably better to cancel
all the tests between lines 1433 and 1455 and let the user specifies Ox
and Oy as he wants. In that way, the behaviour is the same whatever xm
and ym are positive or negative and log plots are also completely
similar as lin plots. Moreover, in that way, it should also work when
you specify (x0,y0). 

 

By the way, if you prefer the way it is working now, could you just
change the test in line 1447 which is \ifx\psk at Ox\@empty ... instead of
\ifx\psk at y\@empty and causes thus a crash when Oy={} is specified and
check the order of the tests which are different for x and y.

 

Thanks a lot

 

Best regards,

 

Patrice

 

Extract from pstricks-add

 

>From line 1432 to line 1455

 

    % If minimum values are negative in log mode, we modify Ox

    % (respectively Oy) if this was not done by the user

    % X axis labels (\psk at log = 0 or 1)

  \ifx\psk at xlogBase\@empty\else%

    \ifx\psk at Ox\@empty\else% we do nothing ... hv

      \ifdim\psk at Ox pt=\z@

        \ifdim#3pt<\z@

          \pssetxlength\pst at dimg{#3}% o-x

          \psset{Ox=#3}%

            \fi

      \fi%

    \fi%

  \fi%

% Y axis labels (\psk at log = 0 or 2)

  \ifx\psk at ylogBase\@empty\else%

    \ifx\psk at Ox\@empty\else

      \ifdim#4pt<\z@

        \ifdim\psk at Oy pt=\z@

          \pssetylength\pst at dimh{#4}% o-y

          \psset{Oy=#4}%

            \fi

      \fi

    \fi

  \fi

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20051021/433e86b1/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: essai4.ps
Type: application/postscript
Size: 131241 bytes
Desc: essai4.ps
Url : http://tug.org/pipermail/pstricks/attachments/20051021/433e86b1/attachment.ps 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: essai4.tex
Type: application/octet-stream
Size: 735 bytes
Desc: essai4.tex
Url : http://tug.org/pipermail/pstricks/attachments/20051021/433e86b1/attachment.obj 


More information about the PSTricks mailing list