SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S
1
(4)
2
(3)
3
(3)
4
(5)
5
(1)
6
7
(5)
8
(1)
9
(3)
10
(3)
11
(15)
12
(10)
13
(2)
14
15
16
(2)
17
(3)
18
19
20
(3)
21
(1)
22
(5)
23
(5)
24
25
(3)
26
27
(1)
28
29






Showing 3 results of 3

From: John H. <jdh...@ac...> - 2004年02月09日 15:36:08
>>>>> "derek" == derek bandler <d_b...@ho...> writes:
 derek> I am interested in using Matplotlib for real-time
 derek> updating plot applications. My concern is with system load
 derek> issues (they're pretty high). Using the code below, which
 derek> came off of an earlier posting to this list, on a pc (2.4
 derek> gig processor) memory usage ranges from 20 - 50+ megs
 derek> (there's a cycling pattern) and 30-40% of the cpu is being
 derek> used for this basic app. If left to run for 20 minutes or
 derek> so, it seems to crash (entire screen turns grey and reboot
 derek> is required to get machine back to working order).
I answered this problem on the support request you submitted to
sourceforge a couple of days ago. I'll paste in my response from
the sourceforge site
Date: 2004年02月06日 14:22
Sender: jdh2358
Logged In: YES 
user_id=395152
Thanks for the bug report!
I have spent a lot of time optimizing matplotlib for
pltotting and interacting with large data sets, but not for
frequently redrawing small data sets.
Fortunately, I was able to replicate the bug on my system. 
I identified a memory leak in pygtk in a function I use for
rotating tick labels.
It turns out almost all the CPU usuage (and memory) was for
repeatedly computing layout information, rotations, and so
on for text onthe tick labels. Since these rarely change
(eg, in system demo) I cache all the relevant information. 
I also cache the result that is causing the memory leak in
pygtk, so repeated calls will not drain memory.
The result is a system demo with CPU usage reduced from
30-40% to 4-8% and memory consumption reduced from a growing
memory leak to a stable 1.2%.
Not bad. Please let me know if you continue to experience
performance issues. I I have updated CVS. I you have
trouble accessing CVS, email me at
jdh...@ac... and I'll send you a snapshot.
I have no idea about the solaris redraw problem currently
JDH
Date: 2004年02月06日 15:51
Sender: jdh2358
Logged In: YES 
user_id=395152
I tracked down the memory leak in pygtk. I you are
intersting in patching your pygtk, the bug report and patch
are here
http://bugzilla.gnome.org/show_bug.cgi?id=133681
From: derek b. <d_b...@ho...> - 2004年02月09日 15:17:24
<html><div style='background-color:'><DIV class=RTE>
<P>I am interested in using Matplotlib for real-time updating plot applications.&nbsp; My concern is with system load issues (they're pretty high).&nbsp; Using the code below, which came off of an earlier posting to this list, on a pc (2.4 gig processor) memory usage ranges from 20 - 50+ megs (there's a cycling pattern) and 30-40% of the cpu is being used for this&nbsp;basic app.&nbsp; If left to run for 20 minutes or so, it seems to crash (entire screen turns grey and reboot is required to get machine back to working order).</P>
<P>On a solaris machine, the performance numbers are similar, though the memory didn't appear to exceed 30 megs (or cycle).&nbsp; One other solaris&nbsp;issue is that the&nbsp;plot doesn't update, unless it is forced to redraw (by moving another window over the plot window).&nbsp; I've tinkered with the redraw rate, but it didn't seem to help.</P>
<P>Short of the performance issues, this software looks great.&nbsp; Is there a way of using the software that will minimize system impact, or better yet,&nbsp;can this become&nbsp;a development priority?&nbsp; It's not clear if the performance issue is driven by matplotlib, pygtk or gtk.&nbsp; Is it possible that different backends lead to non-trivial differences in&nbsp;performance?&nbsp; </P>
<P>Also, the crashing on a pc and non-updating on solaris are outstanding concerns.</P>
<P>Derek Bandler</P>
<P>####</P>
<P>import pygtk<BR>pygtk.require('2.0')<BR>import gtk<BR>import time<BR>from matplotlib.matlab import *<BR>&nbsp;<BR>def get_memory():<BR>&nbsp;&nbsp;&nbsp; "Simulate a function that returns system memory"<BR>&nbsp;&nbsp;&nbsp; return 100*(1+sin(0.5*pi*time.time()))<BR>&nbsp;<BR>def get_cpu():<BR>&nbsp;&nbsp;&nbsp; "Simulate a function that returns cpu usage"<BR>&nbsp;&nbsp;&nbsp; return 100*(1+sin(0.2*pi*(time.time()-0.25)))<BR>&nbsp;<BR>def get_net():<BR>&nbsp;&nbsp;&nbsp; "Simulate a function that returns network bandwidth"<BR>&nbsp;&nbsp;&nbsp; return 100*(1+sin(0.7*pi*(time.time()-0.1)))<BR>&nbsp;<BR>def get_stats():<BR>&nbsp;&nbsp;&nbsp; return get_memory(), get_cpu(), get_net()<BR>&nbsp;<BR>fig = figure(1)<BR>ax = subplot(111)<BR>ind = arange(1,4)<BR>pm, pc, pn = bar(ind, get_stats())<BR>centers = ind + 0.5*pm.get_width()<BR>pm.set_facecolor('r')<BR>pc.set_facecolor('g')<BR>pn.set_facecolor('b')</P>
<P>ax.set_xlim([0.5,4])<BR>ax.set_xticks(centers)<BR>ax.set_ylim([0,100])<BR>ax.set_xticklabels(['Memory', 'CPU', 'Bandwidth'])<BR>ax.set_ylabel('Percent usage')<BR>ax.set_title('System Monitor')<BR>&nbsp;<BR>def updatefig(*args):<BR>&nbsp;&nbsp;&nbsp; m,c,n = get_stats()<BR>&nbsp;&nbsp;&nbsp; pm.set_height(m)<BR>&nbsp;&nbsp;&nbsp; pc.set_height(c)<BR>&nbsp;&nbsp;&nbsp; pn.set_height(n)<BR>&nbsp;&nbsp;&nbsp; ax.set_ylim([0,100])</P>
<P>&nbsp;&nbsp;&nbsp; fig.draw()<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; return gtk.TRUE</P>
<P>gtk.timeout_add(250, updatefig)<BR>show()</P></DIV></div><br clear=all><hr> <a href="http://g.msn.com/8HMBENUS/2752??PS=">Create your own personal Web page with the info you use most, at My MSN.</a> </html>
I have some plots I'd like to print out and they would make better use
of the paper if they were done landscape.
Can the postscript backend do this?
John

Showing 3 results of 3

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.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /