Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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).

share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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