Hi Folks,

I'm creating a basic graph as follows:

revnos = [ p['revno'] for p in data ]
durations = [ p['duration'] for p in data ]

majorFormatter = FormatStrFormatter('%d')

matplotlib.use('Cairo')
fig = Figure()
canvas = FigureCanvas(fig)
ax = fig.add_subplot(111)
ax.plot(revnos, durations, '-')
ax.set_title('PQM pre-commit hook durations from Revision %s to %s' %
(revnos[0], revnos[-1]))
ax.xaxis.set_major_formatter(majorFormatter)

ax.grid(True)
ax.set_xlabel('Revision')
ax.set_ylabel('Duration in Minutes')
canvas.draw()
fig.savefig(OUTPUTFILE)

Seems to give me a default size of 1200x900 (which I assume is somehow
related to my screen size) - I've tried altering the fig = line as
follows:

fig = Figure(figsize=(8,6), dpi=100)

but can't seem to change the output size of the image.

Thanks, Tom
-- 


----------------------------------
Tom Haddon
mailto:[EMAIL PROTECTED]
m +1.415.871.4180
www.greenleaftech.net


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to