Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c54d8f commit e12a16eCopy full SHA for e12a16e
examples/api/agg_oo.py
@@ -6,10 +6,12 @@
6
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
7
from matplotlib.figure import Figure
8
9
-fig, ax = plt.subplots()
+fig = Figure()
10
+canvas = FigureCanvas(fig)
11
+ax = fig.add_subplot(111)
12
ax.plot([1,2,3])
13
ax.set_title('hi mom')
14
ax.grid(True)
15
ax.set_xlabel('time')
16
ax.set_ylabel('volts')
-fig.canvas.print_figure('test')
17
+canvas.print_figure('test')
0 commit comments