# [pstricks] drawing inverses

Dougherty, Michael michael.dougherty at swosu.edu
Mon Jun 12 03:51:29 CEST 2006

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3408 bytes
Desc: not available
Url : http://tug.org/pipermail/pstricks/attachments/20060611/f89c64f7/attachment.bin