[OS X TeX] Plotting Graph in XeTeX

McGarry Vince vmcgarry at austin.rr.com
Sun Jul 15 04:09:20 CEST 2007


Hello,

If you are going to plot functions, you'll need to replace the  
xelatex line with the following.

   --shell-escape -output-driver="xdvipdfmx -q -E" "$1"

  Gnuplot will then be able to create the .table files need for the  
graphs. For example, try

\documentclass{article}
\usepackage{tikz}

\begin{document}
\def\g#1{(1/sqrt(2*pi))*exp((-#1**2)/2)}
\begin{tikzpicture}[domain=-3.8:3.8,x=1.4cm,y=20cm]
\draw [-stealth] (-4,0) -- (4,0);
\draw [-stealth] (0,0) -- (0,0.5);
\draw[samples=500,color=blue] plot[id=normala] function{\g{x}};
\end{tikzpicture}
\end{document}


for a graph of the standard normal probability distribution.


Vince McGarry

------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the macostex-archives mailing list