[pstricks] Can I get a x-coordinate from a point anyhow?
Martin Sievers
scharmuetzler at gmx.de
Wed Aug 16 09:24:38 CEST 2006
Herbert Voss schrieb:
> Martin Sievers wrote:
>
>
>> I ask for your help for the following problem: I want to plot two
>> function f,g on [xmin,xmax] which have an intersection point S=(s1,s2).
>> The tricky thing about it is, that I want to plot the functions
>> differently on [xmin,s1] and [s1,xmax], for example red and blue.
>> As I only know S, but not the coordinates s1 and s2 themselves, I wonder
>> how I can achieve that.
>>
>
> it's possible, but only on PS side
>
> Herbert
>
> \documentclass{scrbook}
> \usepackage[ngerman]{babel}
> \usepackage[latin9]{inputenc}
> \usepackage[T1]{fontenc}
> \usepackage[prologue,dvipsnames,showerrors]{pstricks}
> \usepackage{pst-plot}
> \usepackage{pst-node}
> \usepackage{pst-eucl}
> \usepackage{pstricks-add}
>
> \makeatletter
> \def\getXfromNode#1{%
> tx at NodeDict begin /N@#1 load GetCenter end
> pop \pst at number\psxunit div }
> \makeatother
>
> \begin{document}
>
> \begin{pspicture}(0,0)(12,8)
> \psset{algebraic,comma,llx=-0.75cm,lly=-0.75cm,urx=0.75cm,Dy=5,Dx=1,labelFontSize={\footnotesize},xAxisLabel={$t$},yAxisLabel={$p$}}
> \begin{psgraph}{->}(0.0,0)(7.25,27){10.50cm}{7.25cm}
> \pstInterFF{25 Euler x neg 0.25 mul exp mul}{10 Euler x neg 0.1 mul exp
> mul}{6}{S}
> \psplot[plotpoints=200]{0}{\getXfromNode{S}}{25*Euler^(-0.25*x)}
> \psplot[plotpoints=200]{0}{\getXfromNode{S}}{10*Euler^(-0.1*x)}
> \psplot[plotpoints=200,linestyle=dashed]{\getXfromNode{S}}{7}{25*Euler^(-0.25*x)}
> \psplot[plotpoints=200,linestyle=dashed]{\getXfromNode{S}}{7}{10*Euler^((0.25-0.1)*x)}
> \end{psgraph}
> \end{pspicture}
>
> \end{document}
>
>
> _______________________________________________
> pstricks mailing list
> pstricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
>
>
>
Thank you Herbert. I was quite sure that there is a PS-solution, but
couldn't find it. I guess I should really read the ps-manual closely for
further problems as ps sometimes is the only way to do special things.
Bye
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20060816/554a6298/attachment.html
More information about the PSTricks
mailing list