[pstricks] Can I get a x-coordinate from a point anyhow?

Martin Sievers scharmuetzler at gmx.de
Tue Aug 15 20:42:46 CEST 2006


Hello everyone,
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.
Maybe I have to use some more postscript inside?
Any ideas are welcome.
Thanks in advance

Martin

Beispiel:
\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}

\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 2.71 x neg 0.25 mul exp mul}{10 2.71 x neg 0.1 mul exp
mul}{6}{S}
\psplot[plotpoints=2000]{0}{S}{25*2.71^(-0.25*x)}
\psplot[plotpoints=2000]{0}{S}{10*2.71^(-0.1*x)}
\psplot[plotpoints=2000,linestyle=dashed]{S}{7}{25*2.71^(-0.25*x)}
\psplot[plotpoints=2000,linestyle=dashed]{S}{7}{10*2.71^((0.25-0.1)*x)}
\end{psgraph}
\end{pspicture}



More information about the PSTricks mailing list