I am looking for a mathematics workbook like Sympy live shell that you can do plots in, that has a TeX or LaTeX output.
Asked
Active
Viewed 381 times
1 Answers
1
If you're familiar with the Sage Cloud and Python, just use that. You'll have access to all the goodies of sympy, and you can save the plots as for example PDF files, that can be used in a LaTeX document with \includegraphics.
For example if you have
import matplotlib.pyplot as plt
import numpy as np
import sympy as sp
fig,ax = plt.subplots(figsize=(3,2))
ax.plot(np.random.rand(20))
fig.savefig('test.pdf',bbox_inches='tight')
in a Sage worksheet and run that, you will get test.pdf in the project folder, that can then be downloaded, and used in a LaTeX file as
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics{test}
\end{document}
Torbjørn T.
- 206,688
.pdffile, or.pngfile), or do you want code using e.g. thepgfplotsorpstrickspackage that will render to a plot? – Torbjørn T. Feb 27 '17 at 20:24