3

If you have something like:

\begin{sagesilent}
G=Graphics()
H=Graphics()
var('x')
G+=plot(cos(x),(x,0,pi))
H+= text("$\cos(x)$", (1, 1), fontsize=16, color='black')
\end{sagesilent}
\[ \sageplot{G+H}\] 

into a tex file, how can you place it on the left or on the right, and make it smaller, or even show it vertically? Note: the whole thing is showing correctly, but just too big in the middle of the page. I need general advise in how to deal with sagemath plots like this (using Kile).

2

You can center the plot with \begin{center} ... \end{center} and control the size with the scale option to \sageplot as this working example shows:

\documentclass{article}
\usepackage{sagetex}
\begin{document}
\pagestyle{empty}
\begin{sagesilent}
G=plot(cos(x),(x,0,pi))
H= text("$\cos(x)$", (1, 1), fontsize=16, color='black')
\end{sagesilent}
\begin{center} \sageplot[scale=.5]{G+H} \end{center}
\end{document}

Centered graphics at 0.5 scale.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.