Graphing arcsin(x)

Philip Taylor (Hellenic Institute) P.Taylor at Hellenic-Institute.Uk
Mon Nov 22 00:07:28 CET 2021


On 21/11/2021 22:40, Hartmut Henkel wrote:

> [...]
> ...the above example works here with latex & dvips, an \endpsclip was
> missing, giving an "! Extra }, or forgotten \endgroup." error.
>
> Best Regards, Hartmut


And here with LuaLaTeX.  Well, I say "works", but I cannot guarantee 
that the graphs are correct.  But at least I get coloured lines ...  
N.b., spaces added to improve legibility.

> % !TeX Program=LuaLaTeX
>
>
> \documentclass {article}
>
> \usepackage {pstricks-add}
>
> \begin {document}
>
> \begin {figure}
>
> \psset {algebraic=true, plotpoints=501}
>
> \begin {pspicture} (-3, -1.5) (3, 1.5)
>
> \psaxes [xunit=1] (0, 0) (-6.283, -1.5) (6.283, 1.5)
>
> \psclip {\psframe [linestyle=none] (-3, -2) (3.15, 4)}%
>
> \psplot [linecolor=blue, linestyle=dashed, linewidth=2pt] {-1} {1} 
> {asin(x)}
>
> \psplot [linecolor=red, linestyle=dashed, linewidth=2pt] {-1} {1} 
> {acos(x)}
>
> \endpsclip % <------------ was missing
>
> \end {pspicture}
>
> \caption {Inverse trigonometric plots in algebraic notation}
>
> \end {figure}
>
> \newpage
>
> \begin {figure}
>
> \psset {algebraic=false, plotpoints=501}
>
> \begin {pspicture} (-3, -1.5 )(3, 1.5)
>
> \psaxes [xunit=1] (0, 0) (-6.283, -1.5) (6.283, 1.5)
>
> \psclip {\psframe [linestyle=none] (-3, -2) (3.15, 2)}%
>
> \psplot [linecolor=green] {-3.14} {3.14} {x ATAN }
>
> \endpsclip
>
> \end {pspicture}
>
> \caption {Inverse trigonometric plots in reverse Polish notation}
>
> \end {figure}
>
> \end {document}
>
-- 

/Philip Taylor/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20211121/e0f63451/attachment-0001.html>


More information about the texhax mailing list.