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) |
|
|
|
|
|
I get this behaviour as well, but only on first usage of show(). However, after that there is no problem. The default is to start off with interactive mode off, but the first usage of show() turns it on. So I would guess that the problem is that with interactive mode turned off, the figure window is not returning. On Mon, 9 Apr 2007, Grant Edwards wrote: > I've tried that code as well, and p.show() doesn't return until > the window is closed. If I use code like that in a python > program, the program becomes non-responsive until the plot > window is closed.
On 2007年04月09日, Lou Pecora <lou...@ya...> wrote: > I assume you mean the first example, the wire frame (see > below). It works for me. I've tried that code as well, and p.show() doesn't return until the window is closed. If I use code like that in a python program, the program becomes non-responsive until the plot window is closed. I've switched to using wxmpl to embed figure in a wxWidgets panel. That almost works -- except I loose the ability for the user to rotate/zoom using the mouse. > No problems. When pylab (matplotlib) plots it does so in a > window associated with a Python process that is separate from > the terminal (I assume you are using a terminal). I'm not sure what you mean by "using a terminal". I'm running my python app from the command line in a terminal emulator window. -- Grant Edwards grante Yow! Hey, I LIKE that at POINT!! visi.com
John Hunter wrote: > On 4/9/07, Eric Firing <ef...@ha...> wrote: > >> I also closed a couple others. It would be nice to get many more of the >> bug reports closed; I think some are obsolete, but some are pointing to >> things that really should be fixed. I am out of time for a while, >> though; I need to work on other things. > > I think it is a good plan to try and knock out as many of these as > possible before the next release. I'm pretty swamped until after next > Monday because all my free time will be going to preparing for a > python workshop with Fernando, but let's all try and do a bug or patch > per day, and shoot for some time after Monday a week for Monday to do > the release. > In related news, Eric, I say you were working on the date format > problem in the finance module. Just so everyone is on the same page, > yahoo changed their output format to '%Y-%m-%d' so I changed the > format string in the finance module. But people who have cached > downloads in ~/.matplotlib/finance.cache will still have data in the > old format. Eric made some changes to support both with a try/except, > but at some point we'll want to remove that for performance reasons, > so the best course is to flush your cache. John, Thanks for the explanation. I made another change. It should still support both formats, but with only a single try/except to decide which format to use, so the performance penalty should be negligible. The advantage is that we won't get questions (as we have at least once) about "why doesn't finance_demo.py work?" Here are the relevant lines from finance.py (slightly mangled by the mailer, as usual): datefmt = None for line in lines[1:]: vals = line.split(',') if len(vals)!=7: continue datestr = vals[0] if datefmt is None: try: datefmt = '%Y-%m-%d' dt = datetime.date(*time.strptime(datestr, datefmt)[:3]) except ValueError: datefmt = '%d-%b-%y' # Old Yahoo--cached file? dt = datetime.date(*time.strptime(datestr, datefmt)[:3]) d = date2num(dt) Eric > > JDH
Hi, The examples worked for me too, and I am using IDLE on Windows. And isn't the program supposed to return control to the terminal even if the Graph Window is in the background? There may be something wrong. Can you post the exact code that you are trying to run and the version numbers? I am not an expert, but it may help. --musically_ut On 4/9/07, Lou Pecora <lou...@ya...> wrote: > I assume you mean the first example, the wire frame > (see below). It works for me. No problems. When > pylab (matplotlib) plots it does so in a window > associated with a Python process that is separate from > the terminal (I assume you are using a terminal). You > might need to bring that process window to the > foreground. > > Here's the code that worked for me: > > from numpy import * > import pylab as p > import matplotlib.axes3d as p3 > > # u and v are parametric variables. > # u is an array from 0 to 2*pi, with 100 elements > u=r_[0:2*pi:100j] > # v is an array from 0 to 2*pi, with 100 elements > v=r_[0:pi:100j] > > # x, y, and z are the coordinates of the points for > plotting > # each is arranged in a 100x100 array > x=10*outer(cos(u),sin(v)) > y=10*outer(sin(u),sin(v)) > z=10*outer(ones(size(u)),cos(v)) > > fig=p.figure() > ax = p3.Axes3D(fig) > ax.plot_wireframe(x,y,z) > ax.set_xlabel('X') > ax.set_ylabel('Y') > ax.set_zlabel('Z') > p.show() > > --- Grant Edwards <gr...@vi...> wrote: > > > I'm following the 3D plotting examples I found at > > > > http://www.scipy.org/Cookbook/Matplotlib/mplot3D > > > > The problem is that my program hangs when I call > > pylab.show(), > > it never returns: my program hangs. > > > > How do I show a 3D plot without hanging my program? > > > > -- > > Grant Edwards grante > > > > -- Lou Pecora, my views are my own. > --------------- > "I knew I was going to take the wrong train, so I left early." > --Yogi Berra > > > > ____________________________________________________________________________________ > Bored stiff? Loosen up... > Download and play hundreds of games for free on Yahoo! Games. > http://games.yahoo.com/games/front > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Never trust a spiritual leader who cannot dance. ~Mr. Miyagi, The Next Karate Kid
belinda thom wrote: > For anyone in my boat following this thread, here's what I ended up doing: Thanks for the summary -- it's really nice to find this sort of thing when scanning archives in the future. > I'm sad to hear that its not as easy to use matplotlib to write more > sophisticated apps than it is w/matlab Well, there are balances to be struck here. If we wanted MPL to be full featured for GUI stuff -- we have to either pick on GUI toolkit, or essentially write full GUI toolkit -- and there really are enough already! Maybe Matlab's gotten better than it was in my day (version 5), but while simple GUI stuff was doable -- it was really pretty limited and painful. If you want a GUI -- use a GUI toolkit. Once you get over the learning curve, you really will be happier -- so I think John has made the right choice limiting MPL's built-in capabilities. > I intend to write a more serious > app using Python that needs a GUI (an audio file viewer and editor to be > used for my music perception research). It will be well worth it to learn a real GUI toolkit for that kind of thing. BE sure to check out existing projects to that too -- Audacity, transana, etc. > I've heard that Apple's own InterfaceBuilder is > THE WAY to program GUI-based apps and wonder if anyone has had > experience using this w/Python? You can't. If you want Mac-only then you should certainly check out PyObjC -- and use InterfaceBuilder with it. With wx, you can either write the interface code by hand (which I advocate), or use one of a handful of GUI-building tools: Code Blocks wxDesigner wxGlade XRCed PythonCard Dabo (I think they have one now) etc.... >> http://www.mithis.com/~chrisb > > I never found the time to finish my matplotlib-scipy install from source > (b/c of the apple's wx incompatibility), but I do intend to finish with > that business when I return in June and am wondering if your above rec > about a wx latest-version would interfere with that? Nope. I think MPL is working OK with wxPython2.8 now. I hope we'll get a build on pythonmac.org this week. In any case, FloatCanvas works with 2.6 and 2.8. -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 assume you mean the first example, the wire frame (see below). It works for me. No problems. When pylab (matplotlib) plots it does so in a window associated with a Python process that is separate from the terminal (I assume you are using a terminal). You might need to bring that process window to the foreground. Here's the code that worked for me: from numpy import * import pylab as p import matplotlib.axes3d as p3 # u and v are parametric variables. # u is an array from 0 to 2*pi, with 100 elements u=r_[0:2*pi:100j] # v is an array from 0 to 2*pi, with 100 elements v=r_[0:pi:100j] # x, y, and z are the coordinates of the points for plotting # each is arranged in a 100x100 array x=10*outer(cos(u),sin(v)) y=10*outer(sin(u),sin(v)) z=10*outer(ones(size(u)),cos(v)) fig=p.figure() ax = p3.Axes3D(fig) ax.plot_wireframe(x,y,z) ax.set_xlabel('X') ax.set_ylabel('Y') ax.set_zlabel('Z') p.show() --- Grant Edwards <gr...@vi...> wrote: > I'm following the 3D plotting examples I found at > > http://www.scipy.org/Cookbook/Matplotlib/mplot3D > > The problem is that my program hangs when I call > pylab.show(), > it never returns: my program hangs. > > How do I show a 3D plot without hanging my program? > > -- > Grant Edwards grante -- Lou Pecora, my views are my own. --------------- "I knew I was going to take the wrong train, so I left early." --Yogi Berra ____________________________________________________________________________________ Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games. http://games.yahoo.com/games/front
I'm following the 3D plotting examples I found at http://www.scipy.org/Cookbook/Matplotlib/mplot3D The problem is that my program hangs when I call pylab.show(), it never returns: my program hangs. How do I show a 3D plot without hanging my program? -- Grant Edwards grante Yow! Is this where people at are HOT and NICE and they visi.com give you TOAST for FREE??
On 4/9/07, Eric Firing <ef...@ha...> wrote: > I also closed a couple others. It would be nice to get many more of the > bug reports closed; I think some are obsolete, but some are pointing to > things that really should be fixed. I am out of time for a while, > though; I need to work on other things. I think it is a good plan to try and knock out as many of these as possible before the next release. I'm pretty swamped until after next Monday because all my free time will be going to preparing for a python workshop with Fernando, but let's all try and do a bug or patch per day, and shoot for some time after Monday a week for Monday to do the release. In related news, Eric, I say you were working on the date format problem in the finance module. Just so everyone is on the same page, yahoo changed their output format to '%Y-%m-%d' so I changed the format string in the finance module. But people who have cached downloads in ~/.matplotlib/finance.cache will still have data in the old format. Eric made some changes to support both with a try/except, but at some point we'll want to remove that for performance reasons, so the best course is to flush your cache. JDH
Hi Emmanuel, Maybe your problem has to do with your "enthought" build of wxPython. I use standard builds from wxPython site. Emmanuel wrote: > when putting the full path of wxmsw26u_vc_enthought.dll in setup.py > like this > > data_files = [("lib\\matplotlibdata", mpfiles), > matplotlib.get_py2exe_datafiles(), # if you don't > use the lib option You get two copies of matplotlibdata as you kept both of the two above lines active. You need to use the first one of you use the py2exe option to create a library.zip which I put into a sub-folder called 'lib' in the sample setup.py file. > "C:\\Python24\\Lib\\site-packages\\wx-2.6.1.0-py2.4-win32.egg\\wx\\wxmsw26u_vc_enthought.dll", > ## "wxmsw26u_vc_enthought.dll", > #### ("prog\\", python4dll) > ] > You are also using an 'egg'. I seem to recall that py2exe does not yet really support that, but you might want to check on the py2exe list (e.g. on the gmane mirror of it at http://dir.gmane.org/gmane.comp.python.py2exe Werner
Jouni K. Seppänen wrote: > Eric Firing <ef...@ha...> writes: > >> In any case, thanks for bringing the legend/LineCollection bug to my >> attention. This is the sort of thing it is nice to get cleaned up >> before the next release, coming soon. Do you know of some other simple >> bugs like this we should look at ASAP? > > Of the bugs listed at http://sf.net/tracker/?group_id=80706&atid=560720 > I suspect a few would be simple to fix: > Thanks for the suggestions. > 1671570 Invalid CSS 2 styles in SVG output In this the invalid styles seem to be coming from freetype itself, as nearly as I can see. Someone who understands ft2font needs to look at this one. > 1650523 inconsistent use of tabs and spaces in indentation > 1605288 import pylab with python -OO I fixed these. I also closed a couple others. It would be nice to get many more of the bug reports closed; I think some are obsolete, but some are pointing to things that really should be fixed. I am out of time for a while, though; I need to work on other things. Eric
Thanks everyone for the advice. For anyone in my boat following this thread, here's what I ended up doing: Had a stroke of insight and coded the whole thing up (poorly) using maptlotlib w/no polling. In other words, the entire API sat in the mouse click callback function. Lame, yes---especially since some expensive AI search can be going on that takes more than a few seconds---but as long as my students take care not to enter more than one mouse click before each screen update, the app doesn't seem to suffer from inconsistency problems. Its pretty darn nice looking w/ matplotlib, too. So, that's the band aid. I'm sad to hear that its not as easy to use matplotlib to write more sophisticated apps than it is w/matlab but am glad that it is documented here. To summarize what I gleaned from Chris, the maptlotlib (interactive?) thread doesn't handle anything but its own stuff (e.g. mouse callbacks) directly, so my attempt to use the threading event/wait stuff failed for that reason (?). The pyrobotics app would be a good candidate for using matplotlib, but might not be easy to use for similar reasons. I am wondering if a socket-based approach, where matplotlib served up, for instance, mouse clicks, plots, etc, to a client app might be a good compromise. I am still unclear how John's recs for timer or idler (which I've been able to find no accessible documentation on) would have helped me. For instance, wouldn't the timer rec fail for the same reason my event wait thread hack did? Being sad, however, I understand that the main focus of matplotlib is high- and scientific-quality graphics, for which it seems to hit the nail on the head. Francisco's rec to the "for non-programmers programming a GUI" document looks very worthwhile (and I am a seasoned programmer). I intend to have a serious look at it this summer, b/c I intend to write a more serious app using Python that needs a GUI (an audio file viewer and editor to be used for my music perception research). The document does indeed seem like a good introduction to event-based programming, and had I a week or more to spare, would probably have tried using the related packages to build the app. Before the stroke-of-insight, I got lucky and managed to get a simple Tk app working that handled displaying the game and processing mouse clicks, but I foiled in my attempts to capture keyboard input, so after several hours gave up. It does seem wx is more suited for OS X, and my brief googling seems to imply that Tk is becoming the thing people---esp on OS X---USED to use. I've heard that Apple's own InterfaceBuilder is THE WAY to program GUI-based apps and wonder if anyone has had experience using this w/Python? Thanks again for the advice. A last question for Chris... > If it does look promising, be sure to get the latest version from: > > http://www.mithis.com/~chrisb I never found the time to finish my matplotlib-scipy install from source (b/c of the apple's wx incompatibility), but I do intend to finish with that business when I return in June and am wondering if your above rec about a wx latest-version would interfere with that? --b
On Fri, 2007年04月06日 at 18:32 +0300, Jouni K. Sepp=C3=A4nen wrote: > David Fokkema <dfo...@il...> writes: >=20 > > If I choose center, the result is that my histogram is calculated > > for edge values but the bars are placed at center values which is > > completely misleading and wrong! I'd say this is a bug, but I may be > > overlooking something here... >=20 > Looks like a bug to me. Could you file it at > http://sf.net/tracker/?group_id=3D80706&atid=3D560720 > so it isn't forgotten? Well... It couldn't be too hard to fix, I guess... I know python, I tracked down the source, I could try and fix it, right? I think I'll have the time next Tuesday, so hopefully I'll file a bug report with an attached patch, ;-)
when putting the full path of wxmsw26u_vc_enthought.dll in setup.py like this data_files = [("lib\\matplotlibdata", mpfiles), matplotlib.get_py2exe_datafiles(), # if you don't use the lib option "C:\\Python24\\Lib\\site-packages\\wx- 2.6.1.0-py2.4-win32.egg\\wx\\wxmsw26u_vc_enthought.dll", ## "wxmsw26u_vc_enthought.dll", #### ("prog\\", python4dll) ] and copying wxmsw26u_vc_enthought.dll in the same directory where setup.pyis. Running python setup.py py2exe it works "but" gives a 26Mb large dist directory with a lot of files. A good start. I'd like to know if it's possible to bundle all files in a zipped files or something similar What I obtain in dist is: [___lib [___matplolibdata [___matplotlibdata [___prog Files in lib are *.pyd,library.zip,wxmsw26u_vc_enthought.dll Files in lib\matplotib are *.afm,*.ppm,*.svg .... Files in matplotib are the same as in lib\matplotib FIles in prog are MSVCR71.dll,python24.dll,w9xpopen.exe,wx_embed.exe On 4/8/07, Emmanuel <emm...@fa...> wrote: > > Can I post also in that thread or should I open a new one? > > I'm also trying the first Werner F. Bruhin example. I saved the setup.pyand the example > in embedding_in_wx4.py then I run > > python.exe setup.py py2exe bdist > > > When looking for dll, it fails claiming: > Error: wxmsw26u_vc_enthought.dll : No such file or directory > > If I had manually the file > file:///C:/Python24/Lib/site-packages/wx-2.6.1.0-py2.4-win32.egg/wx/wxmsw26_gl_vc_enthought.dll > > in the prog directory, it works fine. > > If I add wxmsw26_gl_vc_enthought.dll to data_files it does not install in > the prog directory but in the upperlevel directory. > > How could I include it in the right place directly? > > > > On 4/5/07, Werner F. Bruhin <wer...@fr... > wrote: > > > > Hi Archana, > > > > Archana Ganesan wrote: > > > ... > > > trial.py is as follows. > > > > > > from pylab import * > > > > > > x = xrange(10) > > > plot(x) > > > savefig("trial.png") > > > > > The setup.py you are using will not work, it is meant for a matplotlib > > embedded in wx, and even for that some lines are commented out. > > > > Can you try the setup.py I sent yesterday with which I included > > simple_plot.py, which is a script using pylab as you do in your trial.py > > . > > > > Werner > > > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share > > your > > opinions on IT & business topics through brief surveys-and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > >
Can I post also in that thread or should I open a new one? I'm also trying the first Werner F. Bruhin example. I saved the setup.py and the example in embedding_in_wx4.py then I run python.exe setup.py py2exe bdist When looking for dll, it fails claiming: Error: wxmsw26u_vc_enthought.dll : No such file or directory If I had manually the file file:///C:/Python24/Lib/site-packages/wx-2.6.1.0-py2.4-win32.egg/wx/wxmsw26_gl_vc_enthought.dll in the prog directory, it works fine. If I add wxmsw26_gl_vc_enthought.dll<file:///C:/Python24/Lib/site-packages/wx-2.6.1.0-py2.4-win32.egg/wx/wxmsw26_gl_vc_enthought.dll> to data_files it does not install in the prog directory but in the upperlevel directory. How could I include it in the right place directly? On 4/5/07, Werner F. Bruhin <wer...@fr...> wrote: > > Hi Archana, > > Archana Ganesan wrote: > > ... > > trial.py is as follows. > > > > from pylab import * > > > > x = xrange(10) > > plot(x) > > savefig("trial.png") > > > The setup.py you are using will not work, it is meant for a matplotlib > embedded in wx, and even for that some lines are commented out. > > Can you try the setup.py I sent yesterday with which I included > simple_plot.py, which is a script using pylab as you do in your trial.py. > > Werner > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Jouni K. Seppänen wrote: > Jouni K. Seppänen <jk...@ik...> writes: > > Also I'm not at all sure that my solution to the Circle problem is > correct: > > http://thread.gmane.org/gmane.comp.python.matplotlib.devel/2667/focus=2670 > Your solution is correct; the docstring was wrong, and there were some other vestiges of an earlier implementation. I will have these cleaned up shortly. Eric
Jouni K. Seppänen <jk...@ik...> writes: > Eric Firing <ef...@ha...> writes: > >> Do you know of some other simple >> bugs like this we should look at ASAP? > > Of the bugs listed at http://sf.net/tracker/?group_id=80706&atid=560720 > I suspect a few would be simple to fix: Also I'm not at all sure that my solution to the Circle problem is correct: http://thread.gmane.org/gmane.comp.python.matplotlib.devel/2667/focus=2670 -- Jouni K. Seppänen http://www.iki.fi/jks
Eric Firing <ef...@ha...> writes: > In any case, thanks for bringing the legend/LineCollection bug to my > attention. This is the sort of thing it is nice to get cleaned up > before the next release, coming soon. Do you know of some other simple > bugs like this we should look at ASAP? Of the bugs listed at http://sf.net/tracker/?group_id=80706&atid=560720 I suspect a few would be simple to fix: 1671570 Invalid CSS 2 styles in SVG output 1650523 inconsistent use of tabs and spaces in indentation 1605288 import pylab with python -OO -- Jouni K. Seppänen http://www.iki.fi/jks
John Hunter wrote: > On 4/7/07, Eric Firing <ef...@ha...> wrote: > >> I put back get_lines() in collections and fixed a related bug in legend, >> so the test script now works in the sense that it makes a legend. It >> puts in an unlabeled line, presumably corresponding to the line >> collection making up the error bars. Maybe legend provides a way to >> avoid this. I haven't looked. > > If I'm understanding the problem you are describing correctly, it > looks like _nolegend_ needs to be set here. For artists we do not want > to be included in the legend, the label should be set to '_nolegend_' > and legend will ignore it in auto-legending. Or at least it should > and if it is not it is a bug. I have made more changes in svn to fix this bug. The collection initializers, vlines, and hlines lacked label support, so I added it. errorbar() was already trying to set the line collection label to _nolegend_, but it was not getting passed on down the line. Eric
On 4/7/07, Eric Firing <ef...@ha...> wrote: > I put back get_lines() in collections and fixed a related bug in legend, > so the test script now works in the sense that it makes a legend. It > puts in an unlabeled line, presumably corresponding to the line > collection making up the error bars. Maybe legend provides a way to > avoid this. I haven't looked. If I'm understanding the problem you are describing correctly, it looks like _nolegend_ needs to be set here. For artists we do not want to be included in the legend, the label should be set to '_nolegend_' and legend will ignore it in auto-legending. Or at least it should and if it is not it is a bug. > The larger problem, and the one that probably made me yank get_lines > (without realizing the legend code was using it--my mistake--I do try to > check for things like that) is that legend really wants to know the > draw-time locations of all plot elements, and for collections (among > other things) this cannot be determined in general. The collection > get_lines and get_verts methods can give the right answer to legend only > if the data and offset transforms are the same. Sometimes they are, > sometimes they are not. LineCollection.get_lines() probably could be > improved to do a better job than at present, but never a perfect one. One approach is to make every artist provide a get window extent which returns a bounding box. There is the issue of how to get the renderer before draw time, but we could fix this. It would be nice for draw time layout algorithms to be able to assume this method, and a few objects already provide it, eg text. > This is an example of a more widespread problem that we have thought > about and discussed (including some good ideas from John, of course), > but solving it is not simple. For the time being, at least, we are > stuck with some imperfections. > > In any case, thanks for bringing the legend/LineCollection bug to my > attention. This is the sort of thing it is nice to get cleaned up > before the next release, coming soon. Do you know of some other simple > bugs like this we should look at ASAP? I added unit/legend_unit.py script to create legends using a scatter and vlines, which create RegPolyCollections and LineCollections. We should use more stuff like this in general, unit scripts which exercise the more arcane usages. JDH
Jouni K. Seppänen wrote: > Nils Wagner <nw...@ia...> writes: > >> File "/usr/lib64/python2.4/site-packages/matplotlib/legend.py", line >> 357, in _auto_legend_data >> hlines = handle.get_lines() >> AttributeError: LineCollection instance has no attribute 'get_lines' > > It seems that get_lines() was removed from LineCollection in revision > 2052 by Eric Firing: > > | r2052 | efiring | 2006年02月11日 22:56:42 +0200 (2006年2月11日) | 3 lines > | > | Add autolim kwarg to axes.add_collection; change get_verts() > | methods of collections accordingly. > > Perhaps Eric knows best how to fix _auto_legend_data()? > It is fixed now in svn--to the extent that it ever was. I put back get_lines() in collections and fixed a related bug in legend, so the test script now works in the sense that it makes a legend. It puts in an unlabeled line, presumably corresponding to the line collection making up the error bars. Maybe legend provides a way to avoid this. I haven't looked. The larger problem, and the one that probably made me yank get_lines (without realizing the legend code was using it--my mistake--I do try to check for things like that) is that legend really wants to know the draw-time locations of all plot elements, and for collections (among other things) this cannot be determined in general. The collection get_lines and get_verts methods can give the right answer to legend only if the data and offset transforms are the same. Sometimes they are, sometimes they are not. LineCollection.get_lines() probably could be improved to do a better job than at present, but never a perfect one. This is an example of a more widespread problem that we have thought about and discussed (including some good ideas from John, of course), but solving it is not simple. For the time being, at least, we are stuck with some imperfections. In any case, thanks for bringing the legend/LineCollection bug to my attention. This is the sort of thing it is nice to get cleaned up before the next release, coming soon. Do you know of some other simple bugs like this we should look at ASAP? Eric
Johann, Jouni K. Seppänen wrote: > "Werner F. Bruhin" <wer...@fr...> writes: > > >>>> Actually, I have other problems : I cannot save in many formats. The >>>> bmp is deemed usueless by gimp, >>>> >>> I didn't even know you can save in bmp format. Does png format work >>> better? >>> >>> >> .png works for me and GIMP does not complain when opening the >> generated png file. >> > > Could you file a bug about the bmp problem at > > http://sf.net/tracker/?group_id=80706&atid=560720 > > so it doesn't get overlooked? Please include a short example script > and the error message from Gimp. Thanks for reporting the problem! > I think you had the problem with the bmp file. Could you do the bug report? Werner
Nils Wagner <nw...@ia...> writes: > File "/usr/lib64/python2.4/site-packages/matplotlib/legend.py", line > 357, in _auto_legend_data > hlines = handle.get_lines() > AttributeError: LineCollection instance has no attribute 'get_lines' It seems that get_lines() was removed from LineCollection in revision 2052 by Eric Firing: | r2052 | efiring | 2006年02月11日 22:56:42 +0200 (2006年2月11日) | 3 lines | | Add autolim kwarg to axes.add_collection; change get_verts() | methods of collections accordingly. Perhaps Eric knows best how to fix _auto_legend_data()? -- Jouni K. Seppänen http://www.iki.fi/jks
"johann cohen-tanugi" <joh...@gm...> writes: > Actually, I have other problems : I cannot save in many formats. The > bmp is deemed usueless by gimp, I didn't even know you can save in bmp format. Does png format work better? > and ps and eps save options gives the following > error message (I am using matplotlib-0.90 on python/ipython 2.4) : > In [1]: show() > --------------------------------------------------------------------------- > exceptions.ValueError Traceback (most recent > call last) [...] > /usr/lib/python2.4/site-packages/matplotlib/mathtext.py in _get_info(self, > font, sym, fontsize, dpi) > 748 num = 0 > 749 sym = '.notdef' > --> 750 raise ValueError('unrecognized symbol "%s, %d"' % (sym, > num) ) > 751 filename = os.path.join(self.basepath, basename) + '.ttf' > 752 if filename not in bakoma_fonts: > > ValueError: unrecognized symbol ".notdef, 0" Not a very useful error message, given that it sets the values of the sym and num variables just before reporting the error. In current svn the line corresponding to your 749 is commented out, so if you could try either with the svn version or just comment out the line in your version, you would get a more useful diagnostic. The code looks like if latex_to_bakoma.has_key(sym): ... elif len(sym) == 1: ... else: ... raise ValueError(...) so it looks like you have used a symbol that mathtext doesn't know about and that isn't a single letter. I'm guessing that could mean a misspelled backslash command or a parsing problem like I mentioned in my previous email where "\tilde{}" is seen as "\tild". -- Jouni K. Seppänen http://www.iki.fi/jks
"johann cohen-tanugi" <joh...@gm...> writes: > If I do r'$A\tilde{B}$' the tilde is actually on the A !! It doesn't do that for me. Either this has been fixed between your question and now, or it depends on the specifics of your environment. The following simple test puts the tilde on B in both cases: In [22]:rcParams['text.usetex'] Out[22]:False In [23]:text(0,0,r'$A\tilde{B}$') Out[23]:<matplotlib.text.Text instance at 0x17b814e0> In [24]:text(1,0,r'$A\tilde B$') Out[24]:<matplotlib.text.Text instance at 0x17b81508> This is with the TkAgg backend and current svn version of matplotlib. What does this experiment produce for you? However, the following might be considered a bug: In [28]:text(1,1,r'$A\tilde{}B$') --------------------------------------------------------------------------- exceptions.ValueError Traceback (most recent call last) /private/tmp/<ipython console> ... ValueError: unrecognized symbol "\tild" I think John Hunter once said that Matplotlib's mathtext attempts to support a subset of LaTeX syntax, and any inconsistencies within that subset should be considered bugs. Admittedly it doesn't seem very likely that someone wants to but a raised tilde between two letters, but the error message indicates that the parsing is somehow very different from TeX. -- Jouni K. Seppänen http://www.iki.fi/jks
Hi all, In June '06, there was a short discussion on getting images displayed on log axes (thread: "showing an image on log axes?"). John Hunter posted this example code: from pylab import figure, show, nx fig = figure() ax = fig.add_subplot(111) im = nx.mlab.rand(500,500) ax.imshow(im, extent=(1,501,1,501)) ax.set_xscale('log') ax.set_yscale('log') show() This works, until one tries to change the display limits: ax.set_xlim(.1, 1e3) ax.set_ylim(.1, 1e3) show() The image is incorrectly drawn in the corner of the axes, instead of in the rectangular region defined by the image's extent. I think this is a bug (as of r3166). I've been trying to get around this problem with existing code, including the use of NonUniformImage()s. Perhaps it would be useful to have a general-purpose image class, something like a DataImage (rather than an AxesImage) that is similar to the NonUniformImage but respects transformations from data to axes coordinates (and could be used in log or polar plots). Something for the wishlist. Mike