Sharedsupport / 2015-04-10-100419.ipynbOpen in CoCalc
Examples for support purposes...
import sage.all
G = sage.all.Graph()
G.add_edge("UW", "ACN")
G.plot()
Graphics object consisting of 4 graphics primitives

%matplotlib inline
G.plot().matplotlib()
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) /usr/local/sage/sage-6.5/local/lib/python2.7/site-packages/IPython/core/formatters.pyc in __call__(self, obj) 328 pass 329 else: --> 330 return printer(obj) 331 # Finally look for special method names 332 method = _safe_get_formatter_method(obj, self.print_method) /usr/local/sage/sage-6.5/local/lib/python2.7/site-packages/IPython/core/pylabtools.pyc in <lambda>(fig) 205 206 if 'png' in formats: --> 207 png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png', **kwargs)) 208 if 'retina' in formats or 'png2x' in formats: 209 png_formatter.for_type(Figure, lambda fig: retina_figure(fig, **kwargs)) /usr/local/sage/sage-6.5/local/lib/python2.7/site-packages/IPython/core/pylabtools.pyc in print_figure(fig, fmt, bbox_inches, **kwargs) 115 116 bytes_io = BytesIO() --> 117 fig.canvas.print_figure(bytes_io, **kw) 118 data = bytes_io.getvalue() 119 if fmt == 'svg': AttributeError: 'NoneType' object has no attribute 'print_figure'
<matplotlib.figure.Figure at 0x7f645e9c3ad0>