[OS X TeX] Drawing parametric curves for Beamer
B.A.Lee
b.a.lee at rocketmail.com
Wed Oct 19 04:36:52 CEST 2016
Hi,
I am not sure if you are inclined to pick up tikz.
I commented out a part of the options at the beginning - not sure why they did not work and no time to pursue that.
I added one line by modifying the line that plots f(x) to give the inverse graph.
%%%%%%%%%%%%%%%\documentclass{standalone}\usepackage{tikz}
\begin{document}\definecolor{qqqqff}{rgb}{0.,0.,1.}\definecolor{ffqqqq}{rgb}{1.,0.,0.}\begin{tikzpicture}%[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]\draw[->,color=black] (-7.025,0.) -- (14.53,0.);\foreach \x in {-6.,-4.,-2.,2.,4.,6.,8.,10.,12.,14.}\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};\draw[->,color=black] (0.,-6.625) -- (0.,7.865);\foreach \y in {-6.,-4.,-2.,2.,4.,6.}\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};\draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};\clip(-7.025,-6.625) rectangle (14.53,7.865);\draw[line width=1.2pt,color=ffqqqq,smooth,samples=100,domain=-3.025000000000002:6.530000000000006] plot(\x,{(\x)^(3.0)+4.0});\draw[line width=1.2pt,color=ffqqqq,smooth,samples=100,domain=-3.025000000000002:6.530000000000006] plot({(\x)^(3.0)+4.0},\x); %% swapping x and y coordinates gives inverse graph\draw [color=ffqqqq](1.345,6.065) node[anchor=north west] {$f(x)=x^3 + 4$};\draw [color=qqqqff](1.66,-1.045) node[anchor=north west] {$f^{-1}(x) = \sqrt[3]{x-4}$};\draw[line width=1.2pt,color=qqqqff, smooth,samples=100,domain=-3.07000000000001:6.57500000000001] plot[parametric] function{6.123233995736766E-17*(t+0.0)+t**(3.0)+4.0,t+0.0-6.123233995736766E-17*(t**(3.0)+4.0)-0.0};\end{tikzpicture}\end{document}
@-->------ May you be happy and well! B.A. ------<--@
On Tuesday, 18 October 2016, 6:20, Tim Brophy <timbrophy at mac.com> wrote:
Thanks everybody.
As a temporary solution I have simply exported the graphic as a pdf file and included it in beamer.
I downloaded gnuplot and put it in my Applications folder. This may not be the correct thing to do. I got it from Sourceforge and don’t know if it is even the correct version for the Mac.
> On 17 Oct 2016, at 22:24, Michael Sharpe <msharpe at ucsd.edu> wrote:
>
>
>> On Oct 17, 2016, at 2:01 PM, Tim Brophy <timbrophy at mac.com> wrote:
>>
>> {6.123233995736766E-17*(t+0.0)+t**(3.0)+4.0,t+0.0-6.123233995736766E-17*(t**(3.0)+4.0)-0.0}
>
>
> I don't believe gnuplot is really needed, and you received that warning because of the overly complex way your parametric function was specified. Instead of the above, try
>
> {t^3+4,t}
>
> so that that Tikz doesn't think that non-integer powers are called for.
>
> Michael
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: https://www.esm.psu.edu/~gray/tex/
> List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
> https://email.esm.psu.edu/pipermail/macosx-tex/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
> List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://www.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/macostex-archives/attachments/20161019/76b12300/attachment-0001.html>
-------------- next part --------------
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://www.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
More information about the macostex-archives
mailing list