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
|
From: Perry G. <pe...@st...> - 2004-04-29 17:51:03
|
John Hunter wrote: > You can do this with string methods already. The question is: is it > worth adding a to_numerix and/or from_numerix method for performance > and convenience to directly access the agg pixel buffer representing > the entire figure canvas. The (smallish) downside of the latter is > that currently backend_agg does not depend on Numeric/numarray at all. > > There are a couple of ways to go here and I think it would be useful > to know how people would want to use this functionality. In the > example below, I show how to get the agg pixel buffer as an rgb string > and either convert it to an array or pass it to PIL. I need to add > the tostring_rgba equivalent - I added tostring_rgba this as a helper > for backend ps which doesn't need alpha. > > If all that is needed is a way to get at the contents as an array, > then it may be enough to wrap the example code below in a helper > function or appropriate class method. But if one wants to be able to > directly manipulate the contents of the agg rgba pixel array using > numeric and then pass this back to agg, more will be needed. > > So knowing what people need this for, and how critical performance > issues will be in these cases, is important in deciding which tack to > take. > It's not a strong driver for us at the moment, but I agree that it depends on how people see using this capability. For our part (and this is just limited to my knee-jerk reaction, there may be other uses that I can't think of but others may) I would guess the most common use would be to create some sort of image with overlays (contours, legends, etc) that one wants to write out to one of the scientific data formats that are used to store scientific images. Normally these would be array-aware and so arrays make a good intermediary. Perhaps the values would be manipulated as well as arrays but that seems less likely. I'll see if I can conceive of any other uses. Saving memory copying doesn't seem to be that important for these sorts of uses since they would not be frequent, nor involve gigantic images that couldn't stand to be copied. An associated question is how one easily maps a monochromatic image that is displayed in matplotlib back into a monochromatic array. Normally it's going to be converted to rgba even if rgba is not really needed. Is there any simple way of mapping it back to intensity (histogram of the rgba values to determine if such a mapping exists?). Hmmm. Perry |
From: John H. <jdh...@ac...> - 2004-04-29 17:31:21
|
>>>>> "danny" == danny shevitz <dan...@ya...> writes: danny> I'm a new user to matplotlib and I don't believe that danny> legends play nicely with errorbars. My guess is that each danny> errorbar counts as a seperate graph, which screws up the danny> counting. Here's some code. Yes, in this case you are going to have to give legend a little help. The auto legend only works if the line instances correspond to the number of legend strings. In the case of error bar, there are a lot of extra lines in the plot. But you can pass the lines you want to label to legend. In the case of errorbar, the line handles are returned separately, one part for the line markers and one part for the error bars. So it is easy to get the legend you want from matplotlib.matlab import * t = arange(0.1, 4, 0.1) s = exp(-t) e = 0.1*abs(randn(len(s))) figure(1) l0, errlines0 = errorbar(t, s, e, fmt='bo-') l1, errlines1 = errorbar(t, s+1, e, fmt='ro-') xlabel('Distance (m)') ylabel('Height (m)') title('Mean and standard error as a function of distance') legend((l0, l1), ('legend 1', 'legend 2')) show() |
From: danny s. <dan...@ya...> - 2004-04-29 17:22:19
|
I'm a new user to matplotlib and I don't believe that legends play nicely with errorbars. My guess is that each errorbar counts as a seperate graph, which screws up the counting. Here's some code. thanks, Danny ##################################################### from matplotlib.matlab import * t = arange(0.1, 4, 0.1) s = exp(-t) e = 0.1*abs(randn(len(s))) figure(1) errorbar(t, s, e, fmt='bo-') errorbar(t, s+1, e, fmt='ro-') xlabel('Distance (m)') ylabel('Height (m)') title('Mean and standard error as a function of distance') legend(('legend 1', 'legend 2')) show() ##################################################### __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover |
From: John H. <jdh...@ac...> - 2004-04-29 17:18:08
|
>>>>> "Perry" == Perry Greenfield <pe...@st...> writes: Perry> But it does make sense to have a general function to read Perry> out an AGG rendered buffer to a Numeric/numarray array Perry> doesn't it? Seems like another good thing to add to the Perry> list (unless one can do that already, I forget the details Perry> of using AGG by itself). You can do this with string methods already. The question is: is it worth adding a to_numerix and/or from_numerix method for performance and convenience to directly access the agg pixel buffer representing the entire figure canvas. The (smallish) downside of the latter is that currently backend_agg does not depend on Numeric/numarray at all. There are a couple of ways to go here and I think it would be useful to know how people would want to use this functionality. In the example below, I show how to get the agg pixel buffer as an rgb string and either convert it to an array or pass it to PIL. I need to add the tostring_rgba equivalent - I added tostring_rgba this as a helper for backend ps which doesn't need alpha. If all that is needed is a way to get at the contents as an array, then it may be enough to wrap the example code below in a helper function or appropriate class method. But if one wants to be able to directly manipulate the contents of the agg rgba pixel array using numeric and then pass this back to agg, more will be needed. So knowing what people need this for, and how critical performance issues will be in these cases, is important in deciding which tack to take. """ Use backend agg to access the figure canvas as an RGB string and then convert it to a Numeric array and pass the string it to PIL for rendering """ from matplotlib.matlab import * from matplotlib.backends.backend_agg import FigureCanvasAgg plot([1,2,3]) canvas = get_current_fig_manager().canvas agg = canvas.switch_backends(FigureCanvasAgg) agg.draw() s = agg.tostring_rgb() # get the width and the height to resize the matrix l,b,w,h = agg.figure.bbox.get_bounds() w, h = int(w), int(h) X = fromstring(s, UInt8) X.shape = h, w, 3 import Image im = Image.fromstring( "RGB", (w,h), s) im.show() |
From: Perry G. <pe...@st...> - 2004-04-29 16:02:10
|
John Hunter wrote: > > At this time the proliferation of backends was beginning to become a > maintenance hassle, and Perry Greenfield had a bright idea: another > backend! But not just any old backend, the mother of all backends, > that could be used not only for pure image generation but used to > render directly into the GUI canvases. GTK and WX use native GUI > drawing code to render the figure, so we not only need to support not > only all the widget-set related stuff, but all the drawing stuff as > well. > Well, it wasn't really my idea. Eric Jones adopted this approach for Chaco and it seemed like a good way of adding lots of functionality and removing gui plotting depenencies. So I basically passed the idea along. > Perry |
From: Perry G. <pe...@st...> - 2004-04-29 15:51:32
|
> >>>>> "Flavio" == Flavio Codeco Coelho <fcc...@fi...> writes: > > Flavio> Hi, Is there a way to get the output of a plot (the > Flavio> bitmap) and assign it to a bitmap object such as wxBitmap > Flavio> or wxImage? I know how to do this by saving the figure > Flavio> and loading it to wxBitmap. But there must be a way to do > Flavio> it directly. Does anyone know how to do this? > > Using the OO FigureCanvasWxAgg API, which I think you are using, you > already have the canvas instance. The call to canvas.draw() sets the > bitmap instance, which you can access as canvas.bitmap. So after any > draw command canvas.bitmap is updated. > > You can take a look at > matplotlib.backends.backend_wxagg.FigureCanvasWxAgg.draw to see how > the backend is using agg to render, create a wxImage and wxBitmap. > You can either use the result of these calls (canvas.bitmap) or just > make them yourself in another part of your code. > > JDH > But it does make sense to have a general function to read out an AGG rendered buffer to a Numeric/numarray array doesn't it? Seems like another good thing to add to the list (unless one can do that already, I forget the details of using AGG by itself). Perry |
From: John H. <jdh...@ac...> - 2004-04-29 15:36:32
|
>>>>> "Flavio" == Flavio Codeco Coelho <fcc...@fi...> writes: Flavio> Hi, Is there a way to get the output of a plot (the Flavio> bitmap) and assign it to a bitmap object such as wxBitmap Flavio> or wxImage? I know how to do this by saving the figure Flavio> and loading it to wxBitmap. But there must be a way to do Flavio> it directly. Does anyone know how to do this? Using the OO FigureCanvasWxAgg API, which I think you are using, you already have the canvas instance. The call to canvas.draw() sets the bitmap instance, which you can access as canvas.bitmap. So after any draw command canvas.bitmap is updated. You can take a look at matplotlib.backends.backend_wxagg.FigureCanvasWxAgg.draw to see how the backend is using agg to render, create a wxImage and wxBitmap. You can either use the result of these calls (canvas.bitmap) or just make them yourself in another part of your code. JDH |
From: John H. <jdh...@ac...> - 2004-04-29 15:15:57
|
>>>>> "Kuzminski," == Kuzminski, Stefan R <SKu...@fa...> writes: Stefan> Hi, I have a scatter plot, I need each data to Stefan> rendered as a single point ( or symbol ), rather than Stefan> a circle. The axis are not the same, so the circles Stefan> are distorted in to ovals. Maybe I should be using a Stefan> different plot? This is a "feature" of scatter that has annoyed many people. I'll see if I can come up with something better. To plot a dot, use plot(x, y, '.') # draws a *very small* circle or plot(x, y, ',') # draws a pixel To plot circles (not ellipses) on axes with different scales, use plot(x, y, 'o') # draws a circle In the latter case you can set the marker size attribute in points plot(x, y, 'o', markersize=6) # draws a circle with a 6 point radius As long as you want the markers to be the same size and color, you should use plot. If you need either the size or color to vary, you need scatter. In which case I need to get the transform issue fixed up sooner rather than later. JDH |
From: Darren D. <dd...@co...> - 2004-04-29 15:13:37
|
>It's a good point - the demos don't exist in the exe distro; I think >this is typical for binary distributions. I think a note on the win32 >installing section pointing out that there is an examples dir in the >zip file might be helpful. But if there is a standard way for >including examples in a bdist_wininst and I'm missing it, please let >me know. How about a .zip of just the examples? Then they will not be overlooked. |
From: John H. <jdh...@ac...> - 2004-04-29 15:08:08
|
>>>>> "Philippe" == Philippe Strauss <phi...@pr...> writes: Philippe> The same case as explained in my previous email, but Philippe> supplying all values converted to floats: Responding to both points at once... The log10 issue you experienced appears to be a ufunc problem. I'm using the Numeric log10 but in this module don't need it since I'm not opertating over arrays. Replacing all instances og log10 with math.log10 in the matplotlib.ticker module. Philippe> File Philippe> "/usr/lib/python2.2/site-packages/matplotlib/ticker.py", Philippe> line 202, in pprint_val if abs(x-int(x))<0.0001*d: Philippe> return '%d' % int(x + 0.5) OverflowError: float too Philippe> large to convert You should be able to replace the ints with longs here with no troubles. Likewise in the LogFormatter class on or around line 234 you should do the same. I wrote this little example to add to our poor man's unit testing suite from matplotlib.matlab import * x = arange(1000) + 2**32 subplot(211) plot(x,x) subplot(212) loglog(x,x) show() With the changes above, it plots but the log ticker apparently fails to handle this case so I'll look into that. I think it is because there are no decades in the plot range. If you can think of a more suitable test case for plotting large numbers, please pass it on and I'll include it. Thanks, John Hunter |
From: John H. <jdh...@ac...> - 2004-04-29 14:53:33
|
>>>>> "Darren" == Darren Dale <dd...@co...> writes: Darren> I've maybe posted too many times today (:-/), but I have Darren> one last comment before I settle in to look at all the Darren> nice demos that you awesome dudes have put together. I Darren> didnt know these demos existed, I didnt find them on my Darren> file system when I searched through the folders that the Darren> windows .exe had installed. I downloaded the .zip package Darren> and extracted the samples from there, then did a windows Darren> search to see if i just hadnt been looking in the right Darren> place. The results: it found the examples from the zip Darren> file in C:\[path]\examples, and it found another set of Darren> examples in matplotlib-0.53.1/examples. But note: there is Darren> no mention of C:\... for this set of files, and they dont Darren> show up in windows It's a good point - the demos don't exist in the exe distro; I think this is typical for binary distributions. I think a note on the win32 installing section pointing out that there is an examples dir in the zip file might be helpful. But if there is a standard way for including examples in a bdist_wininst and I'm missing it, please let me know. I'm adding to the win32 installing section The windows installer *.exe on the download page contains all the code you need to get up and tunning. But if you want to try the many demos that come in the matplotlib src distribution, download the zip file and look in the examples subdir. It's very helpful of you to let us know all the confusions you experience in the beginning and where the web site isn't too enlightening. All of us veterans have forgotten what we didn't know already, so keep it up. JDH |
From: Gary R. <ga...@em...> - 2004-04-29 13:25:31
|
A. Same as for any Python script, just give your script a .pyw extension - it works on my Win98 system. I have matplotlib configured to use the GTKAgg backend. Gary Ruben <snip> > > So this isn't a scipy question, but since it came up during a gplt > > question I'll ask anyway. > > > > I started using matplotlib for plotting my histograms and a python.exe > > shell always opens. Is there any way to get rid of this, e.g. run > > pythonw.exe instead. > > > > thanks, > > Danny -- ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm |
From: Kuzminski, S. R <SKu...@fa...> - 2004-04-29 12:53:23
|
Hi, =20 I have a scatter plot, I need each data to rendered as a single point ( or symbol ), rather than a circle. The axis are not the same, so the circles are distorted in to ovals. Maybe I should be using a different plot? =20 thanks, Stefan=20 |
From: Gary P. <pa...@in...> - 2004-04-29 12:18:18
|
FYI, there is a matplotlib discussion list, too. I'm sending this there. http://sourceforge.net/mail/?group_id=80706 -g ----- Original Message ----- From: "danny shevitz" <dan...@ya...> To: "scipy" <sci...@sc...> Sent: Wednesday, April 28, 2004 6:18 PM Subject: [SciPy-user] matplotlib question > So this isn't a scipy question, but since it came up during a gplt > question I'll ask anyway. > > I started using matplotlib for plotting my histograms and a python.exe > shell always opens. Is there any way to get rid of this, e.g. run > pythonw.exe instead. > > thanks, > Danny > > > > > __________________________________ > Do you Yahoo!? > Win a $20,000 Career Makeover at Yahoo! HotJobs > http://hotjobs.sweepstakes.yahoo.com/careermakeover > > _______________________________________________ > SciPy-user mailing list > Sci...@sc... > http://www.scipy.net/mailman/listinfo/scipy-user |
From: John N S G. <jn...@eu...> - 2004-04-29 10:14:44
|
> Sure. But my recollection was that gui_thread needed a lot of work > (Eric Jones told me at least a month!), and it could well be that > one is needed for each gui (it does mapping of gui requests from > one thread to another or something like that so that a thread > running the mainloop allows the python interactive loop to run > separately. It would be nice if gui's played well with each other, > but I don't know if that is easy to do (or even workable for > all combinations). If someone knows how to do this sort of thing > that would be great, but we don't (neither the resources or expertise). > At the moment I take the position that it is simplest not to mix > gui's. The current rule of thumb should be that if you want to > use a shell that runs under a gui, you need the back end in matplotlib > to go with that gui. > > I hope someone can make me a liar on that. > > Perry Some time back I experimented with gui_thread. One fairly serious problem with gui_thread is that it is important which thread wxpython gets imported into. Eric worked around this by printing a message once gui_thread had been imported which, interactively was a signal that it was ok to start using it. There is a README in the gui_thread package which has more details on this problem. Now I was interested in gui_thread for two reasons: interactive plotting with chaco and creating python COM objects which fired up wxPython gui's. The latter is a bit challenging + the solution was to run the gui in a different thread. So I started off using gui_thread. I had to re-work the gui_thread code a bit, the trick was to do a bit less work when importing gui_thread so that I had better control of when wxpython was imported and hence could make sure it all happened in the right threads. I fed the fixes back to Eric, but I don't think he wanted to change the semantics of gui_thread + as he seems to say it really needs a good re-think. Meanwhile, Richard Emslie, who works with me took these ideas and has created a robust system for running this stuff in another thread. Richard's stuff works with a package called earthenware that we're intending to release as open source. Earthenware contains a lot of our generic code that it really makes no sense for us to keep proprietary. Now one thing we are doing in earthenware is creating objects which separate the description of a GUI from its actual implementation. The description side is not toolkit specific. This helps a lot with the two thread problem, since the gui descriptions can be created in one thread and implemented in the other thread + you only need to import wx in the thread that does the implementation. One other nice thing with this approach is you can build servers which create the gui descriptions, pickle up the objects and send them down a socket to a remote client which turns them into a GUI. Currently, the only toolkit we have gui code for is wxpython + the set of 'gui components' we have are a bit limited + some need a little re-thinking, but the basic framework is proving powerful. We keep threatening to look at a pygtk version, which i suspect wouldn't be huge amounts of work. We're planning on going to Europython in June + would be happy to meet up with anyone interested in this stuff. The earthenware site is here: http://www.earthenware-services.org/earthenwarewiki/. As yet we haven't put the code I'm describing above, we really need to pull our fingers out and get the code out there -- will try and get some sort of tarball out there very soon. For now all you will find is a python package which writes gnumeric spreadsheets. John |
From: Philippe S. <phi...@pr...> - 2004-04-29 10:09:25
|
The same case as explained in my previous email, but supplying all values converted to floats: File "/usr/lib/python2.2/site-packages/matplotlib/ticker.py", line 202, in pprint_val if abs(x-int(x))<0.0001*d: return '%d' % int(x + 0.5) OverflowError: float too large to convert |
From: Philippe S. <phi...@pr...> - 2004-04-29 09:59:03
|
Hello, Maybe I've found an error in matplotlib. When trying to plot an SNMP counter (unsigned 32), I got an error File "/usr/lib/python2.2/site-packages/matplotlib/ticker.py", line 571, in get_locator ld = log10(d) AttributeError: 'long' object has no attribute 'log10' Full trace in the attached file. it is triggered only when calling ax.set_ylim(0, 2**32-1) or some other values larger than approx 2 * 10^9 |
From: Darren D. <dd...@co...> - 2004-04-29 04:41:52
|
>Gary forwarded: >* Go to Control Panel->Display properties->Apperance tab, and >set all fonts to Tahoma (or any other TrueType font). Interesting, I since am getting complaints about the Tahoma fonts. I added this line to pango.aliases, and it seems to have worked: tahoma = "times new roman,angsana new,mingliu,simsun,gulimche,ms gothic,latha,mangal,code2000" |
From: Darren D. <dd...@co...> - 2004-04-28 21:14:42
|
>Darren Dale wrote: > > I was thinking about the first example in the tutorial. On windows, TkAgg > > is the default backend, at least for the precompiled windows version. If > > Idle is run with -n, the show() command must be omitted, or the window > will > > not render. >Todd Miller wrote: >Not in my experience. What's the command sequence you're executing? Sorry guys, I made a mistake here. I was pasting from matplotlib.matlab import * plot([1,2,3,4]) show() as a block right into Idle -n. Running the commands one at a time does work. I've maybe posted too many times today (:-/), but I have one last comment before I settle in to look at all the nice demos that you awesome dudes have put together. I didnt know these demos existed, I didnt find them on my file system when I searched through the folders that the windows .exe had installed. I downloaded the .zip package and extracted the samples from there, then did a windows search to see if i just hadnt been looking in the right place. The results: it found the examples from the zip file in C:\[path]\examples, and it found another set of examples in matplotlib-0.53.1/examples. But note: there is no mention of C:\... for this set of files, and they dont show up in windows explorer. |
From: John H. <jdh...@ac...> - 2004-04-28 21:09:24
|
>>>>> "Jos=E9" =3D=3D Jos=E9 Alexandre Nalon <na...@te...> writes: Jos=E9> Yes, it was the version I downloaded and tried. I tried the Jos=E9> simple_plot.py running, and I got the exact picture shown in Jos=E9> the homepage (the quality of the image still amazes me). The Jos=E9> window is shown without any problems, but with the figure Jos=E9> saved in a file, it results in a figure bigger than the Jos=E9> page, so the result is clipped. OK, the fix is in. For the record there were three problems that needed fixing. 1) backend_tkagg, gtkagg and wxagg were doing way to much work on a call to print_figure. All that is needed is to forward the call onto agg, which now handles ps detection itself. 2) When creating figures with the PS backend (not switching backends as in tkagg->ps) the matlab interface needed to detect this situation and override any default DPI that is set since PS is always 72. When the figures used to be coupled to the backend, this happened at the backend level. Apparently something was lost in translation. 3) Any time the figure dpi is set the new Figure.resize method needs to be called so it can update it's bounding box - not too elegant but works for now. This call forwards the resize call down to it's axes, so the axes resize commands no longer need to be made. Fortunately, all the fixes were a the python level, so you should just be able to unzip this file in your site-packages dir and be good to go http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib.zip CVS is also updated. Let me know how it goes... JDH |
From: Perry G. <pe...@st...> - 2004-04-28 21:04:25
|
One more thought along this line. Perhaps it's possible for matplotlib to inspect whether or not any of the supported gui's has already been imported and make that the default. It seems like a sensible rule to me. If none are found, then all the other mechanisms apply. Perry |
From: Perry G. <pe...@st...> - 2004-04-28 21:01:47
|
> Darren> I was thinking about the first example in the tutorial. On > Darren> windows, TkAgg is the default backend, at least for the > Darren> precompiled windows version. If Idle is run with -n, the > Darren> show() command must be omitted, or the window will not > Darren> render. Interactive2.py will try to render the window and > Darren> then hang, as will pycrust. I think the first thing a > Darren> newbie to matplotlib wants to do is open their favorite > Darren> shell interface and make sure they can reproduce the first > Darren> example in the tutorial. > > Hi Darren, > > This is a problem. It may be time to look into Pearu Peterson's > gui_thread which was developed for chaco but is easily decoupled from > scipy. It would be nice if the various backends played nicely with > the various IDEs. (One for the priorities list, Perry?) > Sure. But my recollection was that gui_thread needed a lot of work (Eric Jones told me at least a month!), and it could well be that one is needed for each gui (it does mapping of gui requests from one thread to another or something like that so that a thread running the mainloop allows the python interactive loop to run separately. It would be nice if gui's played well with each other, but I don't know if that is easy to do (or even workable for all combinations). If someone knows how to do this sort of thing that would be great, but we don't (neither the resources or expertise). At the moment I take the position that it is simplest not to mix gui's. The current rule of thumb should be that if you want to use a shell that runs under a gui, you need the back end in matplotlib to go with that gui. I hope someone can make me a liar on that. Perry |
From: John H. <jdh...@ac...> - 2004-04-28 20:39:11
|
>>>>> "Jos=E9" =3D=3D Jos=E9 Alexandre Nalon <na...@te...> writes: Jos=E9> Yes, it was the version I downloaded and tried. I tried the Jos=E9> simple_plot.py running, and I got the exact picture shown in Jos=E9> the homepage (the quality of the image still amazes me). The Jos=E9> window is shown without any problems, but with the figure Jos=E9> saved in a file, it results in a figure bigger than the Jos=E9> page, so the result is clipped. Jos=E9> I have the EPS generated, I can send them directly to you or Jos=E9> to the list, if you want to look at them. OK, you're right. I hadn't noticed it before because my postscript viewer was showing the who figure. When I measure it the postscript figure extends beyond the 8 inches that it should if you are using the standard figsize=3D8,6. This is related to the centering 640 thing Todd noticed earlier. I'll work on a fix. JDH |
From: John H. <jdh...@ac...> - 2004-04-28 20:07:33
|
>>>>> "Darren" == Darren Dale <dd...@co...> writes: Darren> I was thinking about the first example in the tutorial. On Darren> windows, TkAgg is the default backend, at least for the Darren> precompiled windows version. If Idle is run with -n, the Darren> show() command must be omitted, or the window will not Darren> render. Interactive2.py will try to render the window and Darren> then hang, as will pycrust. I think the first thing a Darren> newbie to matplotlib wants to do is open their favorite Darren> shell interface and make sure they can reproduce the first Darren> example in the tutorial. Hi Darren, This is a problem. It may be time to look into Pearu Peterson's gui_thread which was developed for chaco but is easily decoupled from scipy. It would be nice if the various backends played nicely with the various IDEs. (One for the priorities list, Perry?) In the meantime, I've added this warning to the win32 section of the installing page Important: There are known conflicts with some of the backends with some python IDEs such as pycrust, idle. If you want to use matplotlib from an IDE, please consult the backends documentaion for compatibility information. You will have the greatest likelihood of success if you run the examples from the command shell or by double clicking on them, rather than from an IDE. If you are interactively generating plots, your best bet is TkAgg from the standard python shell. JDH |
From: <na...@te...> - 2004-04-28 20:06:28
|
Hello, Thanks for all your help! > On earlier versions of matplotlib there was a figure sizing issue when > you saved from tkagg -> postscript or eps, (...) > Are you using the latest version 0.53.1? Yes, it was the version I downloaded and tried. I tried the simple_plot.py running, and I got the exact picture shown in the homepage (the quality of the image still amazes me). The window is shown without any problems, but with the figure saved in a file, it results in a figure bigger than the page, so the result is clipped. I have the EPS generated, I can send them directly to you or to the list, if you want to look at them. --- José Alexandre Nalon na...@te... |