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
(19) |
2
(30) |
3
(14) |
4
(1) |
5
(16) |
6
(7) |
7
(12) |
8
(14) |
9
(35) |
10
(16) |
11
(31) |
12
(6) |
13
(14) |
14
(13) |
15
(20) |
16
(15) |
17
(27) |
18
(5) |
19
(10) |
20
(22) |
21
(20) |
22
(30) |
23
(25) |
24
(11) |
25
(2) |
26
(2) |
27
(23) |
28
(20) |
29
(26) |
30
(25) |
31
(7) |
|
From: Jan M. <mu...@im...> - 2009-07-22 23:39:44
|
Hi, basically I'm looking for something like 'waitfor' or 'uiwait' from the Matlab. I want to achieve is the following behavior: - show a figure with several subplot/images to the user - let the user click on some stuff to get coordinates, handles, ... - wait until the user has closed the window - based on the returned data, show a new figure and let the user select some more stuff - repeat What is the best way to do something similar in matplotlib? I tried to use pylab.show() several times in the same script but then soon found out that this is not recommend / does not work. Right now a combination of ion() and waitforbuttonpress seems to be the only way to achieve something similar to what i want to do, but i was wondering if there are other ways. Any ideas? Thanks, Jan |
From: Robert K. <rob...@gm...> - 2009-07-22 23:38:33
|
On 2009-07-22 18:09, Christopher Barker wrote: > Hi folks, > > Does anyone know if there is a way to use ipython with the advantages of > the -pylab option (separate gui thread, etc.), but without the whole > pylab namespace getting sucked in? > > I love ipython pylab mode, but like to use namespaces to keep things clean. ipython -wthread -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco |
From: Christopher B. <Chr...@no...> - 2009-07-22 23:09:26
|
Hi folks, Does anyone know if there is a way to use ipython with the advantages of the -pylab option (separate gui thread, etc.), but without the whole pylab namespace getting sucked in? I love ipython pylab mode, but like to use namespaces to keep things clean. thanks, -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... |
From: Barnette, D. W <dw...@sa...> - 2009-07-22 22:23:44
|
I've written a python gui to matplotlib which allows the user to plot either cartesian, semi-log, or log-log plots. Log plots can be generated for typical base values except for base 2. Is this a bug, or is there some reason that matplotlib does not do log plots using base 2? Using base 2, the log-log plot error is: ------ begin snippet ----- Exception in Tkinter callback Traceback (most recent call last): File "C:\python251_102507\lib\lib-tk\Tkinter.py", line 1403, in __call__ return self.func(*args) File "C:\python251_102507\lib\site-packages\matplotlib\backends\backend_tkagg. py", line 211, in resize self.show() File "C:\python251_102507\lib\site-packages\matplotlib\backends\backend_tkagg. py", line 214, in draw FigureCanvasAgg.draw(self) File "C:\python251_102507\lib\site-packages\matplotlib\backends\backend_agg.py ", line 261, in draw self.figure.draw(self.renderer) File "C:\python251_102507\lib\site-packages\matplotlib\figure.py", line 759, i n draw for a in self.axes: a.draw(renderer) File "C:\python251_102507\lib\site-packages\matplotlib\axes.py", line 1523, in draw a.draw(renderer) File "C:\python251_102507\lib\site-packages\matplotlib\axis.py", line 712, in draw for tick, loc, label in self.iter_ticks(): File "C:\python251_102507\lib\site-packages\matplotlib\axis.py", line 659, in iter_ticks minorLocs = self.minor.locator() File "C:\python251_102507\lib\site-packages\matplotlib\ticker.py", line 1026, in __call__ if len(subs) > 1 or subs[0] != 1.0: IndexError: index out of bounds ----- end snippet ----- |
From: Jeff W. <js...@fa...> - 2009-07-22 21:58:04
|
plankton wrote: > Greetings all, > > I rotate a vector field and than I tried to interpolate it to a new grid > using griddata. > > CODE: > > x_grid_unique = unique(x_grid) > y_grid_unique = unique(y_grid) > x_meshgrid, y_meshgrid = meshgrid(x_grid_unique, y_grid_unique) > x_rot_meshgrid = reshape(x_rot, [ len(x_meshgrid[:, 0]), > len(x_meshgrid[0, :])] ) > y_rot_meshgrid = reshape(y_rot, [ len(x_meshgrid[:, 0]), > len(x_meshgrid[0, :])] ) > u_rot_meshgrid = reshape(u_rot, [ len(x_meshgrid[:, 0]), > len(x_meshgrid[0, :])] ) > v_rot_meshgrid = reshape(v_rot, [ len(x_meshgrid[:, 0]), > len(x_meshgrid[0, :])] ) > u_interpolate = griddata(x_rot, y_rot, u_rot, x_rot_meshgrid, > y_rot_meshgrid) > v_interpolate = griddata(x_rot, y_rot, v_rot, x_rot_meshgrid, > y_rot_meshgrid) > > > > I unfortunately griddata returns some nan (It seems that there are multiple > occurrences of the same [X,Y] pair in the data). In matlab you can use > griddata with additional options e.g. ru = > griddata(nx,ny,nu,rx,ry,'linear', {'QJ'}) to fix this, but this seems to be > not possible using the griddata function in matplotlib. Is there any other > way to avoid a return of nan? > > For any help many thanks in advance > > Andreas > > > > Andreas: Can you provide a standalone script that I can run which demonstrates the problem? Otherwise, it's hard to know what's going on. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
From: Michael L. <mgl...@gm...> - 2009-07-22 20:43:49
|
Hi, I'm used to the following definition of autocorrelation: R(\tau) = \frac{<(X_t - \mu)(X_{t+\tau}-\mu)>}{\sigma^2} However, it looks like acorr is just giving me R(\tau) = \sum{X_t*X_{t+\tau}} Just specifying normed=True doesn't get the first formula. Is there some trivial option that I've missed? Here's what I did: It's easy enough to subtract \mu from my timeseries, but when I ask acorr to normalize things for me, I get the whole timeseries normalized by the value of R(0): if normed: c/= np.dot(x,x) I really do want the formula I gave, which requires each point of the autocorrelation to be averaged separately. So, I modified my local version of acorr to say if normed: nrm = arange(len(x)) nrm = hstack((nrm,nrm[:-1][::-1]))*std(x)**2 c /= nrm Thanks, -michael -- Michael Lerner, Ph.D. IRTA Postdoctoral Fellow Laboratory of Computational Biology NIH/NHLBI 5635 Fishers Lane, Room T909, MSC 9314 Rockville, MD 20852 (UPS/FedEx/Reality) Bethesda MD 20892-9314 (USPS) |
From: Christopher B. <Chr...@no...> - 2009-07-22 18:57:52
|
Hi all, I'm passing in "None" for the timezone in AutoDateFormatter. What I am getting is "UTC", but what I want is nothing. Looking at the code, I see lines like: self._formatter = DateFormatter("%H:%M:%S %Z", self._tz) so my None is getting passed through. Then in DateFormatter, I see: if tz is None: tz = _get_rc_timezone() Which looks like it's getting a timezone from an rc parameter. This strikes me as "not such a good idea". Far too easy to get the timezone wrong -- I'm not sure there should be such a thing as a default time zone. However, the issue at hand is that I want to not show the timezone at all. I would have thought that None would be a good way to spell that, but it's taken already to mean "default". So that means editing/overriding AutoDateFormatter. The way it's written, I pretty much have to re-write the entire thing, which isn't so bad, but it might be nicer if we could make it easier to override just part of it. One idea: Some say that the "right" way to spell "case/switch" in Python is a dict, rather than a collection of if--elifs. So in this case, we could make a dict of format strings, something like below. I've tried this, and I can now easily override the formatting for a particular time range, like so: Formatter = mpl.dates.AutoDateFormatter(locator, tz=None) # edit the format strings to remove the TZ spec # this only works with my custom version of AutoDateLocator Formatter.format_strings[1.0/24.0] = "%H:%M:%S" I do agree with the comments that there are other ways to improve this, but maybe this is a start. -Chris class AutoDateFormatter(ticker.Formatter): """ This class attempts to figure out the best format to use. This is most useful when used with the :class:`AutoDateLocator`. """ # This can be improved by providing some user-level direction on # how to choose the best format (precedence, etc...) # Perhaps a 'struct' that has a field for each time-type where a # zero would indicate "don't show" and a number would indicate # "show" with some sort of priority. Same priorities could mean # show all with the same priority. # Or more simply, perhaps just a format string for each # possibility... def __init__(self, locator, tz=None): self._locator = locator self._formatter = DateFormatter("%b %d %Y %H:%M:%S %Z", tz) self._tz = tz self.format_strings = { 365.0 : "%Y", 30.0 : "%b %Y", 1.0 : "%b %d %Y", 7.0 : "%b %d %Y", 1.0/24.0 : "%H:%M:%S %Z", 1.0/(24*60) : "%H:%M:%S %Z", 1.0/(24*3600) : "%H:%M:%S %Z", } self.fallback_format = "%b %d %Y %H:%M:%S %Z" def __call__(self, x, pos=0): scale = float( self._locator._get_unit() ) f_string = self.format_strings.get(scale, self.fallback_format) self._formatter = DateFormatter(f_string, self._tz) return self._formatter(x, pos) -- 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... -- 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... |
From: Mike W. <mjw...@um...> - 2009-07-22 17:32:28
|
Never mind I found a mirror at http://www.lfd.uci.edu/~gohlke/download/matplotlib-0.98.5.3.win32-py2.6.zip -mike w. Mike Waters wrote: > Is anyone else having this problem? Is there another website that I can > try? > > -mike w. > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > |
From: davide l. <las...@gm...> - 2009-07-22 17:30:03
|
Well, actually i'm using Ubuntu at work on a virtual machine, and the svn copy is in a partition mounted at boot by a line in /etc/fstab. If i remember correctly this filesystem is mounted with options users. I'm at home now, i'll try with the exec option tomorrow. |
From: Mike W. <mjw...@um...> - 2009-07-22 17:22:28
|
Is anyone else having this problem? Is there another website that I can try? -mike w. |
From: Michael D. <md...@st...> - 2009-07-22 17:20:00
|
You can use the "Agg" or "PDF" backends to run matplotlib without display support: import matplotlib matplotlib.use("PDF") Cheers, Mike John Kerenyi wrote: > Thank you for your response. Your response made me wonder how the script would operate in a non-graphic environment--I had tested it on a login node but not on a computing node. It appears that even though I have no need for any graphic display, the modules I am loading expect to have it nonetheless. I invoke matplotlib using the standard "import matplotlib.pyplot as plt" line. Here is the output when run on a compute node: > > ------------------------- > > [ac.jkerenyi@n123 pygraph]$ ./run_pygraph.py png > Creating Top 100 V/C ratios graph... > Traceback (most recent call last): > File "./run_pygraph.py", line 566, in <module> > GraphTop100VC (Top100VCFilename) > File "./run_pygraph.py", line 326, in GraphTop100VC > fig=plt.figure() > File "/soft/python/lib/python2.6/site-packages/matplotlib/pyplot.py", line 251, in figure > **kwargs) > File "/soft/python/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.py", line 90, in new_figure_manager > window = Tk.Tk() > File "/soft/python/lib/python2.6/lib-tk/Tkinter.py", line 1643, in __init__ > self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) > _tkinter.TclError: no display name and no $DISPLAY environment variable > > --------------------- > > Can anyone advise if there another way to invoke matplotlib that does not require graphic support? > > With respect to your suggestion that I run python setup.py build, I don't seem to have the necessary permissions but the sysadmin is very helpful and once I have a little more information on the new problem I'll get his help again. > > Thanks again, > > John Kerenyi > > -----Original Message----- > From: Jouni K. Seppänen [mailto:jk...@ik...] > Sent: Wednesday, July 22, 2009 9:38 AM > To: mat...@li... > Subject: Re: [Matplotlib-users] PDF backend errors out; PNG works fine > > "John Kerenyi" <jo...@mo...> writes: > > >> File >> "/soft/python/lib/python2.6/site-packages/matplotlib/backends/backend_ >> pd >> f.py", line 44, in <module> >> from matplotlib import ttconv >> ImportError: >> /soft/python/lib/python2.6/site-packages/matplotlib/ttconv.so: >> undefined >> symbol: _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE >> > > Sounds like a mismatch between C++ libraries on the system where matplotlib was built and where it is being used. You mentioned a cluster; perhaps your sysadmin compiled matplotlib on a special node that has more libraries installed than the computation nodes. I don't know how to fix this, but as a first step you could try compiling matplotlib on a computation node (submit something like "python setup.py build" as a job the same way you would submit another task on the > cluster) and seeing if that gives more clues about what is missing. > > -- > Jouni K. Seppänen > http://www.iki.fi/jks > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
From: John K. <jo...@mo...> - 2009-07-22 17:12:27
|
Thank you for your response. Your response made me wonder how the script would operate in a non-graphic environment--I had tested it on a login node but not on a computing node. It appears that even though I have no need for any graphic display, the modules I am loading expect to have it nonetheless. I invoke matplotlib using the standard "import matplotlib.pyplot as plt" line. Here is the output when run on a compute node: ------------------------- [ac.jkerenyi@n123 pygraph]$ ./run_pygraph.py png Creating Top 100 V/C ratios graph... Traceback (most recent call last): File "./run_pygraph.py", line 566, in <module> GraphTop100VC (Top100VCFilename) File "./run_pygraph.py", line 326, in GraphTop100VC fig=plt.figure() File "/soft/python/lib/python2.6/site-packages/matplotlib/pyplot.py", line 251, in figure **kwargs) File "/soft/python/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.py", line 90, in new_figure_manager window = Tk.Tk() File "/soft/python/lib/python2.6/lib-tk/Tkinter.py", line 1643, in __init__ self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY environment variable --------------------- Can anyone advise if there another way to invoke matplotlib that does not require graphic support? With respect to your suggestion that I run python setup.py build, I don't seem to have the necessary permissions but the sysadmin is very helpful and once I have a little more information on the new problem I'll get his help again. Thanks again, John Kerenyi -----Original Message----- From: Jouni K. Seppänen [mailto:jk...@ik...] Sent: Wednesday, July 22, 2009 9:38 AM To: mat...@li... Subject: Re: [Matplotlib-users] PDF backend errors out; PNG works fine "John Kerenyi" <jo...@mo...> writes: > File > "/soft/python/lib/python2.6/site-packages/matplotlib/backends/backend_ > pd > f.py", line 44, in <module> > from matplotlib import ttconv > ImportError: > /soft/python/lib/python2.6/site-packages/matplotlib/ttconv.so: > undefined > symbol: _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE Sounds like a mismatch between C++ libraries on the system where matplotlib was built and where it is being used. You mentioned a cluster; perhaps your sysadmin compiled matplotlib on a special node that has more libraries installed than the computation nodes. I don't know how to fix this, but as a first step you could try compiling matplotlib on a computation node (submit something like "python setup.py build" as a job the same way you would submit another task on the cluster) and seeing if that gives more clues about what is missing. -- Jouni K. Seppänen http://www.iki.fi/jks ------------------------------------------------------------------------------ _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Gökhan S. <gok...@gm...> - 2009-07-22 16:58:47
|
On Wed, Jul 22, 2009 at 11:47 AM, Jouni K. Seppänen <jk...@ik...> wrote: > davide lasagna <las...@gm...> writes: > > > ImportError: > > /home/davide/partizione/matplotlib/lib/matplotlib/_path.so: failed to > > map segment from shared object: Operation not permitted > > > > Could it be that i've installed in the wrong directory? If yes how can > > i cope with this? > > Apparently this could be caused by SELinux (good luck with configuring > that correctly), or perhaps your /home filesystem is mounted with the > noexec option to prevent users from running their own code. Ask your > system administrator how to install libraries so that Python can call > dlopen on them. > > -- > Jouni K. Seppänen > http://www.iki.fi/jks > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > I also have been bitten by SELinux a couple times. On my personal Fedora 11 laptop, and previously on FC10 my resolution was to completely disable SELinux to eliminate installation and running issues. Fortunately, I have not dealt with administrative restrictions on our machines that sit in the lab. Once I heard of a complain in this regard sys-admin will be the first to know after me :) -- Gökhan |
From: Alan G I. <ala...@gm...> - 2009-07-22 16:49:58
|
Animating a line plot is well covered in the Cookbook: http://www.scipy.org/Cookbook/Matplotlib/Animations Can anyone offer a hint or two for animating a histogram? Thanks, Alan Isaac |
From: Jouni K. S. <jk...@ik...> - 2009-07-22 16:47:45
|
davide lasagna <las...@gm...> writes: > ImportError: > /home/davide/partizione/matplotlib/lib/matplotlib/_path.so: failed to > map segment from shared object: Operation not permitted > > Could it be that i've installed in the wrong directory? If yes how can > i cope with this? Apparently this could be caused by SELinux (good luck with configuring that correctly), or perhaps your /home filesystem is mounted with the noexec option to prevent users from running their own code. Ask your system administrator how to install libraries so that Python can call dlopen on them. -- Jouni K. Seppänen http://www.iki.fi/jks |
From: Jouni K. S. <jk...@ik...> - 2009-07-22 16:38:01
|
"John Kerenyi" <jo...@mo...> writes: > File > "/soft/python/lib/python2.6/site-packages/matplotlib/backends/backend_pd > f.py", line 44, in <module> > from matplotlib import ttconv > ImportError: > /soft/python/lib/python2.6/site-packages/matplotlib/ttconv.so: undefined > symbol: _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE Sounds like a mismatch between C++ libraries on the system where matplotlib was built and where it is being used. You mentioned a cluster; perhaps your sysadmin compiled matplotlib on a special node that has more libraries installed than the computation nodes. I don't know how to fix this, but as a first step you could try compiling matplotlib on a computation node (submit something like "python setup.py build" as a job the same way you would submit another task on the cluster) and seeing if that gives more clues about what is missing. -- Jouni K. Seppänen http://www.iki.fi/jks |
From: davide l. <las...@gm...> - 2009-07-22 16:27:02
|
Hi all, I have a problem with an svn install. I've followed the instruciont on mpl website, that is: $ svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib matplotlib $ cd matplotlib $ python setupegg.py develop Please note that i've run the last command with sudo as i'm explicitly asked to do so. Then if i run this simple test script: from pylab import * plot([1,2,3]) show() from the command line as python test.py --verbose-helpful i get thise output: davide@davide-desktop:~$ python test.py --verbose-helpful $HOME=/home/davide CONFIGDIR=/home/davide/.matplotlib matplotlib data path /home/davide/partizione/matplotlib/lib/matplotlib/mpl-data loaded rc file /home/davide/partizione/matplotlib/lib/matplotlib/mpl-data/matplotlibrc matplotlib version 0.98.6svn verbose.level helpful interactive is False units is False platform is linux2 Traceback (most recent call last): File "mio", line 1, in <module> from pylab import * File "/home/davide/partizione/matplotlib/lib/pylab.py", line 1, in <module> from matplotlib.pylab import * File "/home/davide/partizione/matplotlib/lib/matplotlib/pylab.py", line 206, in <module> from matplotlib import mpl # pulls in most modules File "/home/davide/partizione/matplotlib/lib/matplotlib/mpl.py", line 1, in <module> from matplotlib import artist File "/home/davide/partizione/matplotlib/lib/matplotlib/artist.py", line 5, in <module> from transforms import Bbox, IdentityTransform, TransformedBbox, TransformedPath File "/home/davide/partizione/matplotlib/lib/matplotlib/transforms.py", line 34, in <module> from matplotlib._path import affine_transform ImportError: /home/davide/partizione/matplotlib/lib/matplotlib/_path.so: failed to map segment from shared object: Operation not permitted Could it be that i've installed in the wrong directory? If yes how can i cope with this? Thanks in advance for any help. Davide |
From: massimo s. <dev...@gm...> - 2009-07-22 16:11:52
|
Hi, I am trying to do a plot where small images are used as markers at definite coordinate positions (just to make myself clear: I am trying to see how the shape of a polymer changes with different parameters, so I want little "icons" of the polymer placed at the x,y of the parameters). Doing that with imshow() , putting images as sub-matrixes etc. seems doable. However problem is my images have a black background, and correspondingly it seems that the RGB 0,0,0 value of the matrix is shown -kinda correctly- as black (a zeros filled canvas is shown as black). I wonder: Is there a default way to tell imshow() that I want a certain colour (in this case, black) , and that colour only, to be alpha? Or do I have to manually change the matrix? Thanks! m. |
From: John K. <jo...@mo...> - 2009-07-22 16:09:17
|
Hello all, I am a relatively new user of matplotlib but have come a long way in these last couple months. I developed some Python graph scripts on my Windows machine, which reports matplotlib version 0.98.5.2 (installed via Python(x,y)). These scripts write either .png or .pdf files, depending on how called; and they work fine in this environment. Now that my scripts are suitable for running unattended, I've asked a Linux system administrator to install matplotlib on a Linux cluster which I use for my main application, and he did so from source. The version that is reported is 0.98.5.3. When I run the script in the Linux environment, png files are written as intended, with no errors, but attempting to create pdf graphs generates the following error for the first occurrence of savefig: ------------------- [ac.jkerenyi@l01 pygraph]$ ./run_pygraph.py pdf Creating Top 100 V/C ratios graph... MaxVCRatios.pdf Traceback (most recent call last): File "./run_pygraph.py", line 566, in <module> GraphTop100VC (Top100VCFilename) File "./run_pygraph.py", line 369, in GraphTop100VC fig.savefig("MaxVCRatios"+OutputImageType,format="pdf") File "/soft/python/lib/python2.6/site-packages/matplotlib/figure.py", line 990, in savefig self.canvas.print_figure(*args, **kwargs) File "/soft/python/lib/python2.6/site-packages/matplotlib/backend_bases.py", line 1419, in print_figure **kwargs) File "/soft/python/lib/python2.6/site-packages/matplotlib/backend_bases.py", line 1311, in print_pdf from backends.backend_pdf import FigureCanvasPdf # lazy import File "/soft/python/lib/python2.6/site-packages/matplotlib/backends/backend_pd f.py", line 44, in <module> from matplotlib import ttconv ImportError: /soft/python/lib/python2.6/site-packages/matplotlib/ttconv.so: undefined symbol: _ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE --------------------- The expression "MaxVCRatios"+OutputImageType resolves to the string "MaxVCRatios.pdf" (confirmed by the second output line of the script, which was printed for testing purposes). I played with providing or omitting the format="pdf" parameter and it made no difference. I've also searched for others with a similar issue and found none so I'm posting to this list to see if anyone can help. I need to know if this is a problem with my script, or if it's something the system administrator needs to fix. Let me know if there's any additional information you would like me to provide. Thanks, John K. John Kerenyi, P.E. Senior Traffic Engineer City of Moreno Valley 14177 Frederick Street P.O. Box 88005 Moreno Valley, CA 92552-0805 (951) 413-3199 (951) 413-3141 fax jo...@mo... |
From: Domenico N. <dom...@gm...> - 2009-07-22 14:45:11
|
Hi there, I've upgraded to python 2.6, install all packages I need for that version (using matplotlib windows installer with gtk support found here: http://www.lfd.uci.edu/~gohlke/#pythonlibs ) and now everything seems to be ok. Thanks again. 2009/7/22 Domenico Nappo <dom...@gm...> > > > 2009/7/21 John Hunter <jd...@gm...> > >> >> > I have the suspect that matplotlib windows support simply doesn't >> exist:) >> > I'll try prepackaged windows distributions like EPD or Python(x,y) and >> hope >> > this will solve this issue... >> >> >> I'm pretty sure they do not package mpl with the gtk backend, but >> Christoph Gohlke has a version that does >> >> http://www.lfd.uci.edu/~gohlke/#pythonlibs<http://www.lfd.uci.edu/%7Egohlke/#pythonlibs> >> > Oh, finally...we have found a package with gtk support. Thanks. I will try > it. Even if I've already downloaded 240 MB of EDP and I'd like to try it as > well. > Thank you very much to you two! > |
From: Johan C. <joh...@go...> - 2009-07-22 14:27:32
|
Hi all, I have just migrated from Matlab to Scipy. Matplotlib has been great so far. However, I have some trouble getting imshow to behave like Matlab's image function. If you do image(eye(8)) in matlab, you get this: http://www.flickr.com/photos/phineasgage/3746211714/ If you do imshow(eye(8)) in matplotlib, you get this: http://www.flickr.com/photos/phineasgage/3745417651/ How do I get matplotlib to stop interpolating or blurring the borders in the image? I have tried setting interpolation=None (the default behaviour), but this has no effect. I use matplotlib-0.98.5.2n2 as part of the Enthought distro on Red Hat 4 Linux. Any help would be greatly appreciated. Johan |
From: Alexander B. <bak...@gm...> - 2009-07-22 10:36:36
|
Ralph, Perhaps time to migrate to Chaco API from Enthought? not sure if there is Ubuntu support yet however. Alex Baker http://code.enthought.com/chaco/ Ralf Gommers-2 wrote: > > Hi, > > I am working on a PyQt4 application with some embedded MPL figures, and am > also trying to save some figures as png's without displaying them. I am > observing huge memory increases (10s or 100s of Mb) the moment I try to > save > a png. I reproduced the issue by combining two mpl examples, > http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_qt4.htmland > http://matplotlib.sourceforge.net/examples/api/agg_oo.html. Full code is > attached. When pressing the "save figure" button, memory usage shoots up, > multiple clicks keep sending it higher (although not monotonically). > > I tested on two different platforms > - Matplotlib 98.5.2 and Python 2.6.2 on Ubuntu. > - latest Enthought Python Distribution on Windows XP. > > The function that does the png saving is: > > def save_png(): > """Save an image as a png file""" > > pngpath = 'test_mplsave.png' > > fig = Figure() > canvas = FigureCanvas(fig) > ax = fig.add_subplot(111) > x = arange(5e3) > ax.plot(x, sin(x)) > canvas.print_figure(pngpath) > > ## tried all things commented out below, all makes no difference ## > #fig.savefig(pngpath) > > #del(fig) > #del(canvas) > #del(ax) > > #import matplotlib.pyplot as plt > #plt.close(fig) > > #import gc > #gc.collect() > > Commenting out the canvas.print_figure line fixes the issue. > > Am I doing something obviously wrong, or mixing two incompatible ways of > doing things? > > Cheers, > Ralf > > #!/usr/bin/env python > > # embedding_in_qt4.py --- Simple Qt4 application embedding matplotlib > canvases > # > # Copyright (C) 2005 Florent Rougon > # 2006 Darren Dale > # > # This file is an example program for matplotlib. It may be used and > # modified with no restriction; raw copies as well as modified versions > # may be distributed without limitation. > > import sys, os, random > from PyQt4 import QtGui, QtCore > > from numpy import arange, sin, pi > from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as > FigureCanvas > from matplotlib.figure import Figure > > > class MyMplCanvas(FigureCanvas): > """Ultimately, this is a QWidget (as well as a FigureCanvasAgg, > etc.).""" > def __init__(self, parent=None, width=5, height=4, dpi=100): > fig = Figure(figsize=(width, height), dpi=dpi) > self.axes = fig.add_subplot(111) > # We want the axes cleared every time plot() is called > self.axes.hold(False) > > self.compute_initial_figure() > > FigureCanvas.__init__(self, fig) > self.setParent(parent) > > FigureCanvas.setSizePolicy(self, > QtGui.QSizePolicy.Expanding, > QtGui.QSizePolicy.Expanding) > FigureCanvas.updateGeometry(self) > > def compute_initial_figure(self): > pass > > > class MyStaticMplCanvas(MyMplCanvas): > """Simple canvas with a sine plot.""" > def compute_initial_figure(self): > t = arange(0.0, 3.0, 0.01) > s = sin(2*pi*t) > self.axes.plot(t, s) > > > def save_png(): > """Save an image as a png file""" > > pngpath = 'test_mplsave.png' > > fig = Figure() > canvas = FigureCanvas(fig) > ax = fig.add_subplot(111) > x = arange(5e3) > ax.plot(x, sin(x)) > #canvas.print_figure(pngpath) > > ## tried all things commented out below, all makes no difference ## > #fig.savefig(pngpath) > > #del(fig) > #del(canvas) > #del(ax) > > #import matplotlib.pyplot as plt > #plt.close(fig) > > #import gc > #gc.collect() > > > class ApplicationWindow(QtGui.QMainWindow): > def __init__(self): > QtGui.QMainWindow.__init__(self) > self.setAttribute(QtCore.Qt.WA_DeleteOnClose) > self.setWindowTitle("application main window") > > self.file_menu = QtGui.QMenu('&File', self) > self.file_menu.addAction('&Quit', self.fileQuit, > QtCore.Qt.CTRL + QtCore.Qt.Key_Q) > self.menuBar().addMenu(self.file_menu) > > self.help_menu = QtGui.QMenu('&Help', self) > > self.main_widget = QtGui.QWidget(self) > > l = QtGui.QVBoxLayout(self.main_widget) > sc = MyStaticMplCanvas(self.main_widget, width=5, height=4, > dpi=100) > dc = QtGui.QPushButton('Save image') > l.addWidget(sc) > l.addWidget(dc) > > self.main_widget.setFocus() > self.setCentralWidget(self.main_widget) > > self.statusBar().showMessage("All hail matplotlib!", 2000) > self.connect(dc, QtCore.SIGNAL("clicked()"), save_png) > > def fileQuit(self): > self.close() > > def closeEvent(self, ce): > self.fileQuit() > > > qApp = QtGui.QApplication(sys.argv) > > aw = ApplicationWindow() > aw.setWindowTitle("Try saving a simple png image") > aw.show() > sys.exit(qApp.exec_()) > > ------------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://www.nabble.com/memory-leak-with-PyQt4-plus-savefig-or-print_figure-tp24298299p24603899.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: ms <dev...@gm...> - 2009-07-22 09:53:24
|
Sandro Tosi ha scritto: > I got only data values, nothing already "computed" (for whatever you > mean by that), and I want to plot stacked bars with those values > (either by row or by column). Ok, I see. >>>> It seems from your example that you already have the histogram computed >>> no, I just have a series of lists to plot, I didn't compute anything. >> Ok, so you want a bar graph and not to compute a histogram. > > what is the difference? maybe I didn't get it right ;) Oh, sorry, I thought it was common knowledge. That's why I didn't understand at beginning :) A histogram is a *statistical technique* which takes a vector of data, classifies them into bins (usually magnitude intervals), counts the number of data points into each bin and returns another vector with the number of data points for each bin. It is a technique to get an approximation of the distribution underlying your data; it is not the only one (for example I am a big fan of kernel density estimation, which is, roughly speaking, the continuous extension of the histogram) A bar graph is a representation of data as bars of different heights. Usually people display histograms with bar graphs, each bar being a bin, and for this reason they often confuse the two things :) But they're two different and quite unrelated things: there's nothing intrinsically wrong in plotting histograms as line or scatter plots, for example, and you can do bar graphs of things which are not histograms. So it seems you want a bar graph :),and that's why hist() is of little help for you. >>>> In the page linked above you find also the example on how to do a >>>> barstacked graph. >>> sure, for 2 data sets might be fine: but what for 10 ? how to use the >>> bottom argument in that case? >> Ehm, it seems pretty straighforward to me. > ... >> p3 = plt.bar(ind, xMeans, width, color='b', bottom=womenMeans+menMeans) > > do you really expect it to be straightforward for 10, 100 or for any > other dynamically generated data? let's imagine today I get 15 sets of > data, tomorrow 20, the next day 7. I cannot do that by hand, and I > want some general way to get stacked by dynamically adaptable to more > columns with more "blocks" in them. I didn't try, but isn't it easily done with a for cycle? Instead of having p1,p2,p3 you have a vector pN=[...] where you append the bars, and the bottom is the sum of the previous values of your bars. Not counting the fact that if you have 100 data sets, maybe a stacked bar graph begins to be confusing ;) but hey, that's your choice! :D m. |
From: Johann Cohen-T. <co...@lp...> - 2009-07-22 09:14:13
|
hello, anyone has an idea about how to get this right? thanks a lot in advance, Johann Johann Cohen-Tanugi wrote: > hi there, I stumbled into yet another problem, see script attached. > Now there are 10 pixels and 10 label values on each axis, but I get > only half the ticks, and as a result half the labels get discarded... > How can I specify the number of ticks it uses? > Note that I could use plt.pcolor(np.array(EMINS),np.array(ROIS),d) and > at least the labelling would be correct, but the pixels are now more > or less wide depending on the interval between values, which was not > intended.... > > thanks a lot in advance for your help, > Johann > > Johann Cohen-Tanugi wrote: >> Hello, how can I center axis tick labels, so that the labels ends up >> at the center between 2 ticks. >> >> thanks in advance, >> Johann >> >> ------------------------------------------------------------------------------ >> >> Enter the BlackBerry Developer Challenge This is your chance to win >> up to $100,000 in prizes! For a limited time, vendors submitting new >> applications to BlackBerry App World(TM) will have >> the opportunity to enter the BlackBerry Developer Challenge. See full >> prize details at: http://p.sf.net/sfu/Challenge >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Enter the BlackBerry Developer Challenge > This is your chance to win up to $100,000 in prizes! For a limited time, > vendors submitting new applications to BlackBerry App World(TM) will have > the opportunity to enter the BlackBerry Developer Challenge. See full prize > details at: http://p.sf.net/sfu/Challenge > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: ms <dev...@gm...> - 2009-07-22 08:53:04
|
Sandro Tosi ha scritto: > On Wed, Jul 22, 2009 at 10:25, ms<dev...@gm...> wrote: >> Sandro Tosi ha scritto: >>> Hi all, >>> I'd like to do a histogram with barstacked style. Well, I'm not able >>> to make it in any way :( >>> >>> - what is the format of the the data to pass? >>> - what's the value of bins? (related to the above question, I suppose) >>> >>> for example, let's say I want to plot this series >>> >>> s1 = 2,3,6,3,1 >>> s2 = 1,2,2,4,1 >>> s3 = 4,1,0,3,7 >>> >>> what's the format of data to pass to hist() ? by row? by column? >>> >>> Thanks a lot in advance, >> I think hist() *computes* histograms ; you can find information here: >> >> http://matplotlib.sourceforge.net/api/pyplot_api.html > > and infact I want a barstacked histogram So you want to 1) compute your histogram from your series of values and then 2) display the several histograms as a stacked bar graph or just 1) display already-calculated histogram values as a stacked bar graph These are two different things. Since it seems you want to pass directly s1,s2,s3, it seems that they are your already calculated histogram values. In this case hist() is of no utility for you. >> It seems from your example that you already have the histogram computed > > no, I just have a series of lists to plot, I didn't compute anything. Ok, so you want a bar graph and not to compute a histogram. >> and that you want to plot the bar graph; in this case you should look to >> bar() >> >> In the page linked above you find also the example on how to do a >> barstacked graph. > > sure, for 2 data sets might be fine: but what for 10 ? how to use the > bottom argument in that case? Ehm, it seems pretty straighforward to me. I attach the same example of the webpage but extended with three bar graphs stacked. I admit that the fact the example used tuples for the values made it unnecessarily awkward; using numpy arrays everything goes to place: #!/usr/bin/env python # a stacked bar plot with errorbars import numpy as np import matplotlib.pyplot as plt N = 5 menMeans = np.array([20, 35, 30, 35, 27]) womenMeans = np.array([25, 32, 34, 20, 25]) xMeans = np.array([17, 11, 43, 5, 18]) menStd = (2, 3, 4, 1, 2) womenStd = (3, 5, 2, 3, 3) ind = np.arange(N) # the x locations for the groups width = 0.35 # the width of the bars: can also be len(x) sequence p1 = plt.bar(ind, menMeans, width, color='r', yerr=womenStd) p2 = plt.bar(ind, womenMeans, width, color='y', bottom=menMeans, yerr=menStd) p3 = plt.bar(ind, xMeans, width, color='b', bottom=womenMeans+menMeans) plt.ylabel('Scores') plt.title('Scores by group and gender') plt.xticks(ind+width/2., ('G1', 'G2', 'G3', 'G4', 'G5') ) plt.yticks(np.arange(0,81,10)) plt.legend( (p1[0], p2[0], p3[0]), ('Men', 'Women','Aliens') ) plt.show() |