I tried this plot using sage with Latex.
\documentclass{article}
\title{Curve Tracing by SAGE in \LaTeX}
\author{Priyanka Kapoor}
\usepackage{sagetex}
\begin{document}
\maketitle
Plot the curve for sin(X)
\begin{sageblock}
f(x) = sin(x)
\end{sageblock}
Here's a plot of $f$ from $-2$ to $2$:
\sageplot[width=10cm]{plot(f,(x, -2, 2),legend_label='sin(x)',aspect_ratio =1)}
\end{document}
How to use Array and Loop in this program around \sageplot portion.
I tried this:
\begin{sageblock}
v= [x^2, sin(x)]
\end{sageblock}
Here's a plot of $f$ from $-2$ to $2$:
for i in range(2):
\sageplot[width=10cm]{plot(v[i],(x,
-2,2),legend_label='sin(x)',aspect_ratio =1)}
\end{document}
It doesn't work :-( Where to apply loop then. In sageblock or in latex body?
please help.
--
Priyanka Kapoor
http://kapoorpriyanka.in
Linux User Group, Ludhiana
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org