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
(8) |
2
(11) |
3
(4) |
4
(6) |
5
(13) |
6
(30) |
7
(21) |
8
(9) |
9
(19) |
10
(4) |
11
(5) |
12
(14) |
13
(19) |
14
(22) |
15
(12) |
16
(15) |
17
(14) |
18
(1) |
19
(1) |
20
(11) |
21
(9) |
22
(18) |
23
(39) |
24
(12) |
25
(7) |
26
(13) |
27
(18) |
28
(3) |
29
(5) |
30
(12) |
31
(10) |
|
From: Eric F. <ef...@ha...> - 2008-10-31 17:50:34
|
Adam wrote: > hi, I am trying to use ginput with some images and for some reason it > keeps changing the axes with the mouse click. > I don't know if this is a feature or bug, but I would like it not to > affect my images at all. Confirmed: it's a big bug. I suspect it has a simple fix, but I don't have time to look into it. Eric > > here is a short example: > > #--- > from pylab import ginput, imshow, rand > > t=rand(50,50) > imshow(t) > x = ginput(1) > #--- > > this problem was also addressed in a post back in august: > http://www.nabble.com/ginput-changes-axes-limits-td18863282.html#a18863282 > but it received no replies. > > any ideas on whats going on? > > thanks, > adam. > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Adam <ada...@gm...> - 2008-10-31 17:42:53
|
hi, I am trying to use ginput with some images and for some reason it keeps changing the axes with the mouse click. I don't know if this is a feature or bug, but I would like it not to affect my images at all. here is a short example: #--- from pylab import ginput, imshow, rand t=rand(50,50) imshow(t) x = ginput(1) #--- this problem was also addressed in a post back in august: http://www.nabble.com/ginput-changes-axes-limits-td18863282.html#a18863282 but it received no replies. any ideas on whats going on? thanks, adam. |
From: martin.druon <mar...@wa...> - 2008-10-31 15:48:17
|
Hi, this is my best result... figure is acceptable when I use a lot of points... #!/usr/bin/env python # -*- coding: utf-8 -*- import matplotlib import matplotlib.art3d import matplotlib.axes3d import pylab if __name__ == "__main__": data_filename = ... # We load data # # x1 y1 v1 # x2 y2 v2 # x3 y3 v3 # ... # data_file = pylab.load(data_filename) # We get x coordinate lstX = data_file[:, 0] # We get y coordinate lstY = data_file[:, 1] # We get data values lstV = data_file[:, 2] # We create list of lines from (x, y, 0) to (x, y, value) lstLines = [[(x, y, 0), (x, y, v)] for (x, y, v) in zip(lstX, lstY, lstV)] # We create the figure fig = pylab.figure(1) # We get the axe reference ax = matplotlib.axes3d.Axes3D(fig) # We create a matplotlib line collection lines = matplotlib.art3d.Line3DCollection(lstLines, linewidths=5) # We add the collection to the axes ax.add_3DCollection(lines) # Auto scale ax.auto_scale_xyz(lstX, lstY, lstV, ax.has_data()) # Draw pylab.show() # Bye exit(0) Example of data file : 0 0 -4.49132 0 1 0.676531 0 2 -1.60375 0 3 -0.184649 0 4 0.958887 0 5 -0.165971 1 0 -0.0216472 1 1 0.157346 1 2 -0.372853 1 3 0.2576 1 4 0.654506 2 0 0.139453 2 1 -0.204437 2 2 0.151606 2 3 0.271027 3 0 0.222327 3 1 0.921501 3 2 0.500956 4 0 0.104108 4 1 0.415777 5 0 0.244248 -- View this message in context: http://www.nabble.com/3D-histogram-tp16986530p20268667.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Thomas P. <ya...@gm...> - 2008-10-31 14:50:40
|
Hi Jae-Joon, yes, that solved it. Thank you very much. The savefig command should have been inside the for-loop. Thomas > -----Original Message----- > From: Jae-Joon Lee [mailto:lee...@gm...] > Sent: Friday, October 31, 2008 12:43 PM > To: Thomas Pfaff > Cc: Michael Droettboom; mat...@li... > Subject: Re: [Matplotlib-users] no canvas reinitialization between calls > to savefig > > I can reproduce Thomas' problem with Agg backend. It does not happen > if frame_on is True. > And I guess Thomas' guess in the first email might be right. > I had a quick look at the mpl source and I don't think draw(), clf() > or savefig() try to clear the canvas. > The problem is not visible if frame_on is True. > > Thomas, > Put following line after the savefig() function > > fig.canvas._lastKey = None > > and see if it solves the problem (savefig command in your original > email is outside the for loop, I guess this was a typo). > > The Agg backend has a clear() method which fills the canvas with (1, > 1, 1, 0). I tried to put this method in a few different places. It > worked for savefig(), but I couldn't get it work in the interactive > backend (GtkAgg). > > Regards, > |
From: Michael D. <md...@st...> - 2008-10-31 13:19:20
|
Thanks. I've committed this to SVN and should end up in the online docs next time they are regenerated. Cheers, Mike Scott Sinclair wrote: > Hi, > > There was a recent unanswered post on this topic. I hope the attached script is useful and makes it's way into the Matplotlib examples. > > Thanks for a great library, > Scott > Please find our Email Disclaimer here: http://www.ukzn.ac.za/disclaimer/ > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ------------------------------------------------------------------------ > > _______________________________________________ > 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 H. <jd...@gm...> - 2008-10-31 12:55:15
|
On Fri, Oct 31, 2008 at 6:43 AM, Jae-Joon Lee <lee...@gm...> wrote: > The Agg backend has a clear() method which fills the canvas with (1, > 1, 1, 0). I tried to put this method in a few different places. It > worked for savefig(), but I couldn't get it work in the interactive > backend (GtkAgg). > I think what you are seeing is the problem I described here http://www.nabble.com/gtkagg-pixel-buffer-bug-td18051692.html#a18051692 I spent some time working on it and came to the following conclusion: if the mpl figure is fully transparent, you see whatever is in the gui rendering buffer, which may be unintiialized memory. In some sense, mpl is doing what is asked of it, making a fully transparent figure. Clearing the agg buffer is not enough if it is transparent -- you also have to init the canvas buffer. The question is: with what? JDH |
From: Jae-Joon L. <lee...@gm...> - 2008-10-31 11:51:34
|
I can reproduce Thomas' problem with Agg backend. It does not happen if frame_on is True. And I guess Thomas' guess in the first email might be right. I had a quick look at the mpl source and I don't think draw(), clf() or savefig() try to clear the canvas. The problem is not visible if frame_on is True. Thomas, Put following line after the savefig() function fig.canvas._lastKey = None and see if it solves the problem (savefig command in your original email is outside the for loop, I guess this was a typo). The Agg backend has a clear() method which fills the canvas with (1, 1, 1, 0). I tried to put this method in a few different places. It worked for savefig(), but I couldn't get it work in the interactive backend (GtkAgg). Regards, -JJ On Fri, Oct 31, 2008 at 6:35 AM, Thomas Pfaff <ya...@gm...> wrote: > Hi, > > Thanks for the quick reply. > > > My OS is Windows XP with Service Pack 3 > > I'm using an easy-install .egg distribution. Whether I downloaded it > somewhere or simply installed it using easy-install, I don't remember. > > I have another version of matplotlib (0.91.2) installed, which does not seem > to be used. This one was installed using the Windows installer from the > matplotlib homepage. This should not interfere, should it? > > Running the script with --verbose-helpful gives the following results (I > removed parts of the path information) > > $HOME=\pfaff > CONFIGDIR=\pfaff\.matplotlib > matplotlib data path > \python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\mpl > -data > loaded rc file > \python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\mpl > -data\matplotlibrc > matplotlib version 0.98.3 > verbose.level helpful > interactive is False > units is False > platform is win32 > Using fontManager instance from \pfaff\.matplotlib\fontManager.cache > backend TkAgg version 8.4 > > > Now that I think of it: > In the IPython reference, I read about possible problems with tk. When > starting IPython I use -pylab -tk because otherwise I can only do one plot > and the plotting window hangs once I issue another plotting command. > As I didn't find where to tell matplotlib to behave like these two switches > were set, I get by with constantly restarting my interpreter when working > interactively. > Could this be part of the problem? > > Cheers, > > > Thomas > >> -----Original Message----- >> From: Michael Droettboom [mailto:md...@st...] >> Sent: Thursday, October 30, 2008 2:21 PM >> To: Thomas Pfaff >> Cc: mat...@li... >> Subject: Re: [Matplotlib-users] no canvas reinitialization between calls >> to savefig >> >> I can't reproduce this here with SVN trunk. I get what you expect. >> >> Can you provide the information outlined here: >> >> http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#report-a- >> problem >> >> as well as the backend you are using? >> >> Cheers, >> Mike >> > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Thomas P. <ya...@gm...> - 2008-10-31 10:35:33
|
Hi, Thanks for the quick reply. My OS is Windows XP with Service Pack 3 I'm using an easy-install .egg distribution. Whether I downloaded it somewhere or simply installed it using easy-install, I don't remember. I have another version of matplotlib (0.91.2) installed, which does not seem to be used. This one was installed using the Windows installer from the matplotlib homepage. This should not interfere, should it? Running the script with --verbose-helpful gives the following results (I removed parts of the path information) $HOME=\pfaff CONFIGDIR=\pfaff\.matplotlib matplotlib data path \python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\mpl -data loaded rc file \python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\mpl -data\matplotlibrc matplotlib version 0.98.3 verbose.level helpful interactive is False units is False platform is win32 Using fontManager instance from \pfaff\.matplotlib\fontManager.cache backend TkAgg version 8.4 Now that I think of it: In the IPython reference, I read about possible problems with tk. When starting IPython I use -pylab -tk because otherwise I can only do one plot and the plotting window hangs once I issue another plotting command. As I didn't find where to tell matplotlib to behave like these two switches were set, I get by with constantly restarting my interpreter when working interactively. Could this be part of the problem? Cheers, Thomas > -----Original Message----- > From: Michael Droettboom [mailto:md...@st...] > Sent: Thursday, October 30, 2008 2:21 PM > To: Thomas Pfaff > Cc: mat...@li... > Subject: Re: [Matplotlib-users] no canvas reinitialization between calls > to savefig > > I can't reproduce this here with SVN trunk. I get what you expect. > > Can you provide the information outlined here: > > http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#report-a- > problem > > as well as the backend you are using? > > Cheers, > Mike > |
From: Scott S. <sin...@uk...> - 2008-10-31 09:44:24
|
Hi, There was a recent unanswered post on this topic. I hope the attached script is useful and makes it's way into the Matplotlib examples. Thanks for a great library, Scott Please find our Email Disclaimer here: http://www.ukzn.ac.za/disclaimer/ |
From: Amitava M. <am...@re...> - 2008-10-31 01:49:33
|
Thanks, vlines is definitely the better option. By the way, I am using the Enthought python distribution for Windows. I could not get the desired output from the ipython -pylab shell. But the same code when run in SciTe and IDLE gave the desired output. On Thu, 30 Oct 2008 Michael Droettboom wrote : >The limits don't get automatically adjusted when using >add_patch(). > >You could do something like: > >plt.gca().set_xlim(min([x for x, y in vertices]), max([x for x, y >in vertices])) >plt.gca().set_ylim(min([y for x, y in vertices]), max([y for x, y >in vertices])) > >Again, vlines will do all this for you. > >Mike > |
From: wet_colored)arch <wet...@ya...> - 2008-10-30 22:40:18
|
I am trying to code an application with two checkboxes, one associated with each axis on a simple plot. I can then turn on and off lines in the plot that are scaled either to the left side or right side of the plot. This is working fine and patterned after some of the examples from matplotlib. However, when I use the toolbar feature with the "magnifier" the scaling is not usually correct. More specifically, if I select an area with the magnifier, the next drawing of the information is not scaled right. (ususally it is a smaller subset of the data selected) I have confirmed when I run without twinx , the magnifier works fine. I also have noticed that when running the example from matplotlib the same thing happens. I have searched a bit looking for perhaps a bug or comment in forums on how to workaround this or perhaps I have done something wrong, but no luck. Perhaps I don't understand how the magnifier is supposed to work but when I disable the twinx capability of my code, things seem to work fine. (I'm still mostly a noob but I am persistent.) I believe I have 0.90 or perhaps one earlier. I wasn't completely sure how to check but 0.90 is shown in the __init__.py file. I have attached the matplotlib provided example that I feel doesn't work right. I also have a snippet of my code below. (which is structured a bit different than the example but when I run identical to the snippet, using the structure of my code I get an error due to twinx not being a method of subplot - as I recall) from two scales example provided with matplotlib >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> from pylab import * ax1 = subplot(111) t = arange(0.01, 10.0, 0.01) s1 = exp(t) plot(t, s1, 'b-') xlabel('time (s)') ylabel('exp') # turn off the 2nd axes rectangle with frameon kwarg ax2 = twinx() s2 = sin(2*pi*t) plot(t, s2, 'r.') ylabel('sin') ax2.yaxis.tick_right() show() snippet from my code >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> self.axL=subplot(132, position=[0.2,0.1,0.6,0.8]) self.axR=twinx(self.axL) self.rax1=subplot(131, position=[0.01, 0.10, 0.14, 0.8]) self.rax2=subplot(133, position=[0.85, 0.10, 0.14, 0.8]) for key in sorted(dict): if dict[key][1]<>'N': #~ providing key to allow for skipping data set visibility=dict[key][2] exec("self.l%s, = self.ax%s.plot(glbl.fusdata%s,visible=visibility,ls=dict[key][4],color=dict[key][3])"% (key,dict[key][1],key)) -- View this message in context: http://www.nabble.com/twin---dual---two-axis-seems-to-confuse-or-break-toolbar-magnifier-tp20256700p20256700.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Michael D. <md...@st...> - 2008-10-30 17:04:21
|
The limits don't get automatically adjusted when using add_patch(). You could do something like: plt.gca().set_xlim(min([x for x, y in vertices]), max([x for x, y in vertices])) plt.gca().set_ylim(min([y for x, y in vertices]), max([y for x, y in vertices])) Again, vlines will do all this for you. Mike Amitava Maity wrote: > Thanks, > > Being a novice, I am trying the first thing in the example > gallery > that caught my eye. Vlines does seem to be a better option. But > what's > puzzling me is why do I get just a plot of the axes with the > following > code? Where are the vertical lines that I am looking for? > > > > from matplotlib import path > from matplotlib import patches > from matplotlib import pyplot as plt > > codes = (1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, > 2) > vertices = ((39525.540000000001, 144.91), (39525.540000000001, > 161.352), > (39874.5, 149.5), (39874.5, 166.142), (40205.0, 150.41), > (40205.0, > 167.05199999999999), (40518.449999999997, 149.36000000000001), > (40518.449999999997, 166.00200000000001), (40828.0, > 148.50999999999999), (40828.0, 165.15199999999999), > (41173.239999999998, 151.16), (41173.239999999998, 167.602), > (41510.0, > 150.09), (41510.0, 166.732), (41858.0, 146.25), (41858.0, > 162.892), > (42158.0, 152.63999999999999), (42158.0, 169.28199999999998), > (42486.889999999999, 155.22999999999999), (42486.889999999999, > 171.672)) > > patch = patches.PathPatch(path.Path(vertices, codes)) > plt.gca().add_patch(patch) > plt.show() > > > On Thu, 30 Oct 2008 Michael Droettboom wrote : > >> If your first tuple is "codes", and second is "vertices", >> >> You can do: >> >> from matplotlib import path >> from matplotlib import patches >> from matplotlib import pyplot as plt >> >> patch = patches.PathPatch(path.Path(vertices, codes)) >> plt.gca().add_patch(patch) >> plt.show() >> >> >> However... rather than going through all that, have you >> considered >> > using vlines? That will save you the trouble of generating all > the > data in that format yourself. > >> http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pypl >> > ot.vlines > >> Cheers, >> Mike >> >> Amitava Maity wrote: >> >>> Hello list, >>> >>> I have generated the following tuples: >>> >>> (1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2) >>> ((39525.540000000001, 144.91), (39525.540000000001, 161.352), >>> (39874.5, 149.5), (39874.5, 166.142), (40205.0, 150.41), >>> (40205.0, >>> 167.05199999999999), (40518.449999999997, 149.36000000000001), >>> (40518.449999999997, 166.00200000000001), (40828.0, >>> 148.50999999999999), (40828.0, 165.15199999999999), >>> (41173.239999999998, 151.16), (41173.239999999998, 167.602), >>> > (41510.0, > >>> 150.09), (41510.0, 166.732), (41858.0, 146.25), (41858.0, >>> 162.892), >>> (42158.0, 152.63999999999999), (42158.0, 169.28199999999998), >>> (42486.889999999999, 155.22999999999999), (42486.889999999999, >>> 171.672)) >>> >>> How do I use the Matplotlib.path class to draw a set of >>> disconnected >>> vertical lines? >>> >>> Thanks in advance, >>> AMaity. >>> >>> -------------------------------------------------------------------- >>> > ----- > >>> This SF.Net email is sponsored by the Moblin Your Move >>> Developer's >>> > challenge > >>> Build the coolest Linux based applications with Moblin SDK & >>> win >>> > great prizes > >>> Grand prize is a trip for two to an Open Source event anywhere >>> in >>> > the world > >>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>> _______________________________________________ >>> 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 >> >> > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > 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: Amitava M. <am...@re...> - 2008-10-30 16:57:13
|
Thanks, Being a novice, I am trying the first thing in the example gallery that caught my eye. Vlines does seem to be a better option. But what's puzzling me is why do I get just a plot of the axes with the following code? Where are the vertical lines that I am looking for? from matplotlib import path from matplotlib import patches from matplotlib import pyplot as plt codes = (1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2) vertices = ((39525.540000000001, 144.91), (39525.540000000001, 161.352), (39874.5, 149.5), (39874.5, 166.142), (40205.0, 150.41), (40205.0, 167.05199999999999), (40518.449999999997, 149.36000000000001), (40518.449999999997, 166.00200000000001), (40828.0, 148.50999999999999), (40828.0, 165.15199999999999), (41173.239999999998, 151.16), (41173.239999999998, 167.602), (41510.0, 150.09), (41510.0, 166.732), (41858.0, 146.25), (41858.0, 162.892), (42158.0, 152.63999999999999), (42158.0, 169.28199999999998), (42486.889999999999, 155.22999999999999), (42486.889999999999, 171.672)) patch = patches.PathPatch(path.Path(vertices, codes)) plt.gca().add_patch(patch) plt.show() On Thu, 30 Oct 2008 Michael Droettboom wrote : >If your first tuple is "codes", and second is "vertices", > >You can do: > > from matplotlib import path > from matplotlib import patches > from matplotlib import pyplot as plt > >patch = patches.PathPatch(path.Path(vertices, codes)) >plt.gca().add_patch(patch) >plt.show() > > >However... rather than going through all that, have you >considered using vlines? That will save you the trouble of generating all the data in that format yourself. > >http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pypl ot.vlines > >Cheers, >Mike > >Amitava Maity wrote: >> Hello list, >> >>I have generated the following tuples: >> >>(1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2) >>((39525.540000000001, 144.91), (39525.540000000001, 161.352), >>(39874.5, 149.5), (39874.5, 166.142), (40205.0, 150.41), >>(40205.0, >>167.05199999999999), (40518.449999999997, 149.36000000000001), >>(40518.449999999997, 166.00200000000001), (40828.0, >>148.50999999999999), (40828.0, 165.15199999999999), >>(41173.239999999998, 151.16), (41173.239999999998, 167.602), (41510.0, >>150.09), (41510.0, 166.732), (41858.0, 146.25), (41858.0, >>162.892), >>(42158.0, 152.63999999999999), (42158.0, 169.28199999999998), >>(42486.889999999999, 155.22999999999999), (42486.889999999999, >>171.672)) >> >>How do I use the Matplotlib.path class to draw a set of >>disconnected >>vertical lines? >> >>Thanks in advance, >>AMaity. >> >>-------------------------------------------------------------------- ----- >>This SF.Net email is sponsored by the Moblin Your Move >>Developer's challenge >>Build the coolest Linux based applications with Moblin SDK & >>win great prizes >>Grand prize is a trip for two to an Open Source event anywhere >>in the world >>http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>_______________________________________________ >>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: Michael D. <md...@st...> - 2008-10-30 15:18:55
|
If your first tuple is "codes", and second is "vertices", You can do: from matplotlib import path from matplotlib import patches from matplotlib import pyplot as plt patch = patches.PathPatch(path.Path(vertices, codes)) plt.gca().add_patch(patch) plt.show() However... rather than going through all that, have you considered using vlines? That will save you the trouble of generating all the data in that format yourself. http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.vlines Cheers, Mike Amitava Maity wrote: > Hello list, > > I have generated the following tuples: > > (1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2) > ((39525.540000000001, 144.91), (39525.540000000001, 161.352), > (39874.5, 149.5), (39874.5, 166.142), (40205.0, 150.41), > (40205.0, > 167.05199999999999), (40518.449999999997, 149.36000000000001), > (40518.449999999997, 166.00200000000001), (40828.0, > 148.50999999999999), (40828.0, 165.15199999999999), > (41173.239999999998, 151.16), (41173.239999999998, 167.602), > (41510.0, > 150.09), (41510.0, 166.732), (41858.0, 146.25), (41858.0, > 162.892), > (42158.0, 152.63999999999999), (42158.0, 169.28199999999998), > (42486.889999999999, 155.22999999999999), (42486.889999999999, > 171.672)) > > How do I use the Matplotlib.path class to draw a set of > disconnected > vertical lines? > > Thanks in advance, > AMaity. > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > 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: Amitava M. <am...@re...> - 2008-10-30 15:12:54
|
Hello list, I have generated the following tuples: (1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2) ((39525.540000000001, 144.91), (39525.540000000001, 161.352), (39874.5, 149.5), (39874.5, 166.142), (40205.0, 150.41), (40205.0, 167.05199999999999), (40518.449999999997, 149.36000000000001), (40518.449999999997, 166.00200000000001), (40828.0, 148.50999999999999), (40828.0, 165.15199999999999), (41173.239999999998, 151.16), (41173.239999999998, 167.602), (41510.0, 150.09), (41510.0, 166.732), (41858.0, 146.25), (41858.0, 162.892), (42158.0, 152.63999999999999), (42158.0, 169.28199999999998), (42486.889999999999, 155.22999999999999), (42486.889999999999, 171.672)) How do I use the Matplotlib.path class to draw a set of disconnected vertical lines? Thanks in advance, AMaity. |
From: Adam <kef...@gm...> - 2008-10-30 14:08:48
|
On Wed, Oct 29, 2008 at 11:19 PM, Anthony Floyd <ant...@gm...> wrote: > Hi Adam, > > On Sun, Oct 26, 2008 at 4:34 PM, Adam <kef...@gm...> wrote: >> Hi, I'm trying to make myself a set of widgets for the first time. >> I've gotten to the point that I can draw rectangles and lines and make >> them do the right things when re-drawing figures, zooming, etc., but >> I'm still a little lost on some points, and I haven't found any really >> good documentation. >> >> >> So, first question: Where should I go for documentation first? > > As you've probably noticed, the documentation is in the middle of an > update. Part of what has suffered while the docs are updated is the > API documentation. The source code, however, is quite well > documented. A good way to get access to this documentation is to get > a hold of epydoc and run it on the matplotlib source tree. This will > generate good local docs for you. Thanks, I was unaware of epydoc. The new matplotlib page (which wasn't up when I asked this question) has a lot of examples showing exactly what I want to do, so that will probably help a lot too. Adam |
From: Pierre GM <pgm...@gm...> - 2008-10-30 14:01:16
|
Søren, Why wouldn't you allocate a 'zorder' to each mask, corresponding to a layer nb. That way, if a same pixel is shared by 2 masks or more, you take the one with the highest zorder. That could be done as easily as definind a `maskstack` list, with element `i` the mask with zorder `i`. Now, the global mask is simply np.logical_or.reduce(maskstack). That way, you could leave any masked data in the original dataset alone and not mix it with your stack of patches. Let me know how it goes. On Wednesday 29 October 2008 21:10:34 Søren Nielsen wrote: > Hi, > > I'm making a masking function that can mask out certain areas of an image > using different types of masks, and display them using patches. I want to > add a function where a user can move a mask that has already been created. > > I can use the picker = True to have it return the patch being clicked on.. > but how do I know which mask was clicked on if I have two identical masks? > or even worse, if I have two identical masks almost lying ontop of each > other.. returning both patches at the same time?? I've tried different > things using == to compare.. but that didn't work.. any suggestions?? > > Soren |
From: Michael D. <md...@st...> - 2008-10-30 13:20:50
|
I can't reproduce this here with SVN trunk. I get what you expect. Can you provide the information outlined here: http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#report-a-problem as well as the backend you are using? Cheers, Mike Thomas Pfaff wrote: > Hello, > > I'm having a problem reusing a figure with the savefig command. > I want to generate image timeseries with GoogleEarth displaying weather > radar data, so my plot geometry is the same always and only the color of the > patches which represent measurements changes over time. > Now I want those portions of the image, where no precipitation occurs to be > transparent so I was thinking about setting the visibility of those Polygons > to False and that would be it. > > Unfortunately savefig seems to reuse the image it created before when called > a second time. > > I wrote this example code. > > ########################## > #start > #set some image parameters > figsize = (1.,1.) > dpi = 300 > rect = [0.,0.,1.,1.] > #get figure and axes objects > fig = plt.figure(figsize=figsize, dpi=dpi, frameon=False) > ax = fig.add_axes(rect, frameon=False) > ax.set_aspect(1.0) > > #create two polygons, one filling the left half of the image > # one the right half > poly1 = Polygon(([0,0],[0.5,0],[0.5,1],[0,1],[0,0]), fill=True) > ax.add_patch(poly1) > poly2 = Polygon(([0.5,0],[1,0],[1,1],[0.5,1],[0.5,0]), fill=True) > ax.add_patch(poly2) > > # basic colors black, red, green, blue > colors=['#000000','#ff0000','#00ff00','#0000ff'] > # switch for the left polygon > values =[-1, 1, -1, 1] > for value, color in zip(values, colors): > if value < 0: > poly1.set_visible(False) > else: > poly1.set_visible(True) > poly1.set_facecolor(color) > poly2.set_facecolor(color) > > plt.savefig('test'+color[1:]+'.png',dpi=dpi,format='png',transparent=True) > # end > ########################## > > > Now, what I expect and what I get is: > > Test000000.png: black on the right side, transparent with tick marks on the > left - this is what I get. > > Testff0000.png: red on both sides with tick marks visible - This is what I > get. > > Test00ff00.png: green on the right side, transparent on the left. What I get > is green on the right and red on the left. So the red from the previous > patch has been retained > > Test0000ff.png: blue on both sides, which is what I get as well. > > > So apparently the plot is updated, but only in places where something is > actually drawn. The rest remains unchanged and so transparency is not > restored. > > I tried using clf, cla, deleting objects. In all cases savefig just always > produced the first image over and over, most probably because nothing new > was drawn. > > I even tried to remove fig's canvas object, hoping that the library might > create a new one, but that only gave me a traceback. > > > Any ideas what I'm doing wrong or how I could solve this problem? > > Thank you very much in advance, > > > Thomas > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
From: James P. <jp...@br...> - 2008-10-30 12:13:32
|
Hi I am using Python 2.4.4, Numpy 1.1.1 and Pylab 0.98.3 and have a problem with saving to eps. Basically I create 7 plots, each with 2 subplots of which one is an imshow colour map and the second is a simple plot(). When saving them to eps I can display 5 out of 7 with ghostview but 2 of them fail to display. Setting the file type to PNG I can get all 7 out but this is for a ps latex document so I need eps. If I turn off the plot() subplot I can get all 7 out into eps. All 7 plots are effectively the same just with different data and all 7 display fine via the backend Tkagg. Any ideas Cheers James |
From: Thomas P. <ya...@gm...> - 2008-10-30 09:41:20
|
Hello, I'm having a problem reusing a figure with the savefig command. I want to generate image timeseries with GoogleEarth displaying weather radar data, so my plot geometry is the same always and only the color of the patches which represent measurements changes over time. Now I want those portions of the image, where no precipitation occurs to be transparent so I was thinking about setting the visibility of those Polygons to False and that would be it. Unfortunately savefig seems to reuse the image it created before when called a second time. I wrote this example code. ########################## #start #set some image parameters figsize = (1.,1.) dpi = 300 rect = [0.,0.,1.,1.] #get figure and axes objects fig = plt.figure(figsize=figsize, dpi=dpi, frameon=False) ax = fig.add_axes(rect, frameon=False) ax.set_aspect(1.0) #create two polygons, one filling the left half of the image # one the right half poly1 = Polygon(([0,0],[0.5,0],[0.5,1],[0,1],[0,0]), fill=True) ax.add_patch(poly1) poly2 = Polygon(([0.5,0],[1,0],[1,1],[0.5,1],[0.5,0]), fill=True) ax.add_patch(poly2) # basic colors black, red, green, blue colors=['#000000','#ff0000','#00ff00','#0000ff'] # switch for the left polygon values =[-1, 1, -1, 1] for value, color in zip(values, colors): if value < 0: poly1.set_visible(False) else: poly1.set_visible(True) poly1.set_facecolor(color) poly2.set_facecolor(color) plt.savefig('test'+color[1:]+'.png',dpi=dpi,format='png',transparent=True) # end ########################## Now, what I expect and what I get is: Test000000.png: black on the right side, transparent with tick marks on the left - this is what I get. Testff0000.png: red on both sides with tick marks visible - This is what I get. Test00ff00.png: green on the right side, transparent on the left. What I get is green on the right and red on the left. So the red from the previous patch has been retained Test0000ff.png: blue on both sides, which is what I get as well. So apparently the plot is updated, but only in places where something is actually drawn. The rest remains unchanged and so transparency is not restored. I tried using clf, cla, deleting objects. In all cases savefig just always produced the first image over and over, most probably because nothing new was drawn. I even tried to remove fig's canvas object, hoping that the library might create a new one, but that only gave me a traceback. Any ideas what I'm doing wrong or how I could solve this problem? Thank you very much in advance, Thomas -- Using Python2.5, matplotlib 0.98.3, numpy 1.1.1, matplotlib.basemap 0.99.1 On WindowsXP SP3, Pentium4 DualCore 3.4GHz, 3GB RAM |
From: Anthony F. <ant...@gm...> - 2008-10-30 05:19:37
|
Hi Adam, On Sun, Oct 26, 2008 at 4:34 PM, Adam <kef...@gm...> wrote: > Hi, I'm trying to make myself a set of widgets for the first time. > I've gotten to the point that I can draw rectangles and lines and make > them do the right things when re-drawing figures, zooming, etc., but > I'm still a little lost on some points, and I haven't found any really > good documentation. > > > So, first question: Where should I go for documentation first? As you've probably noticed, the documentation is in the middle of an update. Part of what has suffered while the docs are updated is the API documentation. The source code, however, is quite well documented. A good way to get access to this documentation is to get a hold of epydoc and run it on the matplotlib source tree. This will generate good local docs for you. Cheers, A> |
From: S. N. <sor...@gm...> - 2008-10-30 01:10:39
|
Hi, I'm making a masking function that can mask out certain areas of an image using different types of masks, and display them using patches. I want to add a function where a user can move a mask that has already been created. I can use the picker = True to have it return the patch being clicked on.. but how do I know which mask was clicked on if I have two identical masks? or even worse, if I have two identical masks almost lying ontop of each other.. returning both patches at the same time?? I've tried different things using == to compare.. but that didn't work.. any suggestions?? Soren |
From: Michael D. <md...@st...> - 2008-10-29 19:45:53
|
Sorry. That's my bad. This is hopefully now fixed. Try updating to SVN r6351. Mike Nils Wagner wrote: > > Hi all, > > I cannot install matplotlib from recent svn. > Here is the output > > > building 'matplotlib.backends._wxagg' extension > gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 > -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -fPIC > -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 > -D_LARGE_FILES -DNO_GCC_PRAGMA -I/usr/local/include > -I/usr/include -I. > -I/usr/local/lib64/python2.5/site-packages/numpy/core/include > -Isrc -Iagg24/include -I. > -I/usr/local/lib64/python2.5/site-packages/numpy/core/include > -I/usr/include/freetype2 -I/usr/local/include > -I/usr/include -I. > -I/usr/lib64/wx/include/gtk2-unicode-release-2.6 > -I/usr/include/wx-2.6 -I/usr/include/python2.5 -c > src/_wxagg.cpp -o build/temp.linux-x86_64-2.5/src/_wxagg.o > src/_wxagg.cpp: In function ‘wxImage* > convert_agg2image(RendererAgg*, Py::Object)’: > src/_wxagg.cpp:181: error: no match for ‘operator*’ in > ‘*aggRenderer->RendererAgg::renderingBuffer’ > /usr/include/wx-2.6/wx/datetime.h:2065: note: candidates > are: wxTimeSpan operator*(int, const wxTimeSpan&) > /usr/include/wx-2.6/wx/datetime.h:2071: note: > wxDateSpan operator*(int, const > wxDateSpan&) > /usr/include/wx-2.6/wx/geometry.h:243: note: > wxPoint2DInt operator*(const > wxPoint2DInt&, const wxPoint2DInt&) > /usr/include/wx-2.6/wx/geometry.h:248: note: > wxPoint2DInt operator*(wxInt32, const > wxPoint2DInt&) > /usr/include/wx-2.6/wx/geometry.h:258: note: > wxPoint2DInt operator*(const > wxPoint2DInt&, wxInt32) > /usr/include/wx-2.6/wx/geometry.h:253: note: > wxPoint2DInt operator*(wxDouble, const > wxPoint2DInt&) > /usr/include/wx-2.6/wx/geometry.h:263: note: > wxPoint2DInt operator*(const > wxPoint2DInt&, wxDouble) > /usr/include/wx-2.6/wx/geometry.h:467: note: > wxPoint2DDouble operator*(const > wxPoint2DDouble&, const wxPoint2DDouble&) > /usr/include/wx-2.6/wx/geometry.h:472: note: > wxPoint2DDouble operator*(wxDouble, const > wxPoint2DDouble&) > /usr/include/wx-2.6/wx/geometry.h:477: note: > wxPoint2DDouble operator*(wxInt32, const > wxPoint2DDouble&) > /usr/include/wx-2.6/wx/geometry.h:482: note: > wxPoint2DDouble operator*(const > wxPoint2DDouble&, wxDouble) > /usr/include/wx-2.6/wx/geometry.h:487: note: > wxPoint2DDouble operator*(const > wxPoint2DDouble&, wxInt32) > /usr/local/lib64/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h: > At global scope: > /usr/local/lib64/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:958: > warning: ‘int _import_array()’ defined but not used > error: command 'gcc' failed with exit status 1 > > Nils > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > 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: Nils W. <nw...@ia...> - 2008-10-29 19:40:52
|
Hi all, I cannot install matplotlib from recent svn. Here is the output building 'matplotlib.backends._wxagg' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -fPIC -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -I/usr/local/include -I/usr/include -I. -I/usr/local/lib64/python2.5/site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/local/lib64/python2.5/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/usr/lib64/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -I/usr/include/python2.5 -c src/_wxagg.cpp -o build/temp.linux-x86_64-2.5/src/_wxagg.o src/_wxagg.cpp: In function wxImage* convert_agg2image(RendererAgg*, Py::Object): src/_wxagg.cpp:181: error: no match for operator* in *aggRenderer->RendererAgg::renderingBuffer /usr/include/wx-2.6/wx/datetime.h:2065: note: candidates are: wxTimeSpan operator*(int, const wxTimeSpan&) /usr/include/wx-2.6/wx/datetime.h:2071: note: wxDateSpan operator*(int, const wxDateSpan&) /usr/include/wx-2.6/wx/geometry.h:243: note: wxPoint2DInt operator*(const wxPoint2DInt&, const wxPoint2DInt&) /usr/include/wx-2.6/wx/geometry.h:248: note: wxPoint2DInt operator*(wxInt32, const wxPoint2DInt&) /usr/include/wx-2.6/wx/geometry.h:258: note: wxPoint2DInt operator*(const wxPoint2DInt&, wxInt32) /usr/include/wx-2.6/wx/geometry.h:253: note: wxPoint2DInt operator*(wxDouble, const wxPoint2DInt&) /usr/include/wx-2.6/wx/geometry.h:263: note: wxPoint2DInt operator*(const wxPoint2DInt&, wxDouble) /usr/include/wx-2.6/wx/geometry.h:467: note: wxPoint2DDouble operator*(const wxPoint2DDouble&, const wxPoint2DDouble&) /usr/include/wx-2.6/wx/geometry.h:472: note: wxPoint2DDouble operator*(wxDouble, const wxPoint2DDouble&) /usr/include/wx-2.6/wx/geometry.h:477: note: wxPoint2DDouble operator*(wxInt32, const wxPoint2DDouble&) /usr/include/wx-2.6/wx/geometry.h:482: note: wxPoint2DDouble operator*(const wxPoint2DDouble&, wxDouble) /usr/include/wx-2.6/wx/geometry.h:487: note: wxPoint2DDouble operator*(const wxPoint2DDouble&, wxInt32) /usr/local/lib64/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h: At global scope: /usr/local/lib64/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:958: warning: int _import_array() defined but not used error: command 'gcc' failed with exit status 1 Nils |
From: Michael D. <md...@st...> - 2008-10-29 18:47:20
|
It looks like this import error is actually inside Numpy. Try completely removing it and reinstalling. Cheers, Mike Zhuanshi He wrote: > Hi > > I just installed matplotlib-0.98.3-py2.5-win32.egg using > "easy_inbstall -U matplotlib" on WinXP, and tried to test it under > ipython. It looks there is an ImportError exist. > > Any patch is available? > > see my screen outpus: > -------------------------------------------------------------------------------------------------------------------- > Python 2.5.2 (r252:60911, Mar 27 2008, 17:57:18) [MSC v.1310 32 bit (Intel)] > Type "copyright", "credits" or "license" for more information. > > IPython 0.9.1 -- An enhanced Interactive Python. > ? -> Introduction and overview of IPython's features. > %quickref -> Quick reference. > help -> Python's own help system. > object? -> Details about 'object'. ?object also works, ?? prints more. > > In [1]: import matplotlib > --------------------------------------------------------------------------- > ImportError Traceback (most recent call last) > > C:\Python25\Scripts\<ipython console> in <module>() > > c:\python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\__ini > t__.py in <module>() > 126 import sys, os, tempfile > 127 > --> 128 from rcsetup import defaultParams, validate_backend, validate_toolbar > 129 from rcsetup import validate_cairo_format > 130 > > c:\python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\rcset > up.py in <module>() > 17 import warnings > 18 from matplotlib.fontconfig_pattern import parse_fontconfig_pattern > ---> 19 from matplotlib.colors import is_color_like > 20 > 21 #interactive_bk = ['gtk', 'gtkagg', 'gtkcairo', 'fltkagg', 'qtagg', 'qt4 > agg', > > c:\python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\color > s.py in <module>() > 37 import numpy as np > 38 from numpy import ma > ---> 39 import matplotlib.cbook as cbook > 40 > 41 cnames = { > > c:\python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\cbook > .py in <module>() > 7 import time, datetime > 8 import numpy as np > ----> 9 import numpy.ma as ma > 10 from weakref import ref > 11 > > C:\Python25\Lib\site-packages\numpy\ma\__init__.py in <module>() > 15 from core import * > 16 > ---> 17 import extras > 18 from extras import * > 19 > > C:\Python25\Lib\site-packages\numpy\ma\extras.py in <module>() > 39 from numpy import ndarray, array as nxarray > 40 import numpy.core.umath as umath > ---> 41 from numpy.lib.index_tricks import AxisConcatenator > 42 from numpy.lib.polynomial import _lstsq, _single_eps, _double_eps > 43 > > ImportError: cannot import name AxisConcatenator > > In [2]: > > ------------------------------------------------------------------------------------- > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |