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
(13) |
2
(11) |
3
(2) |
4
(4) |
5
(28) |
6
(17) |
7
(28) |
8
(6) |
9
(6) |
10
|
11
|
12
(9) |
13
(13) |
14
(21) |
15
(16) |
16
(6) |
17
(3) |
18
(3) |
19
(8) |
20
(15) |
21
(33) |
22
(10) |
23
(17) |
24
(2) |
25
(5) |
26
(23) |
27
(18) |
28
(6) |
|
|
|
> But this fails to plot the first rectange in the resulting plot. The > second, red rectangle is painted correctly in the resulting plot, but > the first one is totaly missing in the plot, leaving only a line in > the plot. Is there some kind of internal status that has to be > resettet in the actors? When you add an artist to the Axes, it checks to see if you have set a transformation. If you haven't, it will set the default axes transformation. If you have, it leaves the transformation unchanged. This is why you are seeing the problems you see. Before adding them to the second axes, you need to reset the transformation for each line, text, etc.... for artist in ax.get_child_artists(): artist.set_transform(ax2.transData) if isinstance(artist, Line2D): ax2.add_line(artist) elif .... should work.... JDH
I try to take artists from one subplot instance and add them to another: ------------------------- from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure from matplotlib.patches import Patch, Rectangle from matplotlib.lines import Line2D fig =3D Figure() canvas =3D FigureCanvas(fig) ax =3D fig.add_subplot(111) ax.add_patch(Rectangle((.5, 1.5), 1, .2)) fig2 =3D Figure() canvas2 =3D FigureCanvas(fig2) ax2 =3D fig2.add_subplot(111) for artist in ax.get_child_artists(): if isinstance(artist, Line2D): ax2.add_line(artist) elif isinstance(artist, Patch): ax2.add_patch(artist) ax2.add_patch(Rectangle((1.5, 2.5), 1, .2, facecolor=3D'r')) ax2.set_aspect("equal") ax2.autoscale_view() w, h =3D fig2.get_size_inches() xmin, xmax =3D ax2.get_xlim() ymin, ymax =3D ax2.get_ylim() xext =3D xmax - xmin yext =3D ymax - ymin if xext < yext: w =3D h * xext/yext else: h =3D w * yext/xext =20=20=20=20 size =3D fig2.set_size_inches(w, h) canvas2.print_figure('copy2.eps') ------------------------- But this fails to plot the first rectange in the resulting plot. The second, red rectangle is painted correctly in the resulting plot, but the first one is totaly missing in the plot, leaving only a line in the plot. Is there some kind of internal status that has to be resettet in the actors? Kind regards Berthold --=20 ber...@xn... / <http://h=C3=B6llmanns.de/> bh...@we... / <http://starship.python.net/crew/bhoel/>
On 07/02/07, Michael Lerner <mgl...@gm...> wrote: > That works for me. Thanks. I was trying to muck around with _lut > directly and make a sentinel version of LinearSegmentedColormap. As I > didn't really know what I was doing, I was having some strange > results. Also, in case other folks don't realize this, you can > initialize this with a Colormap, LinearSegmentedColormap, etc. > > I'd be happy to update the SciPy wiki. Please do. I believe the original code was written by Andrew Straw; at least he put it up on the wiki. A word of warning: because the code replaces various Normalize methods, it's not guaranteed to work with future mpl releases. It would be nice if something like this, but perhaps more efficient, was included in matplotlib. It's a useful thing to be able to do. Regards, George.
I've just installed matplotlib on a 64 bit server running Suse Linux Enterprise Server 9. I followed the instructions on the Installing section from the webpage and everything seemed to install fine using the defaults. I installed the latest version of Numpy, 1.0.1, then proceeded to install matplotlib. (I had the devel packages of freetype, libpng, and zlib installed.) I don't need a GUI Backend so I wasn't worried about getting them installed properly. Everything seems fine, I can import numpy and matplotlib into python. However, I run into this problem when trying to do an import. Here's the sample code: #!/usr/bin/env python import os import tempfile import matplotlib matplotlib.use('Agg') # force the antigrain backend from matplotlib import rc from matplotlib.backends.backend_agg import FigureCanvasAgg from matplotlib.figure import Figure from matplotlib.cbook import iterable import matplotlib.numerix as nx ***snip*** And here is the output: $ python test_matlib.py The import of the numpy version of the _image module, _ns_image, failed. This is is either because numpy was unavailable when matplotlib was compiled, because a dependency of _ns_image could not be satisfied, or because the build flag for this module was turned off in setup.py. If it appears that _ns_image was not built, make sure you have a working copy of numpy and then re-install matplotlib. Otherwise, the following traceback gives more details: Traceback (most recent call last): File "test_matlib.py", line 7, in ? from matplotlib.backends.backend_agg import FigureCanvasAgg File "/usr/local/lib/python2.3/site-packages/matplotlib/backends/backend_agg. py", line 77, in ? from matplotlib._image import fromarray File "/usr/local/lib/python2.3/site-packages/matplotlib/_image.py", line 17, in ? from matplotlib._ns_image import * ImportError: /usr/local/lib/python2.3/site-packages/matplotlib/_ns_image.so: undefined symbol: _ZNSs4_Rep20_S_empty_rep_storageE $ It seems like it's something very simple, but I can't seem to find what went wrong. Anybody have any ideas?? Thanks Josh =20 =20 -------------------------------------------------------- Information in this e-mail may be confidential. It is intended only for = the addressee(s) identified above. If you are not the addressee(s), or = an employee or agent of the addressee(s), please note that any = dissemination, distribution, or copying of this communication is = strictly prohibited. If you have received this e-mail in error, please = notify the sender of the error.
Rob Hetland wrote: > The MPL Qt backend requires PyQt (or, better, Qt4 and PyQt4). PyQt does > compile against the Qt Library, and also takes quite a while to > complete. I guess I wasn't clear -- does the MPL QT back-end compile against QT? Or can you just install PyQt after MPL, and have it work? I'm on a quest to get as complete as possible a MPL binary for OS-X, so I need to know if I need to have PyQt all working to build an MPL binary that supports it. > PyQt does not use setuptools, and I am not sure how to make a > generally usable binary distribution from it. Does it build with distutils? If so, then, in theory, you can use bdist_mpkg to build a binary package. bdist_mpkg comes with Py2app. I say "in theory" because PyQt is pretty complex, so it may not s work out of the box. However, there was some work done a while back adapting py2app to support it, so it just may work. If it doesn't the folks on pythonmac list can probably help. > I would say that installation is quite easy (although time consuming) -- > perhaps just a good set of directions on the MPL site? That would certainly be a start -- though shouldn't such directions be on a QT or MacPython site. The pythonmac Wiki has had troubles lately, I'm afraid, though it seems to be up at the moment: http://www.pythonmac.org/wiki -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...
Perry Greenfield wrote: > On Feb 7, 2007, at 10:21 AM, John Hunter wrote: > > >> On 2/7/07, Edin Salkovic <edi...@gm...> wrote: >> >> >>> Why can't mpl's figures be pickled? >>> >> The main thing is we need to add pickle support for all of mpl's >> extension code >> >> http://docs.python.org/lib/node321.html >> >> In earlier attempts people got stuck with trying to pickle the >> CXX extension code, which was causing some problems, but these >> problems may be fixed in more recent versions of CXX. Todd Miller was >> the last person to look at this in some detail, I think. >> >> > I think Todd did get it to work, but I'll copy him on this just to make > sure. > I looked at this in the context of numarray session saving and restoring. In that context, I believed there was a general problem with extension types not being picklable as a matter of developer expediency: first order, pickling support often doesn't get done. So my approach was to fudge a little and create "proxy" objects for things which wouldn't pickle rather than "fix all extension types." Where I left off CXX still didn't support pickling but a Python session with matplotlib and numarray could be saved; numarray arrays would be preserved, matplotlib objects would be "proxied" but unfortunately the proxies don't work in that case. Todd >> Other hinderances may come from the GUI layer, since figures store >> pointers to their canvases which in some cases come from GUI extension >> code that may not support pickling. But we can fairly easy decouple >> the figure from the canvas at pickle time and deal with pure mpl, >> numpy and python objects. The main work is to add pickle >> serialization to the mpl extension code. >> >> ---------------------------------------------------------------------- >> --- >> Using Tomcat but need to do more? Need to support web services, >> security? >> Get stuff done quickly with pre-integrated technology to make your >> job easier. >> Download IBM WebSphere Application Server v.1.0.1 based on Apache >> Geronimo >> http://sel.as-us.falkag.net/sel? >> cmd=lnk&kid=120709&bid=263057&dat=121642 >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Werner F. Bruhin wrote: > Great to see a new release, will put some time aside to test it with > wxPython early next week. looking forward to your reports. > which versions of wxPython are supported? I haven't tried the new one, but the last release worked well with wxPython2.6.3, but had some issues with 2.8.* -- I don't think anyone has addressed those yet. > Well, we haven't built any binaries yet. We pushed a source release > fast to try to get it into Feisty. Sorry Chris! well, I've been chattering on about this for awhile, but haven't contributed anything yet... > With wx2.8 out now > and this being a major release, we definitely need to rethink wx > builds. We stuck with unicode for 0.87 to avoid confusion. I would > be happy to hear what wx users think/want. I think it's time to just all unicode, all the way, but I mostly deal with English anyway. > For me the ideal would be not to be depended on a particular release of > wxPython - big surprise no :-) That would be nice. > If I understand it correctly the dependency came in for performance > optimization, does 2.8 change something for this. Perhaps. 2.8 has methods for directly setting the data in wxBitmaps. Before that, you needed to create a wxImage, then convert that to a bitmap. However, to do that right, you'd need to be able to get the Agg bitmap as a Python buffer object that is in the binary form required by the platform. I think the majors need RGB and/or RGBA, but I'm not totally sure about that (maybe OS-X is ARGB?) > - If yes, I would not see a problem with 0.9 requiring as a minimum > 2.8.0.1 but going forward I could use any 2.8.x or newer release. That would be a good way to go, or have fallback on the older methods for less than 2.8 -- so instead of saying "you need 2.8 to use the wx backend" we can say: "you'll get better performance with wx if you use > 2.8" > - If no, then I guess we have to live with having a "fixed" dependency, > e.g. 0.87 is wxPython 2.6.x, 0.90 is wxPython 2.8.x, but it should > through at least a warning if one tries to use it with another wxPython > release. Yes, it should. I've also started a patch for the build system that tries harder to make sure that you are building against the same wx that you are running -- that will at least help people built it themselves more easily. NOTE: I took a look at the wx backend code a while ago, and it looks like even without the new Bitmap handlers in 2.8, it could be faster with straight Python code. Key is that a wxImage can be created from a Python buffer object without copying the data. So if we can expose the Agg buffer as a Python buffer, as RGB, then we should be able to get decent performance with pure python. You'd still need to do the wxBitmapFromImage thing, but the accelerated back-end does that too. Look for a thread on this list a while back, with my and Ken's name on it. -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...
On Feb 7, 2007, at 10:21 AM, John Hunter wrote: > On 2/7/07, Edin Salkovic <edi...@gm...> wrote: > >> Why can't mpl's figures be pickled? > > The main thing is we need to add pickle support for all of mpl's > extension code > > http://docs.python.org/lib/node321.html > > In earlier attempts people got stuck with trying to pickle the > CXX extension code, which was causing some problems, but these > problems may be fixed in more recent versions of CXX. Todd Miller was > the last person to look at this in some detail, I think. > I think Todd did get it to work, but I'll copy him on this just to make sure. > Other hinderances may come from the GUI layer, since figures store > pointers to their canvases which in some cases come from GUI extension > code that may not support pickling. But we can fairly easy decouple > the figure from the canvas at pickle time and deal with pure mpl, > numpy and python objects. The main work is to add pickle > serialization to the mpl extension code. > > ---------------------------------------------------------------------- > --- > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
On 2/7/07, Edin Salkovic <edi...@gm...> wrote: > Why can't mpl's figures be pickled? The main thing is we need to add pickle support for all of mpl's extension code http://docs.python.org/lib/node321.html In earlier attempts people got stuck with trying to pickle the CXX extension code, which was causing some problems, but these problems may be fixed in more recent versions of CXX. Todd Miller was the last person to look at this in some detail, I think. Other hinderances may come from the GUI layer, since figures store pointers to their canvases which in some cases come from GUI extension code that may not support pickling. But we can fairly easy decouple the figure from the canvas at pickle time and deal with pure mpl, numpy and python objects. The main work is to add pickle serialization to the mpl extension code.
On 2/7/07, Marco Fumana <fu...@la...> wrote: > Hello, > I'm using matplotlib 0.85 in FigureCanvasGTKAgg backend. > I'm usign mpl_connect method to connect mouse event to function, but > I'm not able to capture mouse wheel motion. > Could somebody help me?lotlib-users Hmm, this surprised me but I just confirmed it. In older versions of gtk, if I recall correctly and maybe Steve can confirm, you could get scroll events as buttons 4 and 5 on button_press_event, but it looks like you now have to explicitly connect to scroll_event apparently. mpl should encapsulate the scroll_event across backends, me thinks. For now you should be able to do canvas.connect('scroll_event', yourfunc) but these will be GTK events and callbacks so they will have a different signature than the mpl callback and will not have the mpl metadata like xdata and ydata. JDH
On 2/7/07, Edin Salkovic <edi...@gm...> wrote: > > On 2/4/07, Eric Firing <ef...@ha...> wrote: > > Jan Strube wrote: > > > Hi List, > > > is there a way to store matplotlib figures in something like a native > > > file format? > > > I am thinking of something that keeps track of all the objects > > > (patches(?)) in a mpl figure, so that later you could just revisit > that > > > figure and change properties. > > > Or add/remove objects from the canvas. > > > I didn't find anything on the website. > > > Thanks, > > > Jan > > > > No, there is no mechanism for doing this, although I think it has been > > requested before. > > > > Eric > > > > Why can't mpl's figures be pickled? > > Best, > Edin > Sorry, don't know anything about pickling. Is it device-independent? If I have a problem, could I pickle the figure, attach it to a bug report? Can I share the files with colleagues on different architechtures? If so, it maybe good enough. But otherwise I was more thinking of something like YAML or so. Cheers, Jan
Hi Rob, On Wednesday 07 February 2007 09:06:42 am Rob Hetland wrote: > Developers: Finally, I had to make some small changes to the qt4 > backend so that things worked right. One is an essential change -- > the latin1() method no longer exists in the newer qt. The other is a > cosmetic change so that I can see the cursor position in the toolbar > better. Diff below. Thanks for the notes, and for the patch. I moved the margin adjustment you suggested into a class attribute of NavigationToolbar2QT. This way, FigureManagerQT can get that information, which is needed to properly set the height of the figure window. (figsize=(6,4) should yield a 6"x4" plotting area, the height of the entire window is larger than 4" to accommodate the toolbar.) Changes in svn 3004. Darren
That works for me. Thanks. I was trying to muck around with _lut directly and make a sentinel version of LinearSegmentedColormap. As I didn't really know what I was doing, I was having some strange results. Also, in case other folks don't realize this, you can initialize this with a Colormap, LinearSegmentedColormap, etc. I'd be happy to update the SciPy wiki. Is it customary to give credit to various authors (obviously George Nurser and the original author, not me) in the doc strings, wiki text or what? Thanks, -michael On 2/6/07, George Nurser <gn...@go...> wrote: > On 05/02/07, John Hunter <jd...@gm...> wrote: > > On 2/5/07, Michael Lerner <mgl...@gm...> wrote: > > > Hi, > > > > > > I have some data where I'd like almost all of it to be plotted with a > > > LinearSegmentedColormap that I've made, but I have a few special > > > values that I'd like to set to specific colors (white, in this case). > > > So, I made a LinearSegmentedColormap that works pretty well, but I'm > > > having trouble with the rest. I found a nice-looking example at > > > > > > http://www.scipy.org/Cookbook/Matplotlib/Plotting_Images_with_Special_Values > > > > > > But, it doesn't work for me. In particular, it complains a lot about > > > _lut. I'm using matplotlib 0.87.7 on an intel Mac running OS X and > > > python 2.4. > > > > On a very quick read, it appears that the sentinel map in that example > > forgot to initialize the baseclass. Eg, you need > > > > class SentinelMap(Colormap): > > def __init__(self, cmap, sentinels={}): > > Colormap.__init__(self) # init the base class > > # boilerplate stuff - rest of init function here > > > > See if that helps, and let us know. If you get it working, please fix > > the wiki (you may have to sign up) and post your example along with > > it. > > > > Otherwise, please post a complete code example and we'll see what we can do. > > > > JDH > > > > > > > > > > Can someone show me how to make a sentinel'd version of a > > > LinearSegmentedColormap? > > > > > > Thank you, > > > > > > -Michael Lerner > > I had the same problem that you did with the sentinels.py. > > I modified the code so that it did work, and attach it here. you can > test it by running it. It only works with numpy, because it uses > fancy indexing. I'm pretty sure it's not done the fastest way. > > You first make up the colormap instance for the real data, without any > sentinels. > then use the colormap instance as an argument to the sentinel > colormap. This is why it > doesn't do a Colormap.__init__(self). Not sure that's really best, > but i just followed the original method. > > HTH. George Nurser. > > -- Biophysics Graduate Student Carlson Lab, University of Michigan http://www.umich.edu/~mlerner http://lernerclan.net
Hello, I'm using matplotlib 0.85 in FigureCanvasGTKAgg backend. I'm usign mpl_connect method to connect mouse event to function, but I'm not able to capture mouse wheel motion. Could somebody help me? Thanks marco
On 2/7/07, Werner F. Bruhin <wer...@fr...> wrote: > Charlie, > > Charlie Moad wrote: > > On 2/7/07, Werner F. Bruhin <wer...@fr...> wrote: > >> Hi Charlie, > >> > >> Great to see a new release, will put some time aside to test it with > >> wxPython early next week. > >> > >> I can't see a reference to the wxPython backend, will it still require > >> the Unicode build or can one use the Ansi build and which versions of > >> wxPython are supported? > > > > Well, we haven't built any binaries yet. We pushed a source release > > fast to try to get it into Feisty. Sorry Chris! With wx2.8 out now > > and this being a major release, we definitely need to rethink wx > > builds. We stuck with unicode for 0.87 to avoid confusion. I would > > be happy to hear what wx users think/want. > For me the ideal would be not to be depended on a particular release of > wxPython - big surprise no :-) . > > If I understand it correctly the dependency came in for performance > optimization, does 2.8 change something for this. > > - If yes, I would not see a problem with 0.9 requiring as a minimum > 2.8.0.1 but going forward I could use any 2.8.x or newer release. > - If no, then I guess we have to live with having a "fixed" dependency, > e.g. 0.87 is wxPython 2.6.x, 0.90 is wxPython 2.8.x, but it should > through at least a warning if one tries to use it with another wxPython > release. A while back there was some talk on the dev list about a pure python blitting method. I believe 2.8 had features that made this possible. I don't think anyone actually implemented this though. I'll have to check if the current native wx code even compiles with 2.8. The pure-python wx interface is still there and works but doesn't allow for efficient blitting.
You can also take a look at the wiki http://www.scipy.org/Cookbook/Matplotlib/ColormapTransformations There you'll find the code I had about colormap discretization. Maybe it does the same thing Eric discussed, however. Cheers, David 2007年2月6日, Eric Firing <ef...@ha...>: > > Claas Teichmann wrote: > > Hi David and Eric, > > > > one year ago, you discussed a discretazation of the colorbar with > > imshow() in matplotlib-users. The topic was "DIscretization of > > colorbar". Did you succeed in using a discrete colorbar? > > Yes, I completely rewrote the colorbar code, and it is now quite flexible. > > > > > I put a request to the mailinglist with the topic "Wrong > > colorbar-ticks in imshow-colorbar with 10 colors". Maybe one of you > > already got the answer? > > > > Many greetings! > > > > Claas :-) > > Assuming you have a reasonably recent version of mpl, you can modify > your colorbar call this way: > > colorbar(ticks=linspace(im.norm.vmin, im.norm.vmax, 11)) > > (This is for your example with a 10-entry colormap.) > > Because of a default parameter that is not exposed, it will label only > every second color boundary in the example from your earlier message. > To make it label every boundary, you could use > > from matplotlib import ticker > ticks = linspace(im.norm.vmin, im.norm.vmax, 11) > tickmaker = ticker.FixedLocator(ticks, nbins=20) > # make nbins >= number of ticks > colorbar(ticks=tickmaker) > > Eric > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Here are some notes I made -- I hope it might save someone a bit of time. So, I finally tried out a few other backends on mac os x. I had been recommending and using TkAgg, as this works out of the box on mac os x. However, it seems unsnappy sometimes, and there was this strange issue with the first window not giving control back to the command line. QT4 takes *forever* to compile, but it seems to compile easier now than previous versions that needed a small library hack. The default configuration compiles and installs fine. The other tools (PyQt4 and SIP) also compile and install painlessly with the default configuration. I initially forgot to set the -q4thread for ipython (since the other - pylab flag is hidden in a launching script). After that it worked mostly fine. I found that the correct threading was sensitive to how I started ipython. I have been using terminal, and I was starting ipython like this: bash -l -c /path/to/ipython -q4thread from within a terminal .term file (i.e., the terminal starts running ipython automatically). This seems to not work great. However, when I put this command in a script, and run the script like bash -l -c pylab_start_script thinks work as expected. This is also true when just typing these commands in on the command line. I almost always start ipython from a terminal .term file from quicksilver. This gives me a dedicated (color coded) ipython window instantly that does not take away my shell. This is all pretty slick, and I am pleased with the setup now. Developers: Finally, I had to make some small changes to the qt4 backend so that things worked right. One is an essential change -- the latin1() method no longer exists in the newer qt. The other is a cosmetic change so that I can see the cursor position in the toolbar better. Diff below. -Rob Index: backend_qt4.py =================================================================== --- backend_qt4.py (revision 2999) +++ backend_qt4.py (working copy) @@ -148,7 +148,7 @@ def _get_key( self, event ): if event.key() < 256: - key = event.text().latin1() + key = str(event.text()) elif self.keyvald.has_key( event.key() ): key = self.keyvald[ event.key() ] else: @@ -290,7 +290,7 @@ # The automatic layout doesn't look that good - it's too close # to the images so add a margin around it. - margin = 4 + margin = 12 button.setFixedSize( image.width()+margin, image.height ()+margin ) QtCore.QObject.connect( button, QtCore.SIGNAL( 'clicked ()' ), @@ -301,7 +301,7 @@ # The stretch factor is 1 which means any resizing of the toolbar # will resize this label instead of the buttons. self.locLabel = QtGui.QLabel( "", self ) - self.locLabel.setAlignment( QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter ) + self.locLabel.setAlignment( QtCore.Qt.AlignRight | QtCore.Qt.AlignTop ) self.locLabel.setSizePolicy(QtGui.QSizePolicy (QtGui.QSizePolicy.Ignored, QtGui.QSizePolicy.Ignored)) self.layout.addWidget( self.locLabel, 1 ) ---- Rob Hetland, Associate Professor Dept. of Oceanography, Texas A&M University http://pong.tamu.edu/~rob phone: 979-458-0096, fax: 979-845-6331
On Wednesday 07 February 2007 03:17:06 am Gerhard Spitzlsperger wrote: > Hallo Darren, > > thank you very much > > Darren Dale schrieb: > >>embedding in Qt, displaying TeX within such a window and finally > >>save the plot as postscript. > > ... > > >>function, to create labels (with TeX) but they are not displayed. > > > > The example you posted works fine for me. Are you sure you have installed > > and properly configured all the required external dependencies? See > > http://www.scipy.org/Cookbook/Matplotlib/UsingTex for more details. > > I guess I installed correctly as the standard examples provided > with matplotlib work as expected. To which examples are you referring? The usetex example? > Also if I remove all TeX related stuff and just place the following line > in the original "embedding_in_qt.py" function compute_initial_figure: > > self.axes.set_xlabel("label") > > the label is not displayed. You disable usetex, and your text is not being rendered. Is that correct? If so, the problem has nothing to do with the LaTeX layout engine. I suggest writing the shortest possible example that illustrates the problem (your previous example is obviously too complex, since the label is not rendered even without usetex enabled), run it with your rc.verbose.level set to debug, and post again. Darren
Charlie Moad wrote: > On 2/7/07, Werner F. Bruhin <wer...@fr...> wrote: >> Hi Charlie, >> >> Great to see a new release, will put some time aside to test it with >> wxPython early next week. >> >> I can't see a reference to the wxPython backend, will it still require >> the Unicode build or can one use the Ansi build and which versions of >> wxPython are supported? > > Well, we haven't built any binaries yet. We pushed a source release > fast to try to get it into Feisty. Sorry Chris! With wx2.8 out now > and this being a major release, we definitely need to rethink wx > builds. We stuck with unicode for 0.87 to avoid confusion. I would > be happy to hear what wx users think/want. For me the ideal would be not to be depended on a particular release of wxPython - big surprise no :-) . If I understand it correctly the dependency came in for performance optimization, does 2.8 change something for this. - If yes, I would not see a problem with 0.9 requiring as a minimum 2.8.0.1 but going forward I could use any 2.8.x or newer release. - If no, then I guess we have to live with having a "fixed" dependency, e.g. 0.87 is wxPython 2.6.x, 0.90 is wxPython 2.8.x, but it should through at least a warning if one tries to use it with another wxPython release. Werner
On 2/7/07, Werner F. Bruhin <wer...@fr...> wrote: > Hi Charlie, > > Great to see a new release, will put some time aside to test it with > wxPython early next week. > > I can't see a reference to the wxPython backend, will it still require > the Unicode build or can one use the Ansi build and which versions of > wxPython are supported? Well, we haven't built any binaries yet. We pushed a source release fast to try to get it into Feisty. Sorry Chris! With wx2.8 out now and this being a major release, we definitely need to rethink wx builds. We stuck with unicode for 0.87 to avoid confusion. I would be happy to hear what wx users think/want. - Charlie
Mark Bakker wrote: > Hello - > > Can basemap help with a coversion to Google Earth coordinates and > mabye even a kmz file? > > Thanks, Mark Mark: AFAICT, google earth uses geographic coordinates (just plain lat and lon, with no map projection). Basemap could help if you have data on a map projection grid, and you want to convert it to lat/lon. KML/KMZ is just a file format that Google Earth uses to store information, such as placemarks, descriptions, ground overlays, paths, and polygons. Basemap doesn't have any ability to read or write these files, but contributions are always welcome. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328
Hi, > if it's just a block of bytes in a standard type from and n-d array, you > can use numpy.fromfile() I should also say that I have just committed a rewrite of the binary file reading stuff to scipy, so if you have the latest scipy SVN (as of a few minutes ago), you can do something like: from StringIO import StringIO import numpy as N from scipy.io import npfile arr = N.arange(10).reshape(5,2) # write in Fortran order, Big endian, read back in C, system endian my_file = StringIO() npf = npfile(my_file, order='F', endian='>') npf.write_array(arr) npf.rewind() npf.read_array((5,2), arr.dtype) Best, Matthew
Hello - Can basemap help with a coversion to Google Earth coordinates and mabye even a kmz file? Thanks, Mark
On 2/4/07, Eric Firing <ef...@ha...> wrote: > Jan Strube wrote: > > Hi List, > > is there a way to store matplotlib figures in something like a native > > file format? > > I am thinking of something that keeps track of all the objects > > (patches(?)) in a mpl figure, so that later you could just revisit that > > figure and change properties. > > Or add/remove objects from the canvas. > > I didn't find anything on the website. > > Thanks, > > Jan > > No, there is no mechanism for doing this, although I think it has been > requested before. > > Eric > Why can't mpl's figures be pickled? Best, Edin
Hi Charlie, Great to see a new release, will put some time aside to test it with wxPython early next week. I can't see a reference to the wxPython backend, will it still require the Unicode build or can one use the Ansi build and which versions of wxPython are supported? Werner