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
(5) |
2
(17) |
3
(13) |
4
(17) |
5
(26) |
6
(13) |
7
(9) |
8
(8) |
9
(13) |
10
(25) |
11
(19) |
12
(24) |
13
(12) |
14
|
15
|
16
(5) |
17
(10) |
18
(7) |
19
|
20
(7) |
21
(2) |
22
(3) |
23
(11) |
24
(19) |
25
(17) |
26
(6) |
27
(10) |
28
(2) |
29
(4) |
30
(15) |
|
|
|
|
|
On 4/23/07, Eric Firing <ef...@ha...> wrote: > The autoscaling mechanism does not keep track of plot elements, so it > has no way of knowing what to change when you delete a line. You will > have to keep track of the x and y extents of each element yourself, and > manually reset the xlim and ylim when you want to rescale after deleting > a line. This can be done with the Axes set_xlim and set_ylim methods. I recently added a helper function "relim" in svn in the Axes class to automatically recomupte the data limits. After removing various lines, simply do ax.relim() ax.autoscale_view() but you will need svn...
On 2007年4月24日, Tommy Grav wrote: > I have a plot where the x axis ticks are given as > 0.1 0.15 0.20 0.025 0.30 0.35 > with +3.732e2 given in the lower right of the axis. > How can I force the ticks to have > 373.3 373.35 .... If all else fails, you can set the tick labels by hand. For example, I did this when trying to get tick labels of 0.002, 0.0025, 0.003, etc.: tickvals = arange(0.002,0.007,0.0005); ticklabs = map(lambda val:"%.4f"%val, tickvals); ticklabs[0:9:2] = map(lambda val:"%.3f"%val, tickvals[0:9:2]); xticks(tickvals,ticklabs); -- ====================================================================== Office: 0.17 (Golm) Dr. John T. Whelan Phone: +49 331 567 7117 MPI for Gravitational Physics FAX: +49 331 567 7298 (Albert-Einstein Institute) http://www.aei.mpg.de/~whelan/ D-14424 Potsdam joh...@li... joh...@ae... ======================================================================
I also had some trouble with exponents in an axis, getting 0.0 to 3.0 on the axis, with +1.998e3. I wanted the years 1998 to 2001 instead. I solved this using the following code (with the solution bits commented out): #!/usr/bin/env python from pylab import * # from matplotlib.ticker import FormatStrFormatter x = array([ 1998, 1999, 2000, 2001 ]) y = array([ 2.3, 4.5, 2.6, 7.2 ]) # ax=subplot(111) plot(x,y) ## Needed to get 2001, not 1+2e3: # majorFormatter=FormatStrFormatter('%d') # ax.xaxis.set_major_formatter(majorFormatter) # show() Dave
(forgot reply-to-all)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body dir="ltr" bgcolor="#ffffff" text="#000000"> <p style="margin-bottom: 0cm; margin-top: 0pt;"><br> </p> <p style="margin-bottom: 0cm; margin-top: 0pt;">OK, thanks for the info. Is imshow currently the only array imaging routine that supports this functionality?</p> <p style="margin-bottom: 0cm; margin-top: 0pt;"><br> </p> <p style="margin-bottom: 0cm; margin-top: 0pt;">Thanks again,</p> <p style="margin-bottom: 0cm; margin-top: 0pt;">Yoav<br> </p> <p style="margin-bottom: 0cm; margin-top: 0pt;"><br> </p> <p style="margin-bottom: 0cm; margin-top: 0pt;">Eric Firing wrote:<br> </p> <blockquote cite="mid...@ha..." type="cite">The contour routine does not have update functionality similar to that of an image; you have no choice but to generate a new ContourSet object each time. <br> <br> Eric <br> <br> Yoav Avitzour wrote: <br> <blockquote type="cite">Hi, <br> <br> <br> I'm trying to create 2D animations using contours. Is there a recommended way to do this? I was hoping to follow the same route as in the dynamic_image_gtkagg.py example, but for some reason set_array doesn't work for me with contour. It doesn't produce any error, but the figure just doesn't get updated after calling canvas.draw(). <br> <br> <br> Matplotlib version: 0.87.7 <br> <br> <br> Thanks, <br> <br> Yoav <br> <br> <br> ------------------------------------------------------------------------ <br> <br> ------------------------------------------------------------------------- <br> This SF.net email is sponsored by DB2 Express <br> Download DB2 Express C - the FREE version of DB2 express and take <br> control of your XML. No limits. Just data. Click to get it now. <br> <a class="moz-txt-link-freetext" href="http://sourceforge.net/powerbar/db2/">http://sourceforge.net/powerbar/db2/</a> <br> <br> <br> ------------------------------------------------------------------------ <br> <br> _______________________________________________ <br> Matplotlib-users mailing list <br> <a class="moz-txt-link-abbreviated" href="mailto:Mat...@li...">Mat...@li...</a> <br> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/matplotlib-users">https://lists.sourceforge.net/lists/listinfo/matplotlib-users</a> <br> </blockquote> </blockquote> </body> </html>
The contour routine does not have update functionality similar to that of an image; you have no choice but to generate a new ContourSet object each time. Eric Yoav Avitzour wrote: > Hi, > > > I'm trying to create 2D animations using contours. Is there a > recommended way to do this? I was hoping to follow the same route as in > the dynamic_image_gtkagg.py example, but for some reason set_array > doesn't work for me with contour. It doesn't produce any error, but the > figure just doesn't get updated after calling canvas.draw(). > > > Matplotlib version: 0.87.7 > > > Thanks, > > Yoav > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body dir="ltr" bgcolor="#ffffff" text="#000000"> <p style="margin-bottom: 0cm; margin-top: 0pt;">Hi,</p> <p style="margin-bottom: 0cm; margin-top: 0pt;"><br> </p> <p style="margin-bottom: 0cm; margin-top: 0pt;">I'm trying to create 2D animations using contours. Is there a recommended way to do this? I was hoping to follow the same route as in the dynamic_image_gtkagg.py example, but for some reason set_array doesn't work for me with contour. It doesn't produce any error, but the figure just doesn't get updated after calling canvas.draw().<br> </p> <p style="margin-bottom: 0cm; margin-top: 0pt;"><br> </p> <p style="margin-bottom: 0cm; margin-top: 0pt;">Matplotlib version: 0.87.7</p> <p style="margin-bottom: 0cm; margin-top: 0pt;"><br> </p> <p style="margin-bottom: 0cm; margin-top: 0pt;">Thanks,</p> <p style="margin-bottom: 0cm; margin-top: 0pt;">Yoav<br> </p> </body> </html>
Gary Ruben wrote: > Hi Mark, > this thread may help: > http://thread.gmane.org/gmane.comp.python.numeric.general/13399/focus=13421 > > Essentially, pylab uses a compatibility layer to ease the task of > supporting the three array packages - currently this uses the Numeric > version of the ones and zeros functions giving the behaviour you observe > - this will be fixed when pylab drops support for the older packages, > which should be soon. What we will do is drop the use of numerix internally, but the numerix module will almost certainly remain, presumably with the Numeric and numarray support removed; so numerix will still use numpy's own "oldnumeric" compatibility layer, and I expect pylab will still import from it--at least, by default. The intention is to avoid breaking things unnecessarily. I can imagine possible variations, such as using an rc param to tell pylab whether to import from plain numpy or from oldnumeric, and splitting pylab into core pylab functions (figure, show, etc.) versus the convenience all-in-one namespace (mostly from numpy); but we will take one step at a time. Eric > > Gary R. > > Mark Bakker wrote: >> Hello list - >> >> I am confused about the part of numpy that pylab imports. >> Apparently, pylab imports 'zeros', but not the 'zeros' from numpy, as it >> returns integers by default, rather than floats. >> The same holds for 'ones' and 'empty'. >> Example: >> >>> from pylab import * >> >>> zeros(3) >> array([0, 0, 0]) >> >>> from numpy import * >> >>> zeros(3) >> array([ 0., 0., 0.]) >> >> Can this be fixed? Any explanation how this happens? Pylab just imports >> part of numpy, doesn't it? >> >> Thanks, >> >> Mark > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
On 4/24/07, Tommy Grav <tg...@ma...> wrote: > I have a plot where the x axis ticks are given as > > 0.1 0.15 0.20 0.025 0.30 0.35 > > with +3.732e2 given in the lower right of the axis. > How can I force the ticks to have > 373.3 373.35 .... > It always helps if you give us complete examples that we can run -- then we can give you back tested answers we know work. You should be able to tweak the axes.formatter.limits rc param. Something like import matplotlib matplotlib.rcParams['axes.formatter.limits'] = -15,15 before you make your plots. If this doesn't work, please post a complete example. Darren, for the range he is using according to his post, I wouldn't expect the exponential formatting to be kicking in since log10(.4) = -.4 which is within the default range. JDH
On 4/23/07, bre...@un... <bre...@un...> wrote: > > I'm producing series of plots (spectograms) in a program loop using imshow > and saving each plot to .png. Even though I close() each plot after each > savefig(...), the memory does not appear to be freed up, and the memory > useage goes up and up as the program runs (and stalls the computer as it > thrashes the page file). > > This is the essence of the code: > > for i in range(..): > pylab.imshow(logPSDs[i]...) > pylab.colorbar() > pylab.savefig(plotName[i]) > pylab.close() The following code does not appear to leak: import matplotlib matplotlib.use('Agg') from matplotlib.cbook import report_memory import matplotlib.numerix as nx import pylab for i in range(100): print i, report_memory(i) fig = pylab.figure(1) X = nx.mlab.rand(100,100) pylab.imshow(X) pylab.colorbar() pylab.savefig('_test%d'%i) pylab.close(1) Are you running your program in a GUI? Eric points out there are some leaks in the GUI canvases which we have not succeeded in tracking down. If you only want image generation, you can use an image backend w/o leaks. The one thing to be careful of is to make sure you are not overplotting multiple images onto the same Axes, eg by clearing the figure or axes if you are reusing it. JDH > > Is there anything that I should be doing to stop this memory "wastage"? > (The plots themselves are fantastic!) > UNITED GROUP > This email message is the property of United Group. The information in this > email is confidential and may be legally privileged. It is intended solely > for the addressee. Access to this email by anyone else is unauthorised. If > you are not the intended recipient, you may not disclose, copy or distribute > this email, nor take or omit to take any action in reliance on it. United > Group accepts no liability for any damage caused by this email or any > attachments due to viruses, interference, interception, corruption or > unauthorised access. > If you have received this email in error, please notify United Group > immediately by email to the sender's email address and delete this document. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
bre...@un... wrote: > > I'm producing series of plots (spectograms) in a program loop using > imshow and saving each plot to .png. Even though I close() each plot > after each savefig(...), the memory does not appear to be freed up, and > the memory useage goes up and up as the program runs (and stalls the > computer as it thrashes the page file). > > This is the essence of the code: > > for i in range(..): > pylab.imshow(logPSDs[i]...) > pylab.colorbar() > pylab.savefig(plotName[i]) > pylab.close() > > Is there anything that I should be doing to stop this memory "wastage"? > (The plots themselves are fantastic!) There seem to be big memory leak problems with all interactive backends. It looks like you don't need an interactive backend. If this is the case, then instead of starting with "import pylab", try: import matplotlib matplotlib.use('Agg') import pylab Eric
I have a plot where the x axis ticks are given as 0.1 0.15 0.20 0.025 0.30 0.35 with +3.732e2 given in the lower right of the axis. How can I force the ticks to have 373.3 373.35 .... and so on? Cheers Tommy
I recently attended a fantastic workshop by John Hunter and Fernando Perez, and John pointed out that I really do want to play with the axis objects directly. In case someone googles for this later on, here's how to do it for two boxes: ax = axes([0.1, 0.3, 0.8, 0.6]) plot(rand(12)) a2 = axes([0.1, 0.1, 0.8, 0.15]) plot(rand(12)) On 3/21/07, Eric Firing <ef...@ha...> wrote: > John Hunter wrote: > > On 3/21/07, Michael Lerner <mgl...@gm...> wrote: > >> Hi, > >> > >> I want to make a figure that has three subplots. The top one should > >> be a big, mostly square thing. The bottom two should be rectangular > >> things. That is, I want it to look like this: > >> > >> XXXXX > >> XXXXX > >> XXXXX > >> XXXXX > >> > >> XXXXX > >> XXXXX > >> > >> XXXXX > >> XXXXX > >> > >> so, I'm using subplot(311), subplot(312), subplot(313). But, things > >> are getting resized so that each of the rows has the same height. > >> That really messes up the aspect ratio for my top row. > > > > The following might hrlp: > > > > ax1 = subplot(211) > > ax2 = subplot(413) > > ax3 = subplot(414) > > > > JDH > > And if you want to tweak the positions you can use, e.g., oldpos = > ax1.get_position() to find out the present position, and > ax1.set_position(newpos) to change it. The position rectangles are > [left, bottom, width, height] in relative coordinates--that is, > fractions of the figure width and height. > > If you want to control the aspect ratio of the data without changing the > position rectangle (e.g. after adjusting it as above), use > ax1.set_aspect(aspect, adjustable='datalim'). > > Eric > -- Biophysics Graduate Student Carlson Lab, University of Michigan http://www.umich.edu/~mlerner http://lernerclan.net
Hi Mark, this thread may help: http://thread.gmane.org/gmane.comp.python.numeric.general/13399/focus=13421 Essentially, pylab uses a compatibility layer to ease the task of supporting the three array packages - currently this uses the Numeric version of the ones and zeros functions giving the behaviour you observe - this will be fixed when pylab drops support for the older packages, which should be soon. Gary R. Mark Bakker wrote: > Hello list - > > I am confused about the part of numpy that pylab imports. > Apparently, pylab imports 'zeros', but not the 'zeros' from numpy, as it > returns integers by default, rather than floats. > The same holds for 'ones' and 'empty'. > Example: > >>> from pylab import * > >>> zeros(3) > array([0, 0, 0]) > >>> from numpy import * > >>> zeros(3) > array([ 0., 0., 0.]) > > Can this be fixed? Any explanation how this happens? Pylab just imports > part of numpy, doesn't it? > > Thanks, > > Mark
Matthias Michler <Mat...@gm...> writes: > The result really surprises me (using module time): > time >plot< 9.7 sec > time >setp< 9.9 sec <- slower than plot! > time >.set< 5.0 sec > > So my question is: Is this the expected / desired behaviour? I think it is not surprising. The setp function (and much of the pylab interface in general) is designed for convenience in interactive use, and thus it handles various useful cases such as a list of objects as the first argument, and different ways to specify properties (e.g. setp(object, prop='value') and setp(object, 'prop', 'value')). Eventually it does the equivalent of (getattr(object, 'set_%s'%prop))(value) which is obviously much slower than the direct object.set_prop(value) So, if you are writing a program, you are better off using the OO interface. -- Jouni K. Seppänen http://www.iki.fi/jks
Hello everybody, to reset data I'm using pylab.setp instead of the methods line.set_xdata, line.set_ydata believing there would be no obvious difference in behaviour. (Maybe I not really get what is going on in matplotlib.artist.py.) The taken time is of quite big importance to me because I really often reset my data. That's why I set up a little program investigating the taken time using plot, setp, line.set_xdata/ydata ( I attached it). The result really surprises me (using module time): time >plot< 9.7 sec time >setp< 9.9 sec <- slower than plot! time >.set< 5.0 sec So my question is: Is this the expected / desired behaviour? best regards and thanks in advance for any hints, Matthias
Hi, a friend gave me the little example I attached. He uses 'gca().images = []' to delete the images. I'm not sure about memory usage of that method, but I think deleting images (using clf() or the above way) is quite important, because otherwise one more image is drawn above the existing ones. best regards, Matthias >---------------------------------------------------------------------------------------------------------- import pylab import numpy N = 100 # to generate a matrix A = numpy.ones(N)[numpy.newaxis, :]*numpy.arange(N)[:, numpy.newaxis]/(N-1) pylab.figure(0) ax = pylab.subplot(111) for item in pylab.cm.cmapnames[:3]: # plot some cmap examples print " doing cm." + item eval("pylab.imshow(A, cmap=pylab.cm."+item+", interpolation='nearest')") pylab.savefig(item+'.png') ax.images = [] # delete images >--------------------------------------------------------------------------------------------------------- On Tuesday 24 April 2007 00:48, bre...@un... wrote: > I'm producing series of plots (spectograms) in a program loop using imshow > and saving each plot to .png. Even though I close() each plot after each > savefig(...), the memory does not appear to be freed up, and the memory > useage goes up and up as the program runs (and stalls the computer as it > thrashes the page file). > > This is the essence of the code: > > for i in range(..): > pylab.imshow(logPSDs[i]...) > pylab.colorbar() > pylab.savefig(plotName[i]) > pylab.close() > > Is there anything that I should be doing to stop this memory "wastage"? > (The plots themselves are fantastic!) > > UNITED GROUP > This email message is the property of United Group. The information in this > email is confidential and may be legally privileged. It is intended solely > for the addressee. Access to this email by anyone else is unauthorised. If > you are not the intended recipient, you may not disclose, copy or > distribute this email, nor take or omit to take any action in reliance on > it. United Group accepts no liability for any damage caused by this email > or any attachments due to viruses, interference, interception, corruption > or unauthorised access. If you have received this email in error, please > notify United Group immediately by email to the sender's email address and > delete this document.
"Mark Bakker" <ma...@gm...> writes: > Can this be fixed? Any explanation how this happens? Pylab just > imports part of numpy, doesn't it? It imports numerix, a compatibility layer for numeric, numarray and numpy. I think the plan is to remove numerix soon and just use numpy, but in the meantime, I suggest adding "from numpy import *" after "from pylab import *". -- Jouni K. Seppänen http://www.iki.fi/jks
Hello list - I am confused about the part of numpy that pylab imports. Apparently, pylab imports 'zeros', but not the 'zeros' from numpy, as it returns integers by default, rather than floats. The same holds for 'ones' and 'empty'. Example: >>> from pylab import * >>> zeros(3) array([0, 0, 0]) >>> from numpy import * >>> zeros(3) array([ 0., 0., 0.]) Can this be fixed? Any explanation how this happens? Pylab just imports part of numpy, doesn't it? Thanks, Mark
Mhm, thank you for testing - it doesn't work here unless I scale everthing. Bug? Linux, >>> numpy.__version__ '1.0.1' >>> matplotlib.__version__ '0.87.3'
On Apr 23, 2007, at 5:16 PM, atlas wrote: > > Basically, I would like to be able to create objects of arbitrary type > (possibly just a string, but I'd like to have some flexibility if > possible), > create relationships between the objects, and have a graph > automagically > space them out on the given canvas so they are as clear as possible. It sounds like graphviz is the right tool for your application. http://www.graphviz.org Ken
Hi, > Mine is a project of tracing a program flow. I'd like to be able > to create a > graph with X number of related boxes (representing function calls), > with > vertexes between them (representing calls from one to another). > > Basically, I would like to be able to create objects of arbitrary type > (possibly just a string, but I'd like to have some flexibility if > possible), > create relationships between the objects, and have a graph > automagically > space them out on the given canvas so they are as clear as possible. You can look into NetworkX: https://networkx.lanl.gov/wiki It's probably not exactly what you're after, but it's a (rather well done) general purpose graph library for Python and has some canned facilities to draw resulting graphs to the screen (via matplotlib). You can also save graphs in graphviz format for external processing via dot/graphviz, which is handy ... Hope that helps, -steve
atlas wrote: > Mine is a project of tracing a program flow. I'd like to be able to create a > graph with X number of related boxes (representing function calls), with > vertexes between them (representing calls from one to another). > So the first question is, am I in the wrong place? Is this outside the scope > of matplotlib? If so, is there another Python library I need to check out? I don't' think mpl is the perfect tool for this kind of thing. You could probably make it work, but that's not what it's designed for. Do you have a GUI toolkit in mind? If wxPython: FloatCanvas or OGL would probably work well. If tkInter: The tk Canvas is very flexible, and I wouldn't be surprised if someone has written a tool on top of it to help with this sort of thing. If GTK or QT: I have no idea, but I"d look -- I'll bet there is something. If paper copy: check out ReportLab for pdf generating. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no...
I'm producing series of plots (spectograms) in a program loop using imshow and saving each plot to .png. Even though I close() each plot after each savefig(...), the memory does not appear to be freed up, and the memory useage goes up and up as the program runs (and stalls the computer as it thrashes the page file). This is the essence of the code: for i in range(..): pylab.imshow(logPSDs[i]...) pylab.colorbar() pylab.savefig(plotName[i]) pylab.close() Is there anything that I should be doing to stop this memory "wastage"? (The plots themselves are fantastic!) UNITED GROUP This email message is the property of United Group. The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised. If you are not the intended recipient, you may not disclose, copy or distribute this email, nor take or omit to take any action in reliance on it. United Group accepts no liability for any damage caused by this email or any attachments due to viruses, interference, interception, corruption or unauthorised access. If you have received this email in error, please notify United Group immediately by email to the sender's email address and delete this document.
Hello all, I'm a text-mode coder by nature. I have done some GUI stuff, but not really graphing or plotting-related. The last time I touched graphics was using Java2D about 5 years ago. Perhaps your collective wisdom could save me from heading down too many wrong paths, and help me to use this powerful library quickly and effectively? Mine is a project of tracing a program flow. I'd like to be able to create a graph with X number of related boxes (representing function calls), with vertexes between them (representing calls from one to another). Basically, I would like to be able to create objects of arbitrary type (possibly just a string, but I'd like to have some flexibility if possible), create relationships between the objects, and have a graph automagically space them out on the given canvas so they are as clear as possible. Beyond that, I'd like to be able to change the color of some or all of the text in the boxes. This could be used for any number of things, but one option would be to toggle the title between black and red to indicate that a function was executed. That way not only do I get to see the related subroutines, but I also get to see which was executed when. So the first question is, am I in the wrong place? Is this outside the scope of matplotlib? If so, is there another Python library I need to check out? If I'm in the right place, which part of the vast matplotlib should I look at first for these goals? Thank you all in advance!