From: John H. <jdh...@ac...> - 2005-06-07 16:22:51
|
Win32 Warning: This is the first release I've done since my windows build syste dies and I had to reinstall a bunch of tools and some version numbers in my GTK build environment changed (eg my GTK setup). Let me know if you encounter any problems. As always, try removing site-packages/matplotlib and reinstalling before reporting any problems TeX support : Now you can (optionally) use TeX to handle *all* of the text elements in your figure with the rc param text.usetex (*Agg and PS only). PS support requires tex, dvips and Ghostscript 8.51 (older versions do not work properly -- test your version with 'gs --version'). Agg support requires tex and dvipng. A directory ~/.tex.cache is created where support files are cached for later reuse. We opted to ues TeX rather than LaTeX because it is faster and can do all the things we thought useful for figure text snippets. See http://matplotlib.sf.net/screenshots.html#tex_demo and http://matplotlib.sf.net/matplotlib.texmanager.html. There are several new rc params for configuring tex/latex support # use tex/latex for all text handling text.usetex : False # tex is faster, but latex is required to use special font # packages. See font.latex.package text.tex.engine : latex # This must be an available LaTeX font package, # like 'times' or 'pslatex' ; only applies if text.usetex # is true font.latex.package : type1cm Special thanks to Darren Dale for lots of hair-pulling work customizing, enhancing and debugging the ps backend for LaTeX support. Masked arrays: Support for masked arrays in line plots, pcolor and contours. There are some problems with filled contours and masked arrays. Thanks Eric Firing and Jeffrey Whitaker. Contour levels arg changes: see http://matplotlib.sf.net/API_CHANGES for details Byte images: Much faster imaeg loading for MxNx4 or MxNx3 UInt8 images, which bypasses the memory and CPU intensive integer/floating point conversions. Nicolas Girard New image resize options interpolation options. New values for the interp kwarg are 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos', 'blackman' See help(imshow) for details, particularly the interpolation, filternorm and filterrad kwargs. Text and dashes - Daishi Harada contributed a patch for connecting text to points with lines. See examples/dashpointlabel.py and examples/dashtick.py Fast markers on win32: The marker cache optimization is finally available for win32, after an agg bug was found and fixed (thanks Maxim!). Line marker plots should be considerably faster now on win32. set deprecated: use setp instead; a simple, mostly braindead, conversion script is provided below Qt in ipython/pylab: You can now use qt in ipython pylab mode. Thanks Fernando Perez and the Orsay team! Agg wrapper proper: Started work on a proper agg wrapper to expose more general agg functionality in mpl. See examples/agg_test.py. Lots of wrapping remains to be done. New scalar formatter: Darren Dale did a lot of work to make scalar formatting smarter in pathalogical cases. See examples/newscalarformatter_demo.py Small features: linewidth and faceted kwarg to scatter to control edgewidth and color, autolegending now inspects line segments in addition to vertices, upgraded to agg23, new example showing how to use line collections examples/line_collection.py, fixed antialiased property setting in agg, added a postscript papersize rc option, added an example showing how to embed mpl in a qt app examples/embedding_in_qt.py, arrow keys now exposed in mpl's GUI neutral event handling, added "among" kwarg to axes picker function to limit picks, added autoscale_on property to Axes to control whether or not autoscaling is done. Bug fixes: fixed a contour masked array bug, contour memory leak # Here is a script to recursively convert set and get to setp and # getp. Please backup entire directory recursively before # running this script from matplotlib.cbook import listFiles for fname in listFiles('.', '*.py'): lines = [] cnt = 0 for line in file(fname): if line.lstrip().startswith('set('): line = line.replace('set(', 'setp(') cnt +=1 if line.lstrip().startswith('get('): line = line.replace('get(', 'getp(') cnt +=1 lines.append(line) file(fname, 'w').writelines(lines) print '%s\t: %d replacements'%(fname,cnt) |
From: Nicolas G. <nic...@ne...> - 2005-06-07 16:31:39
|
On Tuesday 07 June 2005 18:22, John Hunter wrote: > Byte images: Much faster imaeg loading for MxNx4 or MxNx3 UInt8 > =A0 images, which bypasses the memory and CPU intensive integer/floating > =A0 point conversions. =A0Nicolas Girard Well... I'm afraid I've been confused with another guy... Nicolas |
From: John H. <jdh...@ac...> - 2005-06-07 16:36:23
|
>>>>> "Nicolas" =3D=3D Nicolas Girard <nic...@ne...> writes: Nicolas> On Tuesday 07 June 2005 18:22, John Hunter wrote: >> Byte images: Much faster imaeg loading for MxNx4 or MxNx3 UInt8 >> =A0 images, which bypasses the memory and CPU intensive >> integer/floating =A0 point conversions. =A0Nicolas Girard Nicolas> Well... I'm afraid I've been confused with another guy... Yes :-) That would be Nicholas Young... Thanks for the heads up. JDH |
From: Ted D. <ted...@jp...> - 2005-06-07 16:53:29
|
Darren, You are correct - the way the Qt window is being draw causes the toolbar to overlay the plot so you end up w/ a reduced size plot. The real problem is that we used a QtToolbar class to implement the toolbar. The QtToolbar supports dragging, collapsing, and unhooking of the toolbar just like MS Word and other applications. This makes it very difficult to control where the toolbar ends up and control the final sizes of the widgets. I think the simplest fix is change the toolbar to a collection of buttons and explicitly control the layout for them. It shouldn't be very difficult but I'm going on vacation tomorrow so we might not get to it until next week. While we're doing this we'll also move the numeric x,y readout into the toolbar (it's currently below the toolbar) to save space and follow the pattern used in the Tk and Gtk backends. Ted > > I have a question about figure size in pylab, which presently includes the > toolbar. I think figure(figsize=(3,3)) should create a 3x3in plot > window, and > append the toolbar below it. The effect is more noticeable on the QtAgg and > WXAgg backends, where the coordinates are reported below the toolbar. Is > this > a bug or a feature? > > Darren > |
From: Nicolas G. <nic...@ne...> - 2005-06-07 16:51:54
|
On Tuesday 07 June 2005 18:22, John Hunter wrote: > TeX support : Now you can (optionally) use TeX to handle *all* of the > =A0 text elements in your figure with the rc param text.usetex (*Agg and > =A0 PS only). Now, that's *just* great ! A big thank you for adding this feature ! I just seem to have problems whith accentuated characters: neither "=E9", n= or=20 "\'e" work for me... any ideas ? cheers nicolas |
From: John H. <jdh...@ac...> - 2005-06-07 16:57:55
|
>>>>> "Nicolas" =3D=3D Nicolas Girard <nic...@ne...> writes: Nicolas> On Tuesday 07 June 2005 18:22, John Hunter wrote: >> TeX support : Now you can (optionally) use TeX to handle *all* >> of the =A0 text elements in your figure with the rc param >> text.usetex (*Agg and =A0 PS only). Nicolas> Now, that's *just* great ! A big thank you for adding Nicolas> this feature ! Nicolas> I just seem to have problems whith accentuated Nicolas> characters: neither "=E9", nor "\'e" work for me... any Nicolas> ideas ? Did you remember to quote the string from pylab import plot, title, show, rc rc('text', usetex=3DTrue) title(r'Acc\'ent') show() I don't believe unicode works with usetex at this time -- file a support request on the sf site with an example script that you believe should work (eg the string works in TeX) but does does not work in mpl. =20 JDH |
From: Gary <pa...@in...> - 2005-06-07 17:02:10
|
John Hunter wrote: >Win32 Warning: This is the first release I've done since my windows > > I'm still at python 2.3.x. (I don't plan to upgrade until some kind soul makes a scipy WinXP installer for python 2.4) The mpl website still says python 2.2+ is required. Just checking: is that still correct? Will mpl work with python 2.3.x ?? thanks, -g ... can't wait to try the TeX support! |
From: John H. <jdh...@ac...> - 2005-06-07 19:00:33
|
>>>>> "Gary" == Gary <pa...@in...> writes: Gary> I'm still at python 2.3.x. (I don't plan to upgrade until Gary> some kind soul makes a scipy WinXP installer for python 2.4) Gary> The mpl website still says python 2.2+ is required. Just Gary> checking: is that still correct? Will mpl work with python Gary> 2.3.x ?? Yes, and there is a windows installer for 2.3 on the mpl website. Gary> ... can't wait to try the TeX support! TeX support is untested on win32. Do you have tex installed on your XP box? You will also need dvipng for agg (is there a dvipng port for win32?). My guess is you will run into some troubles, which can probably be fixed. If you are only interested in postscript, and have tex, dvips and ghostscript, there is a fighting chance it will work. JDH |
From: Nicolas G. <nic...@ne...> - 2005-06-07 17:09:20
|
On Tuesday 07 June 2005 18:57, John Hunter wrote: > Did you remember to quote the string > > from pylab import plot, title, show, rc > rc('text', usetex=True) > title(r'Acc\'ent') > show() > I'm dumb... I took care of writing r"..." to test maths, but forgot the leading 'r' to test the accentuated characters... sorry, everything works like a charm ! By the way, when text.usetex is set to True, could one imagine to be able to use string arguments to the mpl text routines whithout that leading 'r' ? > I don't believe unicode works with usetex at this time -- file a > support request on the sf site with an example script that you believe > should work (eg the string works in TeX) but does does not work in > mpl. Well, I think I won't need them, accentuated characters are enough for me, thanks ! nicolas |
From: John H. <jdh...@ac...> - 2005-06-07 18:57:49
|
>>>>> "Nicolas" == Nicolas Girard <nic...@ne...> writes: Nicolas> By the way, when text.usetex is set to True, could one Nicolas> imagine to be able to use string arguments to the mpl Nicolas> text routines whithout that leading 'r' ? The need to use raw strings is a python requirement and not a matplotlib requirement >>> s = 'this is \nu' >>> print s this is u >>> backslash has a special meaning to python, and the only way around this is to either hack your own python shell (eg modify ipython), quote the slash (eg use \\) or use a raw string. Of course, if your TeX expression has no special characters (eg no backslashes) then you will not need the raw string quote. JDH |
From: <and...@ti...> - 2005-06-07 21:29:45
|
Hello John & NG, I have just downloaded matplotlib 0.81, and I am having some problems= with the ToolBar. The "Back" and "Forward" icons in the ToolBar2 are not shown. The buttons are completely grey and they seem inactive. Is this th= e expected behavior? I think it is not. However, my configuration is: - Windows XP - wxPython 2.6.1.0 - MatPlotLib 0.81 - WXAgg backend - ToolBar2 Other RC params are defaulted. I notice this behavior on every demo in the examples.zip folder. Thanks for every suggestion. Andrea. |
From: John H. <jdh...@ac...> - 2005-06-08 15:16:53
|
>>>>> "andrea" == andrea gavana <and...@ti...> writes: andrea> Hello John & NG, I have just downloaded matplotlib 0.81, andrea> and I am having some problems with the ToolBar. The "Back" andrea> and "Forward" icons in the ToolBar2 are not shown. The andrea> buttons are completely grey and they seem inactive. Is andrea> this the expected behavior? I think it is not. However, andrea> my configuration is: andrea> - Windows XP - wxPython 2.6.1.0 - MatPlotLib 0.81 - WXAgg andrea> backend - ToolBar2 This is a feature and a bug. The feature part is that Werner Bruhin added a patch to "gray out" the forward and back buttons when clicking them produces no effect. Eg, if there is no back (your first view of the figure) the button should be grayed out. If you navigate somewhere, the button will be enabled. The bug is that on win32 with wxpython 2.6.1 instead of presenting a grayed out version of the button the button is a solid gray rectangle, and it is visually very disturbing to see it toggle between an arrow and a gray rectangle. On linux with wx 2.5.3, the arrow button still looks like an arrow, but is gray to indicate "not enabled" Does this feature work properly for anyone on windows? Other WX/Windows users, please send me your wxpython version numbers and let me know if this is working for you so we can file a bug report to the wx list. You can get your wxpython version by running your script with > python myscript.py -dWXAgg --verbose-helpful Thanks! JDH |
From: Werner F. B. <wer...@fr...> - 2005-06-08 15:35:41
|
John Hunter wrote: >>>>>>"andrea" == andrea gavana <and...@ti...> writes: > > > andrea> Hello John & NG, I have just downloaded matplotlib 0.81, > andrea> and I am having some problems with the ToolBar. The "Back" > andrea> and "Forward" icons in the ToolBar2 are not shown. The > andrea> buttons are completely grey and they seem inactive. Is > andrea> this the expected behavior? I think it is not. However, > andrea> my configuration is: > > andrea> - Windows XP - wxPython 2.6.1.0 - MatPlotLib 0.81 - WXAgg > andrea> backend - ToolBar2 > > This is a feature and a bug. The feature part is that Werner Bruhin > added a patch to "gray out" the forward and back buttons when clicking > them produces no effect. Eg, if there is no back (your first view of > the figure) the button should be grayed out. If you navigate > somewhere, the button will be enabled. Not guilty here, at least not on purpose, someone else might have put in a patch to enable/disable the buttons. But in the disabled state they should still show the black and white version (using the alpha channel). I looked at it when I saw Andrea's post but can't figure out why they show a grey block instead of a black and white version of the button. This is a problem I do have on the Win 2000 with my own app/images, but on XP the alpha channel stuff works correctly. I'll have another look at it. See you Werner > > The bug is that on win32 with wxpython 2.6.1 instead of presenting a > grayed out version of the button the button is a solid gray rectangle, > and it is visually very disturbing to see it toggle between an arrow > and a gray rectangle. On linux with wx 2.5.3, the arrow button still > looks like an arrow, but is gray to indicate "not enabled" > > Does this feature work properly for anyone on windows? Other > WX/Windows users, please send me your wxpython version numbers and let > me know if this is working for you so we can file a bug report to the > wx list. You can get your wxpython version by running your script > with > > > python myscript.py -dWXAgg --verbose-helpful > > Thanks! > JDH > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput > a projector? How fast can you ride your desk chair down the office luge track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 |
From: Werner F. B. <wer...@fr...> - 2005-06-08 16:04:04
Attachments:
toolbartest.png
|
Hi John, John Hunter wrote: >>>>>>"andrea" == andrea gavana <and...@ti...> writes: > > > andrea> Hello John & NG, I have just downloaded matplotlib 0.81, > andrea> and I am having some problems with the ToolBar. The "Back" > andrea> and "Forward" icons in the ToolBar2 are not shown. The > andrea> buttons are completely grey and they seem inactive. Is > andrea> this the expected behavior? I think it is not. However, > andrea> my configuration is: > > andrea> - Windows XP - wxPython 2.6.1.0 - MatPlotLib 0.81 - WXAgg > andrea> backend - ToolBar2 > > This is a feature and a bug. The feature part is that Werner Bruhin > added a patch to "gray out" the forward and back buttons when clicking > them produces no effect. Eg, if there is no back (your first view of > the figure) the button should be grayed out. If you navigate > somewhere, the button will be enabled. Just did a little test with the back.png file - see attached it shows in black and white if it is NOT enabled. However here stops the good news, I can't figure out what needs to be changed in matplotlib to get the same result. Hacked "_load_bitmap2" which used the "png" file but then I get the normal image instead of the black and white one. I'll keep looking, but if anyone has an idea it will be very welcome. See you Werner > > The bug is that on win32 with wxpython 2.6.1 instead of presenting a > grayed out version of the button the button is a solid gray rectangle, > and it is visually very disturbing to see it toggle between an arrow > and a gray rectangle. On linux with wx 2.5.3, the arrow button still > looks like an arrow, but is gray to indicate "not enabled" > > Does this feature work properly for anyone on windows? Other > WX/Windows users, please send me your wxpython version numbers and let > me know if this is working for you so we can file a bug report to the > wx list. You can get your wxpython version by running your script > with > > > python myscript.py -dWXAgg --verbose-helpful > > Thanks! > JDH > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput > a projector? How fast can you ride your desk chair down the office luge track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 |
From: Werner F. B. <wer...@fr...> - 2005-06-10 15:04:58
Attachments:
backend_wx.py
wxcursor_demoToolbar.py
|
Hi John and Andrea, John Hunter wrote: >>>>>>"andrea" == andrea gavana <and...@ti...> writes: > > > andrea> Hello John & NG, I have just downloaded matplotlib 0.81, > andrea> and I am having some problems with the ToolBar. The "Back" > andrea> and "Forward" icons in the ToolBar2 are not shown. The > andrea> buttons are completely grey and they seem inactive. Is > andrea> this the expected behavior? I think it is not. However, > andrea> my configuration is: > > andrea> - Windows XP - wxPython 2.6.1.0 - MatPlotLib 0.81 - WXAgg > andrea> backend - ToolBar2 > > This is a feature and a bug. The feature part is that Werner Bruhin > added a patch to "gray out" the forward and back buttons when clicking > them produces no effect. Eg, if there is no back (your first view of > the figure) the button should be grayed out. If you navigate > somewhere, the button will be enabled. The grey square is due to using "xpm" file formats for the button images (disabled state). Attached is a version backend_wx.py which uses "png" files for the "back" and "forward" button. In theory this should show a black & white version of the button when it is disabled (applying the alpha channel, only supported by wx with png files). However for whatever reason this does not work with matplotlib's toolbar, it works very nicely when I create a test toolbar (see the image sent with my previous mail on this thread, or run the attached wx_cursor_demoToolbar.py using the attached backend_wx.py). I tried to narrow it down but but up to now without any luck. I attached a demo file which shows how the button should look (hacked together toolbar with only back and forward button). If you change the two lines below in the demo (comment the myadd_toolbar line and uncomment the other one you will get the normal matplotlib toolbar, but the disable button stuff doesn't work. ## self.add_toolbar() # comment this out for no toolbar self.myadd_toolbar() Maybe someone else who know matplotlib better then I do might have an idea on what is going on. See you Werner > > The bug is that on win32 with wxpython 2.6.1 instead of presenting a > grayed out version of the button the button is a solid gray rectangle, > and it is visually very disturbing to see it toggle between an arrow > and a gray rectangle. On linux with wx 2.5.3, the arrow button still > looks like an arrow, but is gray to indicate "not enabled" > > Does this feature work properly for anyone on windows? Other > WX/Windows users, please send me your wxpython version numbers and let > me know if this is working for you so we can file a bug report to the > wx list. You can get your wxpython version by running your script > with > > > python myscript.py -dWXAgg --verbose-helpful > > Thanks! > JDH > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput > a projector? How fast can you ride your desk chair down the office luge track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 |
From: dimitri p. <dim...@gm...> - 2005-06-07 22:48:45
|
Great! 0.81 solves the problem I had earlier with the graph plot in PyGTK. Thanks, Dimitri On 6/7/05, John Hunter <jdh...@ac...> wrote: >=20 >=20 > Win32 Warning: This is the first release I've done since my windows > build syste dies and I had to reinstall a bunch of tools and some > version numbers in my GTK build environment changed (eg my GTK > setup). Let me know if you encounter any problems. As always, try > removing site-packages/matplotlib and reinstalling before reporting > any problems >=20 > TeX support : Now you can (optionally) use TeX to handle *all* of the > text elements in your figure with the rc param text.usetex (*Agg and > PS only). PS support requires tex, dvips and Ghostscript 8.51 > (older versions do not work properly -- test your version with > 'gs --version'). Agg support requires tex and dvipng. A > directory ~/.tex.cache is created where support files are cached for > later reuse. We opted to ues TeX rather than LaTeX because it is > faster and can do all the things we thought useful for figure text > snippets. See http://matplotlib.sf.net/screenshots.html#tex_demo > and http://matplotlib.sf.net/matplotlib.texmanager.html. There are > several new rc params for configuring tex/latex support >=20 > # use tex/latex for all text handling > text.usetex : False > # tex is faster, but latex is required to use special font > # packages. See font.latex.package > text.tex.engine : latex >=20 > # This must be an available LaTeX font package, > # like 'times' or 'pslatex' ; only applies if text.usetex > # is true > font.latex.package : type1cm >=20 > Special thanks to Darren Dale for lots of hair-pulling work > customizing, enhancing and debugging the ps backend for LaTeX > support. >=20 > Masked arrays: Support for masked arrays in line plots, pcolor and > contours. There are some problems with filled contours and masked > arrays. Thanks Eric Firing and Jeffrey Whitaker. >=20 > Contour levels arg changes: see http://matplotlib.sf.net/API_CHANGES > for details >=20 > Byte images: Much faster imaeg loading for MxNx4 or MxNx3 UInt8 > images, which bypasses the memory and CPU intensive integer/floating > point conversions. Nicolas Girard >=20 > New image resize options interpolation options. New values for the > interp kwarg are >=20 > 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', > 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', 'catrom', > 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos', 'blackman' >=20 > See help(imshow) for details, particularly the interpolation, > filternorm and filterrad kwargs. >=20 > Text and dashes - Daishi Harada contributed a patch for connecting > text to points with lines. See examples/dashpointlabel.py and > examples/dashtick.py >=20 > Fast markers on win32: The marker cache optimization is finally > available for win32, after an agg bug was found and fixed (thanks > Maxim!). Line marker plots should be considerably faster now on > win32. >=20 > set deprecated: use setp instead; a simple, mostly braindead, > conversion script is provided below >=20 > Qt in ipython/pylab: You can now use qt in ipython pylab mode. Thanks > Fernando Perez and the Orsay team! >=20 > Agg wrapper proper: Started work on a proper agg wrapper to expose > more general agg functionality in mpl. See examples/agg_test.py. > Lots of wrapping remains to be done. >=20 > New scalar formatter: Darren Dale did a lot of work to make scalar > formatting smarter in pathalogical cases. See > examples/newscalarformatter_demo.py >=20 > Small features: linewidth and faceted kwarg to scatter to control > edgewidth and color, autolegending now inspects line segments in > addition to vertices, upgraded to agg23, new example showing how to > use line collections examples/line_collection.py, fixed antialiased > property setting in agg, added a postscript papersize rc option, > added an example showing how to embed mpl in a qt app > examples/embedding_in_qt.py, arrow keys now exposed in mpl's GUI > neutral event handling, added "among" kwarg to axes picker function > to limit picks, added autoscale_on property to Axes to control > whether or not autoscaling is done. >=20 > Bug fixes: fixed a contour masked array bug, contour memory leak >=20 >=20 >=20 >=20 > # Here is a script to recursively convert set and get to setp and > # getp. Please backup entire directory recursively before > # running this script >=20 > from matplotlib.cbook import listFiles >=20 > for fname in listFiles('.', '*.py'): >=20 > lines =3D [] > cnt =3D 0 > for line in file(fname): > if line.lstrip().startswith('set('): > line =3D line.replace('set(', 'setp(') > cnt +=3D1 > if line.lstrip().startswith('get('): > line =3D line.replace('get(', 'getp(') > cnt +=3D1 > lines.append(line) >=20 > file(fname, 'w').writelines(lines) > print '%s\t: %d replacements'%(fname,cnt) >=20 >=20 > ------------------------------------------------------- > This SF.Net <http://SF.Net> email is sponsored by: NEC IT Guy Games. How= =20 > far can you shotput > a projector? How fast can you ride your desk chair down the office luge= =20 > track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=3D20 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >=20 --=20 Please visit dimitri's website: www.serpia.com <http://www.serpia.com> |