Menu

[r540]: / trunk / htdocs / examples / gdtest2.py  Maximize  Restore  History

Download this file

18 lines (14 with data), 336 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
import matplotlib
matplotlib.use('GD')
from matplotlib.backends.backend_gd import Figure, show
from matplotlib.axes import Subplot
dpi = 100
figsize = (5, 5)
f = Figure(figsize, dpi)
a = Subplot(f, 111)
f.add_axis(a)
l = a.plot([1,2,3], [4,5,6])
a.set_xlabel('time (s)')
a.set_ylabel('Signal 2')
f.print_figure('gdtest', dpi)
show()
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.