[pstricks] \psxTick(){} and \psyTick(){}

Hubert Lam hubert at lamfamily.info
Fri Jul 8 10:29:43 CEST 2016


Well that's certainly something I didn't know! Thanks again Herbert! :D

Hubert

-----Original Message-----
From: PSTricks [mailto:pstricks-bounces at tug.org] On Behalf Of Herbert Voss
Sent: Wednesday, July 6, 2016 8:55 PM
To: pstricks at tug.org
Subject: Re: [pstricks] \psxTick(){} and \psyTick(){}

Am 06.07.2016 um 01:57 schrieb Hubert Lam:
> Hi all
>
> Has there been anyone who could tame \psxTick and \psyTick to accept 
> some PS commands?

Internally the value is used in PS mode. The reason why you can use any PS code _without_ the preceeding !:

\documentclass{article}
\usepackage{pst-plot}
\begin{document}
\psset{yunit=2,xunit=10}
\begin{pspicture}(-0.1,-0.5)(1,2)
\psaxes{->}(0,0)(-0.05,-0.5)(0.75,1.75)
\psyTick(1.57){\frac{\pi}{2}}
\psyTick(PI 2 div){\frac{\pi}{2}}
\psxTick(0.08943089){\frac{110}{1230}}
\psxTick(220 1230 div){\frac{220}{1230}} \end{pspicture} \end{document}

Herbert



> Say for example I wish to place a y-tick at $\frac{\pi}{2}$. At the 
> moment it seems that I have to use a decimal approximation:
>
> *\psyTick(1.57){\frac{\pi}{2}}*
>
> But it would be terrific if it could be modified to accept some PS
> calculatios:
>
> *\psyTick(!PI 2 div){\frac{\pi}{2}}*
>
> Similarly with fractions, if I want to place an x-tick at 
> $\frac{110}{1230}$ then I would have to use
>
> *\psxTick(0.08943089){\frac{110}{1230}}*
>
> ...whereas it would be terrific if it could accept
>
> *\psxTick(!110 1230 div){\frac{11}{1230}}*
>
> (Or am I not using it properly?)
>
> Many thanks!
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for 
> Windows 10
>
>
>
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
> archive: http://www.tug.org/pipermail/pstricks/
>

_______________________________________________
PSTricks mailing list
PSTricks at tug.org
http://tug.org/mailman/listinfo/pstricks
archive: http://www.tug.org/pipermail/pstricks/



More information about the PSTricks mailing list