[pstricks] drawing inverses

Mon Jun 12 09:43:57 CEST 2006

You could also just swap the x- and y-axes.

"Dougherty, Michael" <michael.dougherty at swosu.edu> wrote: Use the parametric plot and have the function be the y-value.  Where you originally graphed with
\psplot{xmin}{xmax}{f(x)}
now you do
\parametricplot{tmin}{tmax}{f(t) t}
It knows that there will be two outputs, kind of like a stack that ends up with two entries after all the unary and binary operations.

For an example, let me be lazy and copy something from a book I'm writing, where you have sin x and arcsin x graphed together. I probably could take some shortcuts but it's what I have on file.

--Mike Dougherty

\begin{pspicture}(-2,-4)(2,4)
\psset{yunit=.5cm}
\psaxes[Dy=20]{<->}(0,0)(-2,-8)(2,8)
\parametricplot[linecolor=gray,%
plotpoints=2000]{-8}{8}{t 180 mul 3.14159265 div sin t}
\parametricplot[plotpoints=100,linewidth=2pt]%
{-1.5708}{1.5708}{t 180 mul 3.14159265 div sin t}
\psline(-.2,-3.1415)(.2,-3.1415)
\psline(-.2,3.1415)(.2,3.1415)
\rput[l](.3,-3.1415){$-\pi$}
\rput[l](.3,3.1415){$\pi$}

\psline(-.2,-6.28)(.2,-6.28)
\psline(-.2,6.28)(.2,6.28)
\rput[l](.3,-6.28){$-2\pi$}
\rput[l](.3,6.28){$2\pi$}
\pscircle[fillcolor=black,fillstyle=solid](1,1.5708){.07}
\pscircle[fillcolor=black,fillstyle=solid](-1,-1.5708){.07}
\end{pspicture}

-----Original Message-----
From: pstricks-bounces at tug.org on behalf of Thushyanthan Baskaran
Sent: Sun 6/11/2006 1:36 PM
To: pstricks at tug.org
Subject: [pstricks] drawing inverses

Hi,

I would like to draw a function and its inverse together on a graph.
However, since my original function cannot be solved explicitly for the
dependent variable, I do not have an explicit function that I could use
with psplot. Is there any other solution for drawing inverses?

Many thanks in advance,

_______________________________________________
pstricks mailing list
pstricks at tug.org
http://tug.org/mailman/listinfo/pstricks

_______________________________________________
pstricks mailing list
pstricks at tug.org
http://tug.org/mailman/listinfo/pstricks

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20060612/2a97d9b4/attachment.html