Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Sage uses matplotlib in the backend to do the job of plotting and saving 2D figures. Therefore, Sage comes bundled with matplotlib. The difference is that in Sage you can input the symbolic functions, and Sage will generate the data points and pass them on to matplotlib.

Now, since Sage contains matplotlib, you can run matplotlib commands directly from Sage. For example, an import like

sage: from matplotlib import pyplot as plt

will make pyplot commands available from Sage, as plt.<command>. So, you can use matplotlib commands directly from within Sage.

Importing matplotlib plots back into Sage Graphics is, unfortunately, not yet implemented. You may follow ticket 5128 for any update on this matter, though I am not quite sure what prevented the ticket from getting merged.