Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168737
Image: ubuntu2004
# Create plot and get the matplotlib figure p=plot(x,(x,0,3)) figure=p.matplotlib(axes_labels=['x-axis','y-axis'])
p.show()
# Set canvas for the drawing from matplotlib.backends.backend_agg import FigureCanvasAgg figure.set_canvas(FigureCanvasAgg(figure))
# Manipulate things in the figure using matplotlib subplot=figure.get_axes()[0] subplot.xaxis.set_label_coords(x=0.5,y=-0.1)
figure.savefig('test.png')