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
(27) |
2
(15) |
3
(2) |
4
(4) |
5
(5) |
6
(9) |
7
(15) |
8
(24) |
9
(19) |
10
(7) |
11
(13) |
12
(26) |
13
(27) |
14
(17) |
15
(14) |
16
(12) |
17
(9) |
18
(12) |
19
(17) |
20
(19) |
21
(5) |
22
(5) |
23
(7) |
24
(4) |
25
(1) |
26
(9) |
27
(20) |
28
(5) |
29
(10) |
30
(12) |
31
(6) |
From: arsbbr <ar...@gm...> - 2012-03-29 16:30:39
|
I never got the trick with set_yscale="clip" to work for my plots (MPL 1.1.0). So I'm passing my error values to this little function in order to correct the yerr_neg: def filt_neg_err(y, yerr, set_ymin=1e-6): ymin = y - yerr filt = ymin < 0 yerr_pos = yerr.copy() yerr_neg = yerr.copy() yerr_neg[filt] = y[filt] - set_ymin return np.array([yerr_neg, yerr_pos]) Cheers, Arne Benjamin Root-2 wrote: > > On Fri, Mar 9, 2012 at 1:14 PM, Wolfgang Draxinger < > wdr...@dr...> wrote: > >> On Fri, 9 Mar 2012 11:19:15 -0600 >> Benjamin Root <ben...@ou...> wrote: >> >> > Can I have the data you used to produce these errorbars so I can test >> > this bug? >> >> Here's the data >> >> # Fluence.... -sigma Signal... -sigma area >> 1127 48.32 9.114 10.31 0.1318 >> 1.127e+04 482.9 35.96 16.15 0.4994 >> 1.127e+05 4829 231.2 101.1 2.568 >> 1.127e+06 4.829e+04 4631 1689 12.22 >> >> > Ah, finally figured it out. The issue is that your y-value for that error > bar is 9.114, but you want to plot error bars that are +/-10.31. That > line > gets thrown out by matplotlib because you can't plot at negative values > for > log scale. There is a trick that might work. The set_yscale method has a > kwarg "nonposy" which could be set to "clip". You could also try setting > to the "symlog" scale which might let you get away with a negative value. > > I hope that helps! > Ben Root > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://old.nabble.com/Errorbars-not-drawn-correctly-in-logarithmic-scales-tp33469114p33544881.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Chao Y. <cha...@gm...> - 2012-03-29 16:29:46
|
Dear all, I make a contourf plot but I think the colorbar is too wide. Can I make it narrower (slimmer)? plt.contourf(data) cbar=plt.colorbar() ?? thanks for any suggestions. cheers, Chao -- *********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 ************************************************************************************ |
From: Christopher G. <chr...@gm...> - 2012-03-29 09:53:35
|
On Tue, Mar 27, 2012 at 3:31 AM, Mike Kaufman <mc...@gm...> wrote: > On 3/26/12 12:49 PM, Christopher Graves wrote: > >> On Sun, Mar 11, 2012 at 2:32 PM, Christopher Graves >> <chr...@gm... <mailto:chr...@gm...>> wrote: >> > > Try this: >> >> from pylab import * >> from matplotlib.ticker import AutoMinorLocator >> >> clf() >> ax=subplot(111) >> ax.autoscale(tight=True) >> plot([1,2,4],[1,2,3]) >> ax.xaxis.set_minor_locator(__AutoMinorLocator(2)) >> ax.yaxis.set_minor_locator(__AutoMinorLocator(2)) >> >> draw() >> >> M >> >> PS: I believe this is a fairly new feature... >> >> >> Thanks! Great news that AutoMinorLocator has been added and >> accomplishes this. Regarding the P.S. I can confirm that the feature >> was not in matplotlib 1.0.1 - I had to update to 1.1.0 to use it. >> >> Best /Chris >> >> >> >> Hi Mike, >> >> A follow-up question... When using that, if one then tries to manually >> use the zoom-box tool available with a matplotlib plot, if one draws too >> small of a box (less than 2 major ticks in x or y dimension, based on >> the following error message), it gives the following error and further >> operations on the plot do not work. >> >> ValueError: Need at least two major ticks to find minor tick locations >> ( File "/usr/lib/pymodules/python2.7/matplotlib/ticker.py", line 1528, >> in __call__ ) >> >> Any way to avoid this for now? (And ultimately, should this be made into >> a bug fix request?) >> > > > Ok, I seem to remember seeing this error before, but I can't trip it now > (with either 1.1.1rc or today's git checkout of 1.2.x). Do you have > a short script that can reproduce this? For me, the zoom-box tool seems to > be [correctly] setting the majortick locations as I zoom in, thus > preventing this exception. I should note that I'm using the GTKAgg > frontend. This may be the issue. A long time ago I was using the MacOSX > frontend, and maybe this was when I was seeing it... > > Aside from that, this would be a bug. > > M > On Wed, Mar 28, 2012 at 10:50 PM, Christopher Graves < chr...@gm...> wrote: > Hi Mike, > > Ok I found the root cause. Here is a short script: > > > from pylab import * > > from matplotlib.ticker import MultipleLocator, AutoMinorLocator > > plot([0,3],[0,2.2]) > > ax = gca() > > ax.xaxis.set_major_locator(MultipleLocator(0.5)) > > ax.xaxis.set_minor_locator(AutoMinorLocator(2)) > > show() > > > Once MultipleLocator has been called, the auto-reassigning of tick spacing > when zooming (either with the zoom box or the cross and right-click drag) > does not happen, and then AutoMinorLocator has the error because it has > "majorstep = majorlocs[1] - majorlocs[0]" and majorlocs has less than 2 > elements when zoomed in that far. (GTKAgg vs others doesn't matter.) > > Seems like a bug. Is it the same in the newer mpl version you have? > For my purposes, a different fix could work, because my reason to use > MultipleLocator is only to make x and y major ticks have equal spacing, as > follows: > > from pylab import * > > from matplotlib.ticker import MultipleLocator, AutoMinorLocator > > ax = subplot(111, aspect='equal') > > plot([0,3],[0,1.1]) > > # Set the ticks to have the same interval on both x and y axes: > > x_major_tick_interval = > abs(ax.xaxis.get_ticklocs()[0]-ax.xaxis.get_ticklocs()[1]) > > ax.yaxis.set_major_locator(MultipleLocator(x_major_tick_interval)) > > # 2 minor ticks per major tick: > > ax.yaxis.set_minor_locator(AutoMinorLocator(2)) > > ax.xaxis.set_minor_locator(AutoMinorLocator(2)) > > show() > > > aspect='equal' is not necessary to bring out the error, it just > illustrates the purpose of this. Is there another way to fix the x and y > tick interval as equal? (And ideally even maintain the equal spacing when > zooming.. As it is, they initially show as equal, but when zooming they can > lose equal visible spacing while maintaining equal value intervals.) > > > Best, > > Chris > On Thu, Mar 29, 2012 at 4:06 AM, Mike Kaufman <mc...@gm...> wrote: > I can confirm this bug on yesterday's checkout. About equal spacing, I > don't know offhand. A question to ask the list I think. If you could, > please file as an issue on the github tracker. Include your code nugget > that reproduces. Thanks. > > I don't have a lot of time at this moment, so hopefully somebody else > looks at fixing it first. > > M > Ok, bug is filed at https://github.com/matplotlib/matplotlib/issues/807 I did not realize that our last couple of messages were not sent to the mailing-list. To others on mailing-list: Apart from someone hopefully fixing this bug, does anyone know another way to fix the x and y tick interval as equal, besides the way I did it in the last code block above, which uses "ax.yaxis.set_major_locator(MultipleLocator(x_major_tick_interval))" after plotting? (And ideally even maintain the equal spacing when zooming.. As it is, they initially show as equal, but when zooming they can lose equal visible spacing while maintaining equal value intervals.) Best /Chris |
From: Stuart M. <Stu...@ob...> - 2012-03-28 19:09:39
|
Hello, Just trying out the PySide support in matplotlib 1.1.0 and it works great but when it seems that when using the Qt4Agg backend there is a lingering import dependency on PyQt that PyInstaller picks up. My application works with PyQt removed so I assume that this is a PyInstaller issue but I'm wondering if the import structure in matplotlib could be made more PySide+PyInstaller friendly? Thanks. Stuart |
From: Jouni K. S. <jk...@ik...> - 2012-03-28 18:28:23
|
sanders <sa...@kn...> writes: > If keywords fill=False and log=True, > > then after saving, the png looks fine but the histogram in the pdf is > mixed up. Confirmed, thanks for the report. I filed this at https://github.com/matplotlib/matplotlib/issues/804 -- Jouni K. Seppänen http://www.iki.fi/jks |
From: <gu...@th...> - 2012-03-28 18:11:14
|
Thanks a lot John!! It's working perfectly. From: John Hunter [mailto:jd...@gm...] Sent: Wednesday, March 28, 2012 11:52 AM To: Espinosa, Guido R Cc: mat...@li... Subject: Re: [Matplotlib-users] Too Many Requests error - matplotlib gallery On Mon, Mar 19, 2012 at 12:53 PM, <gu...@th...<mailto:gu...@th...>> wrote: Awesome John!! Thank you very much for your help on this... Guido From: John Hunter [mailto:jd...@gm...<mailto:jd...@gm...>] Sent: Monday, March 19, 2012 12:52 PM To: Espinosa, Guido R Cc: mat...@li...<mailto:mat...@li...> Subject: Re: [Matplotlib-users] Too Many Requests error - matplotlib gallery On Mon, Mar 19, 2012 at 12:46 PM, John Hunter <jd...@gm...<mailto:jd...@gm...>> wrote: Thanks, this has been going on for several days now and I just filed a ticket with sourceforge. https://sourceforge.net/apps/trac/sourceforge/ticket/24897 sf has made some changes to their algorithm to accommodate our gallery. Appears to be working again. Details are in the sf ticket linked above. JDH |
From: John H. <jd...@gm...> - 2012-03-28 16:52:39
|
On Mon, Mar 19, 2012 at 12:53 PM, <gu...@th...> wrote: > Awesome John!! Thank you very much for your help on this…**** > > ** ** > > Guido **** > > **** > > *From:* John Hunter [mailto:jd...@gm...] > *Sent:* Monday, March 19, 2012 12:52 PM > *To:* Espinosa, Guido R > *Cc:* mat...@li... > *Subject:* Re: [Matplotlib-users] Too Many Requests error - matplotlib > gallery**** > > ** ** > > ** ** > > On Mon, Mar 19, 2012 at 12:46 PM, John Hunter <jd...@gm...> wrote:** > ** > > ** ** > > Thanks, this has been going on for several days now and I just filed a > ticket with sourceforge.**** > > ** ** > > ** ** > > https://sourceforge.net/apps/trac/sourceforge/ticket/24897 > sf has made some changes to their algorithm to accommodate our gallery. Appears to be working again. Details are in the sf ticket linked above. JDH |
From: sanders <sa...@kn...> - 2012-03-28 12:20:47
|
Dear all, I'm making histograms: If keywords fill=False and log=True, then after saving, the png looks fine but the histogram in the pdf is mixed up. Anyone knows about this? Bram ### Script ### import matplotlib.pyplot as plt import numpy as np data = np.random.normal(size=1000) ### correct pdf fig = plt.figure() ax = fig.add_subplot(111) ax.hist(data, fill=False, log=False) fig.savefig('plot1.pdf', format='pdf') fig.savefig('plot1.png', format='png') ### wrong pdf fig = plt.figure() ax = fig.add_subplot(111) ax.hist(data, fill=False, log=True) fig.savefig('plot2.pdf', format='pdf') fig.savefig('plot2.png', format='png') |
From: klo uo <kl...@gm...> - 2012-03-27 21:39:53
|
Ah mayavi... I find it complicated for building, and in Ubuntu repository (or launchpad) there is some old version I'll try later today to build it Thanks for your suggestion, Cheers On Tue, Mar 27, 2012 at 11:25 PM, Frédéric Vogt <fv...@ms...>wrote: > Is the savefig function what you're looking for ? > > http://github.enthought.com/mayavi/mayavi/auto/mlab_figure.html > > Note that as far as I know, the .mtl file associated with a given .obj > file is not handled properly - all your colors will be white. Personally, I > export in .vrml which suits my needs better, as it does handle colors in a > satisfactory way. > > |
From: Frédéric V. <fv...@ms...> - 2012-03-27 21:39:24
|
Is the savefig function what you're looking for ? http://github.enthought.com/mayavi/mayavi/auto/mlab_figure.html Note that as far as I know, the .mtl file associated with a given .obj file is not handled properly - all your colors will be white. Personally, I export in .vrml which suits my needs better, as it does handle colors in a satisfactory way. Cheers, Fréd On 27/03/2012, at 11:24 AM, klo uo wrote: > Does someone maybe knows of a project that allows exporting MPL 3D plot (mpl_toolkits.mplot3d.Axes3D) to 3D file format, like OBJ, 3DS, BLEND ... any kind? > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure_______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Arnaud G. <arn...@so...> - 2012-03-27 21:13:54
|
What is the most effective approach to perform a 'zoom under mouse cursor'? Currently I use the following code (considering g as mpl.Axes), but set_xlim() is called twice. Is there a better approach? <code> # First zoom result = \ g.bbox.shrunk(DEFAULT_ZOOM_FACTOR,1).transformed(g.transData.inverted()) g.set_xlim(*result.intervalx) # Get the new location of initial event b = g.transData.transform_point([event.xdata, 0]) # Then replace the original location under the mouse cursor result = \ g.bbox.translated(-(event.x-b[0]),0).transformed(g.transData.inverted()) g.set_xlim(*result.intervalx) </code> Arnaud. |
From: Arnaud G. <ar...@os...> - 2012-03-27 21:13:50
|
What is the most effective approach to perform a 'zoom under mouse cursor'? Currently I use the following code (considering g as mpl.Axes), but set_xlim() is called twice. Is there a better approach? <code> # First zoom result = \ g.bbox.shrunk(DEFAULT_ZOOM_FACTOR,1).transformed(g.transData.inverted()) g.set_xlim(*result.intervalx) # Get the new location of initial event b = g.transData.transform_point([event.xdata, 0]) # Then replace the original location under the mouse cursor result = \ g.bbox.translated(-(event.x-b[0]),0).transformed(g.transData.inverted()) g.set_xlim(*result.intervalx) </code> Arnaud. |
From: Eric F. <ef...@ha...> - 2012-03-27 17:25:46
|
On 03/26/2012 12:14 PM, Magician wrote: > Hi. > > I want to install Matplotlib from source code on CentOS. > I've been using Matplotlib for a year. > But this is the first time for me to install CentOS by myself. > > I installed CentOS 6.2 in basic install option. > Next, I installed NumPy and Matplotlib. > .matplotlibrc isn't set. > > It looks successfully installed, but when I type show() command, > nothing appears. > I can export PNG image by using savefig() command, so maybe > I'm using invalid backend. It sounds like the problem is that you installed mpl without having installed the dependencies for any of the interactive backends. See http://matplotlib.sourceforge.net/users/installing.html Eric > How can I display plots with show() command? > > > Magician > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: kgustaf <kyl...@un...> - 2012-03-27 15:34:14
|
Hello William - did you manage to solve this problem without resorting to building from source? Thanks! -- View this message in context: http://old.nabble.com/Having-trouble-installing-matplotlib-on-Mac-OS-X-Lion-tp32222373p33544787.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Michael R. <raw...@ya...> - 2012-03-27 14:34:24
|
self._ax.grid is in the code I have. Jae-Joon: Yannick must have modified the code beyond the version to which you refer. Mike ________________________________ From: Jae-Joon Lee <lee...@gm...> To: Yannick Copin <yan...@la...> Cc: Michael Rawlins <ra...@ge...>; mat...@li... Sent: Monday, March 26, 2012 9:38 PM Subject: Re: [Matplotlib-users] Taylor diagram (2nd take) On Wed, Feb 22, 2012 at 12:10 AM, Yannick Copin <yan...@la...> wrote: > after iterating with Michael A. Rawlins over my previous attempt to code a > Taylor diagram (see [1]), here's a new version of my code, along with an > example plot. Maybe it could make its way into the gallery as an example of > Floating Axes and Grid Finder (even though I'm not sure the code is > particularly exemplary, comments are welcome). Good to know that someone is using axisartist toolkit. Just a quick comment. def add_grid(self, *args, **kwargs): """Add a grid.""" self.ax.grid(*args, **kwargs) Maybe you wanted "self._ax.grid"? Regards, -JJ ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Alexis P. <ale...@fr...> - 2012-03-27 14:04:31
|
You can check you are editing the correct configuration file with (in the Python shell) : >>> import matplotlib >>> matplotlib.matplotlib_fname() You can also try other backends. For a list, see : http://matplotlib.sourceforge.net/faq/usage_faq.html#what-is-a-backend On Tue, Mar 27, 2012 at 2:46 PM, Magician <f_m...@ma...> wrote: > Thank you, Alexis. > > I try to install PyQt4 and set Qt4Agg just now, but nothing displayed. > Ummm...what's wrong...?? > > > Magician > > > On 2012/03/27, at 17:05, Alexis Praga wrote: > >> I had the same problem on Debian. >> Editing the matplotlibrc (should be installed somewhere in your >> systeme) and changing the "backend" variable to Qt4Agg did the trick. >> >> >> >> On Tue, Mar 27, 2012 at 12:14 AM, Magician <f_m...@ma...> wrote: >>> Hi. >>> >>> I want to install Matplotlib from source code on CentOS. >>> I've been using Matplotlib for a year. >>> But this is the first time for me to install CentOS by myself. >>> >>> I installed CentOS 6.2 in basic install option. >>> Next, I installed NumPy and Matplotlib. >>> .matplotlibrc isn't set. >>> >>> It looks successfully installed, but when I type show() command, >>> nothing appears. >>> I can export PNG image by using savefig() command, so maybe >>> I'm using invalid backend. >>> >>> How can I display plots with show() command? >>> >>> >>> Magician > |
From: Ana <rra...@gm...> - 2012-03-27 13:50:42
|
Hi! I am trying to install the matplotlib in my pc with the following configuration Windows 7, 64 python2.6.6 >>> numpy.__version__ '1.6.1' >>> matplotlib.__version__ '1.1.0' once i try to test the code i get the following error fir matplotlib: >>> import numpy >>> import numpy as np >>> import matplotlib >>> import matplotlib.pyplot as plt Traceback (most recent call last): File "<pyshell#5>", line 1, in <module> import matplotlib.pyplot as plt File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 23, in <module> from matplotlib.figure import Figure, figaspect File "C:\Python26\lib\site-packages\matplotlib\figure.py", line 16, in <module> import artist File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 6, in <module> from transforms import Bbox, IdentityTransform, TransformedBbox, TransformedPath File "C:\Python26\lib\site-packages\matplotlib\transforms.py", line 34, in <module> from matplotlib._path import affine_transform ImportError: DLL load failed: %1 is not a valid Win32 application. can someone help me with this ? |
From: Magician <f_m...@ma...> - 2012-03-27 12:47:03
|
Thank you, Alexis. I try to install PyQt4 and set Qt4Agg just now, but nothing displayed. Ummm...what's wrong...?? Magician On 2012/03/27, at 17:05, Alexis Praga wrote: > I had the same problem on Debian. > Editing the matplotlibrc (should be installed somewhere in your > systeme) and changing the "backend" variable to Qt4Agg did the trick. > > > > On Tue, Mar 27, 2012 at 12:14 AM, Magician <f_m...@ma...> wrote: >> Hi. >> >> I want to install Matplotlib from source code on CentOS. >> I've been using Matplotlib for a year. >> But this is the first time for me to install CentOS by myself. >> >> I installed CentOS 6.2 in basic install option. >> Next, I installed NumPy and Matplotlib. >> .matplotlibrc isn't set. >> >> It looks successfully installed, but when I type show() command, >> nothing appears. >> I can export PNG image by using savefig() command, so maybe >> I'm using invalid backend. >> >> How can I display plots with show() command? >> >> >> Magician |
From: Martin M. <mmo...@fo...> - 2012-03-27 09:07:48
|
Hi Michael, I was playing with python directly, so: $ python Python 2.7.2 (default, Mar 10 2012, 02:39:52) [GCC 4.5.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from matplotlib import font_manager >>> font_manager.path '/home/mmokrejs/.fonts' >>> font_manager.rcParams {'axes.formatter.use_locale': False, 'figure.subplot.right': 0.9, 'mathtext.cal': 'cursive', 'font.fantasy': ['Comic Sans MS', 'Chicago', 'Charcoal', 'ImpactWestern', 'fantasy'], 'xtick.minor.pad': 4, 'tk.pythoninspect': False, 'image.aspect': 'equal', 'font.cursive': ['Apple Chancery', 'Textile', 'Zapf Chancery', 'Sand', 'cursive'], 'figure.subplot.hspace': 0.2, 'keymap.fullscreen': 'f', 'examples.directory': '/usr/share/doc/matplotlib-1.1.0/examples', 'xtick.direction': 'in', 'axes.facecolor': 'w', 'mathtext.fontset': 'cm', 'ytick.direction': 'in', 'keymap.pan': 'p', 'path.snap': True, 'axes.axisbelow': False, 'lines.markersize': 6, 'figure.dpi': 80, 'text.usetex': False, 'image.origin': 'upper', 'patch.edgecolor': 'k', 'legend.labelspacing': 0.5, 'ps.useafm': False, 'mathtext.bf': 'serif:bold', 'lines.solid_joinstyle': 'round', 'font.monospace': ['Bitstream Vera Sans Mono', 'DejaVu Sans Mono', 'Andale Mono', 'Nimbus Mono L', 'Courier New', 'Courier', 'Fixed', 'Terminal', 'monospace '], 'xtick.minor.size': 2, 'axes.formatter.limits': [-7, 7], 'figure.subplot.wspace': 0.2, 'savefig.edgecolor': 'w', 'image.cmap': 'jet', 'lines.marker': 'None', 'tk.window_focus': False, 'backend.qt4': 'PyQt4', 'font.serif': ['Bitstream Vera Serif', 'DejaVu Serif', 'New Century Schoolbook', 'Century Schoolbook L', 'Utopia', 'ITC Bookman', 'Bookman', 'Nimbus Roman No9 L', 'Times New Roman', 'Times', 'Palatino', 'Charter', 'serif'], 'savefig.facecolor': 'w', 'ytick.minor.size': 2, 'font.stretch': 'normal', 'text.dvipnghack': None, 'ytick.color': 'k', 'svg.fonttype': 'path', 'lines.linestyle': '-', 'xtick.color': 'k', 'xtick.major.pad': 4, 'patch.facecolor': 'b', 'figure.figsize': [8.0, 6.0], 'axes.linewidth': 1.0, 'keymap.zoom': 'o', 'legend.handletextpad': 0.8, 'mathtext.fallback_to_cm': True, 'lines.linewidth': 1.0, 'savefig.dpi': 100, 'verbose.fileo': 'sys.stdout', 'svg.image_noscale': False, 'docstring.hardcopy': False, 'font.size': 12, 'ps.fonttype': 3, 'path.simplify': True, 'key map.all_axes': 'a', 'polaraxes.grid': True, 'text.hinting': True, 'pdf.compression': 6, 'grid.linewidth': 0.5, 'legend.frameon': True, 'figure.autolayout': False, 'figure.facecolor': '0.75', 'ps.usedistiller': False, 'legend.isaxes': True, 'figure.edgecolor': 'w', 'mathtext.tt': 'monospace', 'contour.negative_linestyle': 'dashed', 'image.interpolation': 'bilinear', 'lines.markeredgewidth': 0.5, 'keymap.home': ['h', 'r', 'home'], 'axes3d.grid': True, 'axes.edgecolor': 'k', 'legend.shadow': False, 'axes.titlesize': 'large', 'backend': 'GTKAgg', 'xtick.major.size': 4, 'keymap.xscale': ['k', 'L'], 'legend.fontsize': 'large', 'lines.solid_capstyle': 'projecting', 'mathtext.it': 'serif:italic', 'keymap.save': 's', 'font.variant': 'normal', 'toolbar': 'toolbar2', 'xtick.labelsize': 'medium', 'axes.unicode_minus': True, 'ps.distiller.res': 6000, 'axes.labelweight': 'normal', 'pdf.fonttype': 3, 'patch.linewidth': 1.0, 'pdf.inheritcolor': False, 'axes.color_cycle': ['b', 'g', 'r', 'c', 'm', 'y' , 'k'], 'lines.dash_capstyle': 'butt', 'lines.color': 'b', 'figure.subplot.top': 0.9, 'pdf.use14corefonts': False, 'legend.markerscale': 1.0, 'patch.antialiased': True, 'font.style': 'normal', 'keymap.forward': ['right', 'v'], 'backend_fallback': True, 'legend.fancybox': False, 'grid.linestyle': ':', 'savefig.extension': 'auto', 'text.color': 'k', 'mathtext.rm': 'serif', 'legend.loc': 'upper right', 'interactive': False, 'cairo.format': 'png', 'savefig.orientation': 'portrait', 'svg.image_inline': True, 'ytick.major.size': 4, 'axes.grid': False, 'plugins.directory': '.matplotlib_plugins', 'grid.color': 'k', 'timezone': 'UTC', 'ytick.major.pad': 4, 'legend.borderpad': 0.4, 'examples.download': False, 'lines.dash_joinstyle': 'round', 'datapath': '/usr/share/matplotlib/mpl-data', 'lines.antialiased': True, 'text.latex.unicode': False, 'legend.handleheight': 0.7, 'image.lut': 256, 'figure.subplot.bottom': 0.1, 'text.latex.preamble': [''], 'legend.numpoints': 2, 'legend.handlelength': 2.0, 'keymap.grid': 'g', 'font.sans-serif': ['Bitstream Vera Sans', 'DejaVu Sans', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', 'sans-serif'], 'axes.labelcolor': 'k', 'font.family': 'sans-serif', 'axes.labelsize': 'medium', 'ytick.minor.pad': 4, 'legend.borderaxespad': 0.5, 'mathtext.sf': 'sans\\-serif', 'axes.hold': True, 'verbose.level': 'silent', 'mathtext.default': 'it', 'figure.subplot.left': 0.125, 'legend.columnspacing': 2.0, 'text.latex.preview': False, 'font.weight': 'normal', 'keymap.yscale': 'l', 'image.resample': False, 'agg.path.chunksize': 0, 'path.simplify_threshold': 0.1111111111111111, 'ytick.labelsize': 'medium', 'ps.papersize': 'letter', 'svg.embed_char_paths': True, 'keymap.back': ['left', 'c', 'backspace']} >>> font_manager.findfont('cmb10') /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1216: UserWarning: findfont: Font family ['cmb10'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) '/usr/share/fonts/mathematica-fonts/Vera.ttf' >>> font_manager.findfont('Utopia') /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1216: UserWarning: findfont: Font family ['Utopia'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) '/usr/share/fonts/mathematica-fonts/Vera.ttf' >>> font_manager.findfont('monospace') '/usr/share/fonts/mathematica-fonts/VeraMono.ttf' >>> font_manager.findfont('sans-serif') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 1327, in findfont font = fontManager.findfont(prop, **kw) File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 1172, in findfont prop = FontProperties(prop) File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 673, in __init__ self.set_fontconfig_pattern(family) File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 893, in set_fontconfig_pattern for key, val in self._parse_fontconfig_pattern(pattern).items(): File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 685, in _parse_fontconfig_pattern return parse_fontconfig_pattern(pattern) File "/usr/lib64/python2.7/site-packages/matplotlib/fontconfig_pattern.py", line 127, in parse raise ValueError("Could not parse font string: '%s'\n%s" % (pattern, e)) ValueError: Could not parse font string: 'sans-serif' Expected end of text (at char 4), (line:1, col:5) >>> font_manager.findfont('sans\\-serif') '/usr/share/fonts/mathematica-fonts/Vera.ttf' >>> [x for x in font_manager.rcParams.keys() if x.startswith('font')] ['font.cursive', 'font.family', 'font.fantasy', 'font.monospace', 'font.sans-serif', 'font.serif', 'font.size', 'font.stretch', 'font.style', 'font.variant', 'font.weight'] >>> [x for x in font_manager.rcParams.values() if x.startswith('cm')] /usr/lib64/python2.7/site-packages/matplotlib/__init__.py:658: UserWarning: svg.embed_char_paths is deprecated and replaced with svg.fonttype; please use the latter. warnings.warn(self.msg_depr % (key, alt)) Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'int' object has no attribute 'startswith' >>> [x for x in font_manager.rcParams.values() if str(x).startswith('cm')] ['cm'] >>> [x for x in font_manager.rcParams.items() if x[1]=='cm'] [('mathtext.fontset', 'cm')] >>> [x for x in font_manager.rcParams.items() if x[1]=='10'] [] >>> [x for x in font_manager.rcParams.items() if x[1]=='bold'] [] >>> font_manager.findfont('cmb10') '/usr/share/fonts/mathematica-fonts/Vera.ttf' >>> font_manager.findfont('cmtt10') /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1216: UserWarning: findfont: Font family ['cmtt10'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) '/usr/share/fonts/mathematica-fonts/Vera.ttf' >>> font_manager.findfont('cmss10') /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1216: UserWarning: findfont: Font family ['cmss10'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) '/usr/share/fonts/mathematica-fonts/Vera.ttf' >>> Michael Droettboom wrote: > On 03/26/2012 04:36 PM, Martin Mokrejs wrote: >> Hi, >> I wondered why the matplotlib.font_manager.rcParams contains sometimes >> escaped minus signs in font names: >>>>> font_manager.rcParams['mathtext.sf'] >> 'sans\\-serif' >>>>> font_manager.findfont('sans-serif') >> Traceback (most recent call last): >> File "<stdin>", line 1, in<module> >> File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 1327, in findfont >> font = fontManager.findfont(prop, **kw) >> File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 1172, in findfont >> prop = FontProperties(prop) >> File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 673, in __init__ >> self.set_fontconfig_pattern(family) >> File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 893, in set_fontconfig_pattern >> for key, val in self._parse_fontconfig_pattern(pattern).items(): >> File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 685, in _parse_fontconfig_pattern >> return parse_fontconfig_pattern(pattern) >> File "/usr/lib64/python2.7/site-packages/matplotlib/fontconfig_pattern.py", line 127, in parse >> raise ValueError("Could not parse font string: '%s'\n%s" % (pattern, e)) >> ValueError: Could not parse font string: 'sans-serif' >> Expected end of text (at char 4), (line:1, col:5) >>>>> font_manager.findfont('sans\\-serif') >> '/usr/share/fonts/mathematica-fonts/Vera.ttf' >> >> And there is nothing to read in the help string for this function, definitely >> a place where the escaping should be explained. >> >>>>> help(font_manager.findfont) >>>>> >> Anyway, I think the requirement for the escaping should be removed, it should be >> escaped internally in the routine. So why is it so? For historic reasons? ;-) > > I've never seen this happen before. Are you setting "mathtext.sf" in a > matplotlibrc file or in Python code? Can you provide either so I can > see if I can reproduce the problem here? See above. In python. I just wondered whether it was typo or escaping. Still think it should be hidden to the user. >> Isn't the escaping a cause for the seemingly missing fonts, like reported here? >> http://www.mail-archive.com/mat...@li.../msg22860.html > > No -- that appears to be caused by either using the wrong font name or > having an outdated font cache. > >> >> >> I am also getting: >> >> /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1216: UserWarning: findfont: Font family ['cmb10'] not found. Falling back to Bitstream Vera Sans >> (prop.get_family(), self.defaultFamily[fontext])) >> /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1216: UserWarning: findfont: Font family ['cmtt10'] not found. Falling back to Bitstream Vera Sans >> (prop.get_family(), self.defaultFamily[fontext])) >> /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1216: UserWarning: findfont: Font family ['cmss10'] not found. Falling back to Bitstream Vera Sans >> (prop.get_family(), self.defaultFamily[fontext])) >> >> The font to be used is assembled from several fields in the rcParams. I guess from: >> >>>>> [x for x in font_manager.rcParams.keys() if x.startswith('font')] >> ['font.cursive', 'font.family', 'font.fantasy', 'font.monospace', 'font.sans-serif', 'font.serif', 'font.size', 'font.stretch', 'font.style', 'font.variant', 'font.weight'] >>>>> [x for x in font_manager.rcParams.values() if x.startswith('cm')] >> /usr/lib64/python2.7/site-packages/matplotlib/__init__.py:658: UserWarning: svg.embed_char_paths is deprecated and replaced with svg.fonttype; please use the latter. >> warnings.warn(self.msg_depr % (key, alt)) >> Traceback (most recent call last): >> File "<stdin>", line 1, in<module> >> AttributeError: 'int' object has no attribute 'startswith' >>>>> [x for x in font_manager.rcParams.items() if x[1]=='cm'] >> [('mathtext.fontset', 'cm')] >> What else is used to give out the 'cmb10', 'cmtt10' and 'cmss10'? > > These are hardcoded in the mathtext engine and used when > `mathtext.fontset` is set to `cm`. So my case (defaults). > > Have you tried deleting your font cache? (~/.matplotlib/fontList.cache) Ah, thanks for the full PATH, I couldn't find it. ;-) Yes, removing the file helped me as well to get rid of the UserWarning message. Martin |
From: Alexis P. <ale...@fr...> - 2012-03-27 08:06:07
|
I had the same problem on Debian. Editing the matplotlibrc (should be installed somewhere in your systeme) and changing the "backend" variable to Qt4Agg did the trick. On Tue, Mar 27, 2012 at 12:14 AM, Magician <f_m...@ma...> wrote: > Hi. > > I want to install Matplotlib from source code on CentOS. > I've been using Matplotlib for a year. > But this is the first time for me to install CentOS by myself. > > I installed CentOS 6.2 in basic install option. > Next, I installed NumPy and Matplotlib. > .matplotlibrc isn't set. > > It looks successfully installed, but when I type show() command, > nothing appears. > I can export PNG image by using savefig() command, so maybe > I'm using invalid backend. > > How can I display plots with show() command? > > > Magician > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Francesco M. <fra...@go...> - 2012-03-27 07:38:43
|
Il 27 marzo 2012 05:08, Dorm Eight <dor...@ya...> ha scritto: > hi, everybody! > > when I run my script, why there is no figure show up? I downloaded the demos > from matplotlib gallery and it didn't work either. >>>> >>>> x=np.arange(100) >>>> y=x**2+3*x-1 >>>> pl.plot(x,y) > [<matplotlib.lines.Line2D object at 0x2581050>] >>>> pl.show() >>>> > there is no error, no figure pop-up! > > Thank you for any answer! > Hi Dorm If you can send more info about the operating system and matplotlib version, it's easier to help you (for the latter do import matplotlib print matplotlib.__version__ ) Cheers, Francesco > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Dorm E. <dor...@ya...> - 2012-03-27 03:08:26
|
hi, everybody! when I run my script, why there is no figure show up? I downloaded the demos from matplotlib gallery and it didn't work either. >>> >>> x=np.arange(100) >>> y=x**2+3*x-1 >>> pl.plot(x,y) [<matplotlib.lines.Line2D object at 0x2581050>] >>> pl.show() >>> there is no error, no figure pop-up! Thank you for any answer! |
From: Jae-Joon L. <lee...@gm...> - 2012-03-27 01:38:49
|
On Wed, Feb 22, 2012 at 12:10 AM, Yannick Copin <yan...@la...> wrote: > after iterating with Michael A. Rawlins over my previous attempt to code a > Taylor diagram (see [1]), here's a new version of my code, along with an > example plot. Maybe it could make its way into the gallery as an example of > Floating Axes and Grid Finder (even though I'm not sure the code is > particularly exemplary, comments are welcome). Good to know that someone is using axisartist toolkit. Just a quick comment. def add_grid(self, *args, **kwargs): """Add a grid.""" self.ax.grid(*args, **kwargs) Maybe you wanted "self._ax.grid"? Regards, -JJ |
From: Mike K. <mc...@gm...> - 2012-03-27 01:31:53
|
On 3/26/12 12:49 PM, Christopher Graves wrote: > On Sun, Mar 11, 2012 at 2:32 PM, Christopher Graves > <chr...@gm... <mailto:chr...@gm...>> wrote: > Try this: > > from pylab import * > from matplotlib.ticker import AutoMinorLocator > > clf() > ax=subplot(111) > ax.autoscale(tight=True) > plot([1,2,4],[1,2,3]) > ax.xaxis.set_minor_locator(__AutoMinorLocator(2)) > ax.yaxis.set_minor_locator(__AutoMinorLocator(2)) > draw() > > M > > PS: I believe this is a fairly new feature... > > > Thanks! Great news that AutoMinorLocator has been added and > accomplishes this. Regarding the P.S. I can confirm that the feature > was not in matplotlib 1.0.1 - I had to update to 1.1.0 to use it. > > Best /Chris > > > > Hi Mike, > > A follow-up question... When using that, if one then tries to manually > use the zoom-box tool available with a matplotlib plot, if one draws too > small of a box (less than 2 major ticks in x or y dimension, based on > the following error message), it gives the following error and further > operations on the plot do not work. > > ValueError: Need at least two major ticks to find minor tick locations > ( File "/usr/lib/pymodules/python2.7/matplotlib/ticker.py", line 1528, > in __call__ ) > > Any way to avoid this for now? (And ultimately, should this be made into > a bug fix request?) Ok, I seem to remember seeing this error before, but I can't trip it now (with either 1.1.1rc or today's git checkout of 1.2.x). Do you have a short script that can reproduce this? For me, the zoom-box tool seems to be [correctly] setting the majortick locations as I zoom in, thus preventing this exception. I should note that I'm using the GTKAgg frontend. This may be the issue. A long time ago I was using the MacOSX frontend, and maybe this was when I was seeing it... Aside from that, this would be a bug. M |
From: Jae-Joon L. <lee...@gm...> - 2012-03-27 01:21:41
|
Just to clarify, both arrowstyle='simple' and arrowstyle='-|>' draw arrows as patches. In your first example with arrowstyle='simple', the arrow is drawn as filled patch without edges, i.e., linestyle is not effective. arrowstyle="-|>" also uses a patch but no "fill", only "stroke". Regards, -JJ On Tue, Mar 13, 2012 at 3:28 AM, Tony Yu <ts...@gm...> wrote: > Nevermind: I though arrowstyle='simple' and arrowstyle='-|>' were the same > thing, but apparently not (I guess one draws the line as a patch, and the > other as a line). So the following works as expected: |