Menu

[r6323]: / trunk / users_guide / code / svgcanvas.py  Maximize  Restore  History

Download this file

9 lines (8 with data), 270 Bytes

1
2
3
4
5
6
7
8
# using the matplotlib API - look, maw, no matlab!
from matplotlib.backends.backend_svg import FigureCanvasSVG
from matplotlib.figure import Figure
fig = Figure()
ax = fig.add_subplot(211)
ax.plot([1,2,3])
canvas = FigureCanvasSVG(fig)
canvas.print_figure('myfile.svg')
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.