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: John H. <jdh...@ac...> - 2004-05-04 14:26:16
|
>>>>> "Gary" == Gary Ruben <ga...@em...> writes: Gary> Hi John, I think it would be nice to have a few more line Gary> and marker types. For example, DISLIN has 24 marker symbol Gary> types and 8 line types. Perhaps one could specify (perhaps Gary> in points) the length of the dashes and the spacing between Gary> them for dashed line types and perhaps even specify the Gary> pattern of dashes, dots and spaces, but maybe I'm a line Gary> type control-freak. Rightfully so. Ideally everything should be under your control. BTW, new symbols are fairly easy to add. Just take a look at lines.py. Basically, you just have to define one new function following the lead of the many that are already there and one new dictionary entry in lineMarkers. If you or anyone else defines some custom markers, please send them my way. Gary> Actually, what I'd really like is for the ratio of dashes to Gary> the breaks between them to be changed. A 3 or 4 to 1 ratio Gary> looks nicer than what I'm seeing with GTKAgg (about 1 to 1), Gary> but others' opinions may vary, hence the control-freak Gary> suggestion. Gary Actually this is how dashes are implemented at the renderer level, with an arbitrary sequence of on off ink in points. All that was needed was to expose this to the user interface, which I've done with a new method set_dashes, eg, line.set_dashes([5,3,1,12]) # 5 on 3 off 1 on 12 off In the next release there will be a new examples/dash_control.py which illustrates this. Thanks for the suggestion, John |
From: Steve C. <ste...@ya...> - 2004-05-04 13:25:55
|
Regarding "Performance - Faster point and symbol plots" The RenderBase class has the draw_point() method, I think it should have a "draw_points()" method added to it. Then points would be similar to lines which have draw_line() and draw_lines() methods. It should then be easy to gain a speedup (in GTK+ at least) by calling the relevant GDK C library function, instead of using a Python loop calling draw_point(). Existing methods: draw_line() calls drawable.draw_line() draw_lines() calls drawable.draw_lines() draw_point() calls drawable.draw_point() New method: draw_points() calls drawable.draw_points() Line2D._draw_pixel() should become much faster. Regards Steve |
From: Gary R. <ga...@em...> - 2004-05-04 09:15:51
|
Hi John, I think it would be nice to have a few more line and marker types. For example, DISLIN has 24 marker symbol types and 8 line types. Perhaps one could specify (perhaps in points) the length of the dashes and the spacing between them for dashed line types and perhaps even specify the pattern of dashes, dots and spaces, but maybe I'm a line type control-freak. Actually, what I'd really like is for the ratio of dashes to the breaks between them to be changed. A 3 or 4 to 1 ratio looks nicer than what I'm seeing with GTKAgg (about 1 to 1), but others' opinions may vary, hence the control-freak suggestion. Gary ----- Original Message ----- From: John Hunter <jdh...@ac...> Date: Mon, 03 May 2004 16:17:02 -0500 To: mat...@li... Subject: [Matplotlib-users] matplotlib priorities > > Perry Greenfield has spent a fair amount of time talking with me and > the folks working at stsci on matplotlib to come up with a set of > goals and priorities for near term development, and has thoroughly > revamped the goals page > > http://matplotlib.sourceforge.net/goals.html > > We hope that this page will stay much more current than the last page, > which grew fairly static as most of the goals at the time the page was > created were fulfilled. > > Take a look over the list and speak up for anything we may have > overlooked. > > JDH > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm |
From: Srinath A. <sr...@fa...> - 2004-05-04 01:08:41
|
On Mon, 3 May 2004, John Hunter wrote: > http://matplotlib.sourceforge.net/goals.html > > Take a look over the list and speak up for anything we may have > overlooked. > A few feature requests :) 1. Solve the problem where the lines are not displayed correctly when the axis limits after zooming are much smaller than the axis limits when the plot is first created. This has something to do with the backends not being able to handle negative coordinates. 2. Enable zooming in both X and Y with the mouse by allowing the user to choose a rectangle. This might behave like the matlab "zoom" function taking arguments like zoom xon zoom yon zoom I did a simple implementation of this for the GTK backend, but a more general implementation could be done easily depending on the already planned "Cursor read function" enhancement. Srinath |
From: Humufr <hu...@ya...> - 2004-05-03 22:23:58
|
There are something I did't see in the list (but perhaps it's possible to do now) and that I think will be useful for astronomer. it's to plot an image with axes in astronomical unit (RA and Dec) like this function in pgplot: http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGTBOX thanks for this software who are very good, Nicolas Gruel John Hunter wrote: >Perry Greenfield has spent a fair amount of time talking with me and >the folks working at stsci on matplotlib to come up with a set of >goals and priorities for near term development, and has thoroughly >revamped the goals page > > http://matplotlib.sourceforge.net/goals.html > >We hope that this page will stay much more current than the last page, >which grew fairly static as most of the goals at the time the page was >created were fulfilled. > >Take a look over the list and speak up for anything we may have >overlooked. > >JDH > > >------------------------------------------------------- >This SF.Net email is sponsored by: Oracle 10g >Get certified on the hottest thing ever to hit the market... Oracle 10g. >Take an Oracle 10g class now, and we'll give you the exam FREE. >http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click >_______________________________________________ >Matplotlib-users mailing list >Mat...@li... >https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > |
From: Al S. <a.d...@wo...> - 2004-05-03 21:53:49
|
On Mon, 2004-05-03 at 17:17, John Hunter wrote: > Perry Greenfield has spent a fair amount of time talking with me and > the folks working at stsci on matplotlib to come up with a set of > goals and priorities for near term development, and has thoroughly > revamped the goals page > > http://matplotlib.sourceforge.net/goals.html > > We hope that this page will stay much more current than the last page, > which grew fairly static as most of the goals at the time the page was > created were fulfilled. > > Take a look over the list and speak up for anything we may have > overlooked. > > JDH Just so it doesn't slip through the cracks, please add support for multi-line text (embedded '\n's) especially in ticklabels to the near term goals. Thanks. -Al Schapira |
From: John H. <jdh...@ac...> - 2004-05-03 21:39:53
|
Perry Greenfield has spent a fair amount of time talking with me and the folks working at stsci on matplotlib to come up with a set of goals and priorities for near term development, and has thoroughly revamped the goals page http://matplotlib.sourceforge.net/goals.html We hope that this page will stay much more current than the last page, which grew fairly static as most of the goals at the time the page was created were fulfilled. Take a look over the list and speak up for anything we may have overlooked. JDH |
From: John H. <jdh...@ac...> - 2004-05-03 21:14:50
|
>>>>> "John" == John Hunter <jdh...@ac...> writes: John> The example is included below. I'll add it to the examples John> dir for people who want to work directly with the Agg canvas John> and renderer. oops, left out a critical line - adding the axes to the figure. Here is a modified example, which also demonstrates initializing a Numeric array from the string and passing the image off to PIL.... """ This is an example that shows you how to work directly with the agg figure canvas to create a figure using the pythonic API. In this example, the contents of the agg canvas are extracted to a string, which can in turn be passed off to PIL or put in a numeric array """ #!/usr/bin/env python from matplotlib.backends.backend_agg import FigureCanvasAgg from matplotlib.figure import Figure from matplotlib.axes import Subplot from matplotlib.mlab import normpdf from matplotlib.numerix import randn fig = Figure(figsize=(5,4), dpi=100) ax = Subplot(fig, 111) fig.add_axis(ax) canvas = FigureCanvasAgg(fig) mu, sigma = 100, 15 x = mu + sigma*randn(10000) # the histogram of the data n, bins, patches = ax.hist(x, 50, normed=1) # add a 'best fit' line y = normpdf( bins, mu, sigma) line, = ax.plot(bins, y, 'r--') line.set_linewidth(1) ax.set_xlabel('Smarts') ax.set_ylabel('Probability') ax.set_title(r'$\rm{Histogram of IQ: }\mu=100, \sigma=15$') ax.set_xlim( (40, 160)) ax.set_ylim( (0, 0.03)) canvas.draw() s = canvas.tostring_rgb() # save this and convert to bitmap as needed # get the figure dimensions for creating bitmaps or numeric arrays, # etc. l,b,w,h = fig.bbox.get_bounds() w, h = int(w), int(h) if 0: # convert to a Numeric array X = fromstring(s, UInt8) X.shape = h, w, 3 if 0: # pass off to PIL import Image im = Image.fromstring( "RGB", (w,h), s) im.show() |
From: John H. <jdh...@ac...> - 2004-05-03 20:44:09
|
>>>>> "Engelsma," == Engelsma, Dave <D.E...@La...> writes: Dave> Hello -- I'm having a dickens of a time getting this to Dave> work... I totally understand. A more extensive users guide is sorely needed. There is just so much to do on the development front that I haven't made time for it. Dave> I believe I understand what you mean about maintaining Dave> a list of FigureCanvasAggs and using string & bitmap Dave> methods to get the figures into my wxDialog. Dave> Where I'm stuck is in plotting a histogram to a Dave> FigureCanvasAgg... I've checked out your examples, but Dave> there doesn't appear to be anything that directly uses Dave> FigureCanvasAgg. I've tried many different ways (mostly Dave> based on the embedded_in_wx.py and histogram_demo.py Dave> examples). Dave> Based on the example "histogram_demo.py" could you Dave> please give some pointers as to how to plot the Dave> histogram to a FigureCanvasAgg? I think I can handle Dave> things after that... The example is included below. I'll add it to the examples dir for people who want to work directly with the Agg canvas and renderer. Let me know if you need some more help. Note that after you get the RGB string from Agg, you may want to destroy the figure and canvas if the figure is static to conserve memory. As repayment, if you have a nice screenshot showing your application in action, with the list box and figures etc, that I can include on the screenshots page, send it my way. from matplotlib.backends.backend_agg import FigureCanvasAgg from matplotlib.figure import Figure from matplotlib.axes import Subplot from matplotlib.mlab import normpdf from matplotlib.numerix import randn fig = Figure(figsize=(5,4), dpi=100) ax = Subplot(fig, 111) canvas = FigureCanvasAgg(fig) mu, sigma = 100, 15 x = mu + sigma*randn(10000) # the histogram of the data n, bins, patches = ax.hist(x, 50, normed=1) # add a 'best fit' line y = normpdf( bins, mu, sigma) line, = ax.plot(bins, y, 'r--') line.set_linewidth(1) ax.set_xlabel('Smarts') ax.set_ylabel('Probability') ax.set_title(r'$\rm{Histogram of IQ: }\mu=100, \sigma=15$') ax.set_xlim( (40, 160)) ax.set_ylim( (0, 0.03)) canvas.draw() s = canvas.tostring_rgb() # save this and convert to bitmap as needed |
From: Engelsma, D. <D.E...@La...> - 2004-05-03 20:15:58
|
Hello -- I'm having a dickens of a time getting this to work... I believe I understand what you mean about maintaining a list of FigureCanvasAggs and using string & bitmap methods to get the figures into my wxDialog. Where I'm stuck is in plotting a histogram to a FigureCanvasAgg... I've checked out your examples, but there doesn't appear to be anything that directly uses FigureCanvasAgg. I've tried many different ways (mostly based on the embedded_in_wx.py and histogram_demo.py examples). Based on the example "histogram_demo.py" could you please give some pointers as to how to plot the histogram to a FigureCanvasAgg? I think I can handle things after that... Thanks for your assistance! Dave Engelsma Lacks Wheel Trim Systems > -----Original Message----- > From: John Hunter [mailto:jdh...@ac...] > Sent: Saturday, April 24, 2004 9:53 AM > To: Engelsma, Dave > Cc: mat...@li... > Subject: Re: [Matplotlib-users] wxList and FigureCanvasWx > > >>>>> "Engelsma," == Engelsma, Dave <D.E...@La...> writes: > > Dave> Hello - I''ve got a wxDialog where, among other > Dave> controls, I have a wxList and a > Dave> FigureCanvasWx. Depending on what single item is > Dave> selected in the wxList, the FigureCanvasWx should show > Dave> the appropriate graph. It's important that the > Dave> matplotlib-generated graph stay in the dialog along > Dave> with the other controls (I don't want to generate a > Dave> separate frame for the graph). > > I'm not a wx guru, so this may not be the best way, but it I think it > is a pretty good way. Instead of putting a FigureCanvasWX in your, > use a wxPanel instead. Maintain a list of FigureCanvasAgg and use > them to draw your figures. Transfer these to the wxPanel using string > and bitmap methods. This is effectively what wxagg does. The main > difference is that you will have one canvas and a list of > FigureCanvasAggs. > > You can get the width and height of the figure you need to draw with > > > > Suppose agg below is an FigureCanvasAgg instance > > agg.draw() > s = agg.tostring_rgb() > l,b,w,h = agg.figure.get_window_extent().get_bounds() > image = wxEmptyImage( w,h ) > image.SetData(s) > bitmap = image.ConvertToBitmap() > > You can then transfer the bitmap to the wxpanel. If you want to do > all the 'draw' calls upfront so you don't have to repeatedly draw if > the user selects one figure, then another, then the original, that > will be fine. > > Agg is a pretty fast renderer, which may more than make up for the > performance hit of having to go through the string->bitmap->canvas. > > Let me know how it goes. > > JDH |
From: John H. <jdh...@ac...> - 2004-05-03 16:49:04
|
>>>>> "Flavio" == Flavio Codeco Coelho <fcc...@fi...> writes: Flavio> cannot import name FigureManager Right, I was just winging it off the top of my head, as I am now :-). Remember you have the src code which is the ultimate reference so when I say something stupid you can always get the real names by looking at backend_wx.py and backend_wxagg.py. FYI, they are identical except backend_wxagg subclasses FigureFrameWx and FigureCanvasWx to make the agg variants. How about something like from matplotlib.backends_wx import FigureManagerWx as FigureManager from matplotlib.backends_wx import NavigationToolbarWx as NavigationToolbar from matplotlib.backends_wxagg import FigureCanvasWxAgg as FigureCanvas I *think* that should do it. Flavio> Well, Here I was misled by the example embedded_in_wx, Flavio> which has that line.:-/ Should I just delete the darn Flavio> line?:) I think you should keep it. I am not sure what you are doing in all your code (ie, whether you use the matlab interface). Since we know it could do harm to remove it and can't do harm to keep it, I say keep it. Flavio> well maybe in CVS it works but in 0.53.1 I can' t import Flavio> FigureManager from backend_wxagg.:~( See above Flavio> Should I not import FigureCanvasWxAgg instead of Flavio> FigureCanvasWx? Yep... Good luck! JDH |
From: Darren D. <dd...@co...> - 2004-05-03 16:19:05
|
> > * make sure no conflicting gui is loaded in sys.modules. If another > > is, go with that (issue a warning) > > > > * if no other is loaded, try and load the required GUI lib in a > > try/except block. If the load fails, look for an alternative and > > use that instead (issue a warning) John, you are right, too much behind the scenes work is not justified, but the uninitiated user should have as easy an "entry" as is reasonable. So this seems like a good solution. If a shell wont play nice with the backend, a warning stating as much is better than a frozen window. |
From: John H. <jdh...@ac...> - 2004-05-03 14:37:40
|
>>>>> "Flavio" == Flavio Codeco Coelho <fcc...@fi...> writes: Flavio> from matplotlib.backends.backend_wx import Toolbar, Flavio> FigureCanvasWx, FigureManager Flavio> do you think this can be the problem? If So How should I Flavio> change it to make it right? Oh... so now you tell me :-) ! This is definitely a problem. Yes, you should do from matplotlib.backends.backend_wxagg import Toolbar, FigureCanvasWx, FigureManager The backend switching mechanisms (eg -d, matplotlib.use, matplotlibrc) are for the matlab interface. You are using the API directly and so these do not apply. Note that the toolbar and the figure manager are the same in backend_wx and backend_wxagg (the latter just imports them directly from the former). So if you want to easily switch between backend_wx or backend_wxagg (ie to test performance or use a different one if yo encounter troubles) you can do from matplotlib.backends.backend_wxagg import Toolbar, FigureManager from matplotlib.backends.backend_wxagg import FigureCanvasWx as FigureCanvas Then use FigureCanvas in your code to instantiate new canvases. Switching back to the wx canvas (native wx drawing rather than agg drawing) is as simple as changing the one line to from matplotlib.backends.backend_wx import FigureCanvasWx as FigureCanvas Hope this helps, John |
From: Perry G. <pe...@st...> - 2004-05-03 14:10:06
|
John Hunter writes: > >>>>> "Perry" == Perry Greenfield <pe...@st...> writes: > > Perry> One more thought along this line. Perhaps it's possible for > Perry> matplotlib to inspect whether or not any of the supported > Perry> gui's has already been imported and make that the > Perry> default. It seems like a sensible rule to me. If none are > Perry> found, then all the other mechanisms apply. > > I've given a little thought to this and it is certainly possible. In > the backend selection code we can detect the case when the backend has > not been *explicity* set by either -d or matplotlib.use. In the case > that we are using the default from matplotlib rc, and the default is a > GUI, we could do two things to help prevent mistakes > > * make sure no conflicting gui is loaded in sys.modules. If another > is, go with that (issue a warning) > > * if no other is loaded, try and load the required GUI lib in a > try/except block. If the load fails, look for an alternative and > use that instead (issue a warning) > > I don't see a major problem with this approach. I want to avoid the > microsoft approach of doing too much behind the scenes to try and > accommodate the careless user, since this often runs afoul of the > power user, and often leads to situations that are difficult to debug. > I think if we issue warnings we can at least make clear what is > happening which should satisfy both potential problems. > > Any forseeable problems with this approach? > It sounds like a good thing to try. As time goes on, perhaps ways of making different gui's coexist may be found and implemented. But that may take some time even if possible. This proposal seems the best short term solution. Perry |
From: John H. <jdh...@ac...> - 2004-05-03 11:27:01
|
>>>>> "Sajec," == Sajec, Mike TQO <ms...@tq...> writes: Sajec,> Hello, I recently installed version 0.53.1, and it's Sajec,> great! The only problem is that I'm unable to save plots Sajec,> to file. I've tried a few different approaches (from Sajec,> displayed WXAgg, and GTK plots as well as running Sajec,> savefig() on undisplayed figures (png & jpg), but have had Sajec,> no luck. Any help is much appreciated. This is something I haven't seen before. What platform are you on: windows, linux, os x? I recommend the following * make sure your hard drive isn't full * open up a shell and change into a directory you have write permission to and make sure you can write a file to that dir * create the following test script from matplotlib.matlab import * plot([1,2,3]) savefig('testfig') * run this from the shell with python testscript.py -dAgg * see if the file testfig.png is created * if so, figure out what is different about what you are doing and what the test script is doing * if not, did you get any error messages to the screen? JDH |
From: Sajec, M. T. <ms...@tq...> - 2004-05-03 03:58:48
|
Hello, I recently installed version 0.53.1, and it's great! The only problem is that I'm unable to save plots to file. I've tried a few different approaches (from displayed WXAgg, and GTK plots as well as running savefig() on undisplayed figures (png & jpg), but have had no luck. Any help is much appreciated. Thanks, Mike |
From: John H. <jdh...@ac...> - 2004-05-03 02:26:48
|
Please add this print line for i in range(len(eqlist)): print eqlist[i] a.text(1,9-i,eqlist[i], fontsize=15) and the post the results. Also, as a test, if you write a mathtext string like xlabel('$\\alpha$) does it work? Ie, does using the slash slash manually rather than the raw string do you have any troubles? Can't see why you would... JDH |
From: John H. <jdh...@ac...> - 2004-05-02 14:08:31
|
>>>>> "Perry" == Perry Greenfield <pe...@st...> writes: Perry> One more thought along this line. Perhaps it's possible for Perry> matplotlib to inspect whether or not any of the supported Perry> gui's has already been imported and make that the Perry> default. It seems like a sensible rule to me. If none are Perry> found, then all the other mechanisms apply. I've given a little thought to this and it is certainly possible. In the backend selection code we can detect the case when the backend has not been *explicity* set by either -d or matplotlib.use. In the case that we are using the default from matplotlib rc, and the default is a GUI, we could do two things to help prevent mistakes * make sure no conflicting gui is loaded in sys.modules. If another is, go with that (issue a warning) * if no other is loaded, try and load the required GUI lib in a try/except block. If the load fails, look for an alternative and use that instead (issue a warning) I don't see a major problem with this approach. I want to avoid the microsoft approach of doing too much behind the scenes to try and accommodate the careless user, since this often runs afoul of the power user, and often leads to situations that are difficult to debug. I think if we issue warnings we can at least make clear what is happening which should satisfy both potential problems. Any forseeable problems with this approach? JDH |
From: John H. <jdh...@ac...> - 2004-05-01 13:47:27
|
>>>>> "Dominique" == Dominique Orban <Dom...@po...> writes: Dominique> Hi, I have seen related issues recently on the mailing Dominique> list. I have built the latest matplotlib from CVS in Dominique> SuSE Linux 8.0 with gcc 3.3. The GTK backend works Dominique> fine, but GTKAgg and TkAgg pop up a window but don't Dominique> render the plot. Has anyone had the same problem? I don't think your issue is the same as the one Gerry was experiencing because in his case he wasn't showing any links with tk/tcl/X11 and you are. I think you may be experiencing a CVS specific problem. I suggest building 0.53.1 at this point. There haven't been any features added to CVS since the 0.53.1 release that justify the extra difficulties and uncertainties associated with building from CVS. There are several developers checking in to CVS and the mirrors w/o ssh access often lag behind a day or two and this often makes it difficult to debug a CVS problem. If you still have the problem with 0.53.1, let me know! Note, last night I made a significant change to the Agg backend which affects TkAgg and GTKAgg and if you are interested in being a crash test dummy I would be much obliged. To insure you have a fresh checkout, you should do a new checkout and see if you get the CXX dir in the matplotlib root. If you do, then it is likely you have the most recent code. If not, it's not worth debugging the CVS problem you are having because it is likely to change with the new code. It's also important to insure you have a clean build by rm -rf your build dir and the site-packages matplotlib dir. Let me know what happens if you decide to go this route. JDH |
From: Dominique O. <Dom...@po...> - 2004-04-30 23:21:50
|
Hi, I have seen related issues recently on the mailing list. I have built the latest matplotlib from CVS in SuSE Linux 8.0 with gcc 3.3. The GTK backend works fine, but GTKAgg and TkAgg pop up a window but don't render the plot. Has anyone had the same problem? Here is the output of ldd -r _tkagg.so libtk8.4.so => /usr/local/lib/libtk8.4.so (0x40003000) libtcl8.4.so => /usr/local/lib/libtcl8.4.so (0x400d2000) libpng.so.2 => /usr/lib/libpng.so.2 (0x40173000) libz.so.1 => /lib/libz.so.1 (0x401a5000) libstdc++.so.5 => /usr/local/lib/libstdc++.so.5 (0x401b4000) libm.so.6 => /lib/libm.so.6 (0x4026f000) libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x40292000) libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1 (0x402f6000) libpthread.so.0 => /lib/libpthread.so.0 (0x402ff000) libc.so.6 => /lib/libc.so.6 (0x40316000) libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4043e000) libdl.so.2 => /lib/libdl.so.2 (0x404fe000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) undefined symbol: _Py_NoneStruct (./_tkagg.so) undefined symbol: Py_BuildValue (./_tkagg.so) undefined symbol: Py_InitModule4 (./_tkagg.so) undefined symbol: PyArg_ParseTuple (./_tkagg.so) It looks like these 'undefined symbols' are not the cause of the problem; they are missing from every .so in my site-packages. They must be linked in at run time from somewhere else. I see that in a previous post, you recommend to link in -lX11 -lXaw, what exactly do you mean by that? To which command should those be appended? Thanks in advance ! Dominique |
From: John H. <jdh...@ac...> - 2004-04-30 11:47:10
|
>>>>> "Jon" == Jon Peirce <Jon...@no...> writes: Jon> Hi there! I've been using the legend function in a plot but Jon> can't get the location setting to work. I've tried the Jon> numeric and string versions of the location codes and tried Jon> several backends (but only winXP, python 2.3.3). The legend Jon> always appears upper-right. Jon> Is this functionality platform-dependent? No, in the 2 arg version legend(LABELS, LOC), the loc argument must be a position arg, not be a kwarg. Ie, plots.legend( ('test', ), 4) works. Note that the labels argument needs to be a list or tuple, not a string as you gave, but this is not related to your problem. The problem you experienced was due to the inadequate way I was using introspection to determine which of the many call signatures legend has. There is an easy fix which gets it right in the case where loc is a kwarg. In axes.Aces.legend, replace loc = 1 with loc = kwargs.get('loc', 1) as the first line after the doc string. Hope this helps, JDH |
From: Jon P. <Jon...@no...> - 2004-04-30 08:43:49
|
Hi there! I've been using the legend function in a plot but can't get the location setting to work. I've tried the numeric and string versions of the location codes and tried several backends (but only winXP, python 2.3.3). The legend always appears upper-right. Is this functionality platform-dependent? #---------------------------------------------- import matplotlib.matlab as plots import Numeric as num x = num.arange(10) plots.plot(x,x) plots.legend('test',loc=4) plots.show() #---------------------------------------------- -- Jon Peirce Nottingham University +44 (0)115 8467176 (tel) +44 (0)115 9515324 (fax) http://www.psychology.nottingham.ac.uk/staff/jwp/ This message has been scanned but we cannot guarantee that it and any attachments are free from viruses or other damaging content: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. |
From: Perry G. <pe...@st...> - 2004-04-29 18:35:13
|
John Hunter wrote: > Well, assuming you passed it to matplotlib with no colormap, then a > default intensity grayscale would be used. In that case, just build > the rgb array as above using string methods and then take the r, g, or > b slice out of it since they are all identical. > Yep, this is the simple case. > If you passed in a colormap, you would need to invert the colormap, > which would be relatively easy to provide in the colors.Colormap > interface but I'm having trouble imagining why someone would want to > do this. > Me too. (Well, I'm thinking of older displays that actually used color lookup tables. The image would be stored in the display buffer as 8-bit intensity, and displayed to the screen through a lookup color table. In that case one could manipulate the image display as a intensity image and expect to read it out as such while using whatever psychedelic color table one wanted to please their eyes. But that's rare these days.) > Both of these would be lossy, of course, eg if you started with an > array of floats you would get back an array of UInt8s. > Yep. > Note agg comes with several helpful pixel converters functions: gray8, > rgb565, rgb555, bgr24, bgr24, bgra32, abgr32, argb32, rgba32. Perhaps > the best general solution is to define these as module constants and > provide a single tostring method that takes one of these constants and > returns the appropriate string representation. I can image that this > would be useful both for backend agg and the image module. > Sounds reasonable. Perry |
From: John H. <jdh...@ac...> - 2004-04-29 18:19:16
|
>>>>> "Flavio" == Flavio Codeco Coelho <fcc...@fi...> writes: Flavio> the other way I know to tackle this parsing, using the Flavio> method string.replace() also escapes backslashes. Flavio> does anybody know of a way to parse expressions without Flavio> these side-effects? I think you are making a conceptual error here (one that I made too earlier when I was working on mathtext). There is no such thing as a raw string. the r'\somestring' is a hint to the python parser telling it to escape all the slashes so you don't have to. Ie, raw strings and strings are the same thing, and the r prefix just makes it easier to write strings that have slashes in them. >>> r'\hi mom' '\\hi mom' So when these strings come back to you from Xlator or string.replace displaying the \\, that is the right thing to do. See, for example, http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=7xznb699ph.fsf%40ruckus.brouhaha.com&rnum=14&prev=/groups%3Fq%3Draw%2Bstring%2Bgroup:*python*%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26scoring%3Dd%26start%3D10%26sa%3DN JDH |
From: John H. <jdh...@ac...> - 2004-04-29 18:08:42
|
>>>>> "Perry" == Perry Greenfield <pe...@st...> writes: Perry> An associated question is how one easily maps a Perry> monochromatic image that is displayed in matplotlib back Perry> into a monochromatic array. Normally it's going to be Perry> converted to rgba even if rgba is not really needed. Is Perry> there any simple way of mapping it back to intensity Perry> (histogram of the rgba values to determine if such a Perry> mapping exists?). Hmmm. Well, assuming you passed it to matplotlib with no colormap, then a default intensity grayscale would be used. In that case, just build the rgb array as above using string methods and then take the r, g, or b slice out of it since they are all identical. If you passed in a colormap, you would need to invert the colormap, which would be relatively easy to provide in the colors.Colormap interface but I'm having trouble imagining why someone would want to do this. Both of these would be lossy, of course, eg if you started with an array of floats you would get back an array of UInt8s. Note agg comes with several helpful pixel converters functions: gray8, rgb565, rgb555, bgr24, bgr24, bgra32, abgr32, argb32, rgba32. Perhaps the best general solution is to define these as module constants and provide a single tostring method that takes one of these constants and returns the appropriate string representation. I can image that this would be useful both for backend agg and the image module. JDH |