[pstricks] yLabels={...} problem is psgraph
Patrice MEGRET
Patrice.MEGRET at umons.ac.be
Thu Aug 31 13:32:18 CEST 2017
Dear Herbert,
I agree that Dy or Dx different from 1 is strange in that case, but is easy to that into account as it was the case in previous version of pst-plot (version 1.75 for example). The only advantage of Dx/Dy would be to increase the number ticks while still working in cm. If you keep Dx=Dy=1, you should change psunit to accomodate the number of ticks in a A4paper of example.
Concerning \nA: yes it is an integer but as the max #4 is x2(y2) and the min #3 is x1(y1), the number of steps in \multido is positive if max>min and negative if min>max (it was already the case if the previous pst-plot version) ==> \rA is decreasing by steps of \psk at Dx and \nA is also decreasing by step of 1 and becomes negative but \psPutXlabels{} seems to work like a list with a positive index only from 0 to number of steps, so \nA should be a positive integer. The purpose of the test is just to take the absolute value of\nA.
May the code could be optimize but I am not expert in Tex programming.
Here is an example to compile with various pst-plot versions to see what going on when the y1 is negative (but < y2) as in \psaxes(0,-2)(5,3.2) or y2 more negative than y1 as in \psaxes(0,0)(5,-5)
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{pst-plot}
\begin{document}
\psset{Dy=0.5}
\begin{verbatim}
\begin{pspicture}(-6,-2)(6,5)
\psaxes[yLabels={A,B,C,D,E,F,G,H,I,J,K},xLabels={A,B,C,D,E,F,G,H,I,J,K}](0,-2)(5,3.2)
\end{pspicture}
\end{verbatim}
\begin{pspicture}(-6,-2)(6,5)
\psaxes[yLabels={A,B,C,D,E,F,G,H,I,J,K},xLabels={A,B,C,D,E,F,G,H,I,J,K}](0,-2)(5,3.2)
\end{pspicture}
\begin{verbatim}
\begin{pspicture}(-6,-5)(6,0)
\psaxes[yLabels={A,B,C,D,E,F,G,H,I,J,K},xLabels={A,B,C,D,E,F,G,H,I,J,K}](0,0)(5,-5)
\end{pspicture}
\end{verbatim}
\begin{pspicture}(-6,-4)(6,2)
\psaxes[yLabels={A,B,C,D,E,F,G,H,I,J,K},xLabels={A,B,C,D,E,F,G,H,I,J,K}](0,0)(5,-5)
\end{pspicture}
\end{document}
Patrice
-----Message d'origine-----
De : PSTricks [mailto:pstricks-bounces at tug.org] De la part de Herbert Voss
Envoyé : mercredi 30 août 2017 19:26
À : pstricks at tug.org
Objet : Re: [pstricks] yLabels={...} problem is psgraph
Am 30.08.2017 um 15:28 schrieb Patrice MEGRET:
> This version has still problems when:
Dear Patrice,
I see.
> * Dx,Dy are not equal to 1
but where is the sense to use these arguments when having \xLabels?
>
> * (x1,y1)(x2,y2) if x1 or y1 is less than -1
>
> *(x1,y1)(x2,y2) if x2 or y2 is more negative than x1, y1
>
>
> Please find enclosed a modified version of the code that should work for every combinations of Dx,Dy, x1,y1,x2,y2.
\multido{\nA=0+1,\rA=0+\psk at Dx}{\pst at pmtempe}{%
\ifdim \nA pt < \z@ \def\nB{-\nA} \else \def\nB{\nA} \fi
\uput{\psxlabelsep}[\pst at tempC]{\pst at xLabelsRot}(\rA,0){%
\strut\expandafter\pshlabel\expandafter{\psPutXLabel{\nB}}}}%
what is the meaning of "\nA pt < \z@"? \nA is by default a natural number and cannot be negativ. Maybe you mean "\rA pt < \z@"??
Herbert
_______________________________________________
PSTricks mailing list
PSTricks at tug.org
http://tug.org/mailman/listinfo/pstricks
archive: http://www.tug.org/pipermail/pstricks/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testylabels2_modified.pdf
Type: application/pdf
Size: 14897 bytes
Desc: testylabels2_modified.pdf
URL: <http://tug.org/pipermail/pstricks/attachments/20170831/64ad7e94/attachment-0002.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testylabels2_1_83.pdf
Type: application/pdf
Size: 13993 bytes
Desc: testylabels2_1_83.pdf
URL: <http://tug.org/pipermail/pstricks/attachments/20170831/64ad7e94/attachment-0003.pdf>
More information about the PSTricks
mailing list