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
|
2
(13) |
3
(5) |
4
(5) |
5
(21) |
6
(10) |
7
(9) |
8
(4) |
9
(11) |
10
(9) |
11
(11) |
12
(25) |
13
(5) |
14
(2) |
15
(5) |
16
(8) |
17
(16) |
18
(11) |
19
(15) |
20
(5) |
21
(8) |
22
(4) |
23
(24) |
24
(9) |
25
(14) |
26
(5) |
27
(28) |
28
(2) |
29
(13) |
30
(14) |
31
(11) |
|
|
|
|
From: David P. <dpe...@wi...> - 2012-01-06 22:57:35
|
When I try to turn on the grid for just one axis, seemingly in perfect accordance with the documentation at http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.grid it seems like there is a problem. My commands are pasted below. Am I doing this wrong? I am doing the best I can to follow the documentation exactly. Thanks for any help! import matplotlib matplotlib.use('MacOSX') import matplotlib.pyplot as plt fig=plt.figure() ax=fig.add_subplot(111) ax.plot([1,2,3]) ax.set_xlabel('Hi there') ax.grid(True, axis='x') bombayduck:~$ python Python 2.6.5 (r265:79359, Mar 24 2010, 01:32:55) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib >>> matplotlib.use('MacOSX') >>> import matplotlib.pyplot as plt >>> fig=plt.figure() >>> ax=fig.add_subplot(111) >>> ax.plot([1,2,3]) [<matplotlib.lines.Line2D object at 0x1a27e30>] >>> ax.set_xlabel('Hi there') <matplotlib.text.Text object at 0x1a58030> >>> ax.grid(True, axis='x') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/axes.py", line 1823, in grid self.xaxis.grid(b, **kwargs) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/axis.py", line 965, in grid if len(kwargs): artist.setp(tick.gridline,**kwargs) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/artist.py", line 1169, in setp func = getattr(o,funcName) AttributeError: 'Line2D' object has no attribute 'set_axis' -dave---------------------------------------------------------------------- A neuroscientist is at the video arcade, when someone makes him a $1000 bet on Pac-Man. He smiles, gets out his screwdriver and takes apart the Pac-Man game. Everyone says "What are you doing?" The neuroscientist says "Well, since we all know that Pac-Man is based on electric signals traveling through these circuits, obviously I can understand it better than the other guy by going straight to the source!" |
From: Michael D. <md...@st...> - 2012-01-06 19:40:36
|
I've filed a bug for this here: https://github.com/matplotlib/matplotlib/issues/662 Mike On 01/06/2012 11:55 AM, David Hoese wrote: > Hi Ken, > > You're getting that error because you probably don't have Qt4 > installed on your Mac (I do). I'm not sure what backends come with > matplotlib and will work for you (maybe someone here knows). You can > use any of the following: > GTK GTKAgg GTKCairo CocoaAgg FltkAgg > MacOSX QtAgg Qt4Agg TkAgg WX WXAgg Agg Cairo GDK PS PDF SVG Template > Like Qt4, some of those may need to be installed. I also have Gtk > installed (never used it before) and "GTKAgg" works for me, but not > "GTK". It's also important to know that not all of those backends are > interactive (they don't all show a window) and the figure must be > saved to a file. > > Also make sure that the 2 lines I provided need to be BEFORE any other > matplotlib/pyplot imports. Hope you find something that works for > you, at least until the macosx bug is fixed. I'm not an expert, sorry. > > -Dave > > On 1/6/12 10:35 AM, Mingkui Li wrote: >> Hi, Dave, >> >> I tried the two lines of code you posted, but when I ran the example >> I mentioned above I got such error: >> >> ImportError: No module named sip >> >> Seems I can't import any other libs from matplotlib after >> "matplotlib.use("Qt4Agg")" >> >> I'm kind of a newbie, sorry. >> >> Ken >> >> >> On Sat, Jan 7, 2012 at 12:22 AM, David Hoese <dh...@gm... >> <mailto:dh...@gm...>> wrote: >> >> I experienced the same problem on the macosx backend, switched to >> Qt4Agg >> and no problems. >> >> import matplotlib >> matplotlib.use("Qt4Agg") >> >> -Dave >> >> On 1/6/12 10:08 AM, md...@st... <mailto:md...@st...> wrote: >> > I suspect this bug is specific to the macosx backend. Can you >> switch to >> > another backend and confirm it doesn't happen there? (I can't >> reproduce >> > it on Linux). >> > >> > Mike >> >> >> ------------------------------------------------------------------------------ >> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a >> complex >> infrastructure or vast IT resources to deliver seamless, secure >> access to >> virtual desktops. With this all-in-one solution, easily deploy >> virtual >> desktops for less than the cost of PCs and save 60% on VDI >> infrastructure >> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> <mailto:Mat...@li...> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> >> >> -- >> Mingkui Li >> > > > > ------------------------------------------------------------------------------ > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex > infrastructure or vast IT resources to deliver seamless, secure access to > virtual desktops. With this all-in-one solution, easily deploy virtual > desktops for less than the cost of PCs and save 60% on VDI infrastructure > costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Benjamin R. <ben...@ou...> - 2012-01-06 17:40:11
|
On Thu, Jan 5, 2012 at 3:18 PM, Ryan May <rm...@gm...> wrote: > On Thu, Jan 5, 2012 at 2:59 PM, Daniel Hyams <dh...@gm...> wrote: > > Right, __slots__ is definitely not a good idea to use except in very > > specific situations. I would strongly recommend against its usage here. > > > > http://groups.google.com/group/comp.lang.python/msg/0f2e859b9c002b28 > > I see that now. I had seen __slots__ used in a namedtuple example (in > the Python docs) and assumed it was a good idea. The same idea could > be achieved by using an internal _fields list and overriding > __getattr__ if the fixed list of attributes was deemed a useful > feature. > > Ryan > > > > > > > > > On Thu, Jan 5, 2012 at 3:50 PM, Eric Firing <ef...@ha...> wrote: > >> > >> On 01/05/2012 07:34 AM, Ryan May wrote: > >> > On Thu, Jan 5, 2012 at 10:58 AM, Benjamin Root<ben...@ou...> > wrote: > >> >> > >> >> > >> >> On Thu, Jan 5, 2012 at 10:40 AM, Benjamin Root<ben...@ou...> > wrote: > >> >>> > >> >>> > >> >>>> At the very least, it would help in compartmentallizing all the > >> >>>> possible > >> >>>> drawing attributes that are common across all artists. Currently, > I > >> >>>> am > >> >>>> envisioning using a defaultdict object (which was introduced in > >> >>>> python 2.5) > >> >>>> or subclassing from it. This might help in keeping compatibility > >> >>>> with > >> >>>> existing code. Subclassing would allow for modifying __get__ and > >> >>>> __set__ to > >> >>>> treat some elements like 'c' and 'color', 'lw' and 'linewidth' and > so > >> >>>> on as > >> >>>> the same. > >> >> > >> >> > >> >> Grrrr, in defaultdict(), the default_factory is called without > >> >> arguments, so > >> >> a factory can't be made to produce a default value for a given key, > >> >> unless I > >> >> resort to more hackary... > >> > > >> > Might be better to explicitly use properties for this rather than > >> > overriding dict: > >> > > >> > class Style(object): > >> > __slots__ = ('_lw') > >> > > >> > def __init__(self, lw=None): > >> > self.lw = lw > >> > > >> > def _set_linewidth(self, lw): > >> > self._lw = lw > >> > > >> > def _get_linewidth(self): > >> > return self._lw > >> > > >> > lw = property(_get_linewidth, _set_linewidth) > >> > linewidth = property(_get_linewidth, _set_linewidth) > >> > > >> > Declaring slots allows you to keep the available attributes to those > >> > explicity listed. This way, you can't set a random (misspelled?) > >> > attribute and wonder for hours why style.edgcolor = 'blue' doesn't > >> > work. > >> > >> This seems useful, and may be OK for this application; but a little > >> googling indicates that it is not really what __slots__ was intended > >> for, it is at best controversial, and it should be used very sparingly > >> and carefully. > >> > >> Eric > >> > >> > > >> > Ryan > >> > > >> > >> > Some thoughts I have had while trying to tackle this problem: 1) Major difficulty is that different plotting functions currently have different default values for various parameters. For example, spy() uses a square marker by default. Furthermore, there are differences in how plotting functions determine default-ness. 1.1 - call signature uses **kwarg Therefore, if something like 'c' is in kwarg, then it gets popped and used. If not, then sometimes a None is used which then means some sort of default elsewhere, or a value from a cycle somewhere is extracted. 1.2 - call signature uses prop=None idiom Therefore, it is impossible to know if the user explicitly wanted the default property value or did not pass anything in. 1.3 - call signature explicitly sets a default (i.e., fmt="b-") in call signature This prevents being able to extract a default value from a rcparam unless the user explicitly passes None. Therefore, it is difficult to have common style across all plots with a common/similar function calls. Sometimes, you explicitly pass None, sometimes you don't. 2) Plot property information being mixed in with the core process of creating plot elements. This makes the process of making sure that all desired properties are applied in a uniform and consistent manner. If each function could break its job into two basic parts: create plot elements for each dataset, apply style properties for each dataset plotted. In other words, for creating a bar chart, the process should first create Rectangle patches that places them at the correct locations and sized correctly (information that is based entirely on the dataset), but they would have no color, linewidth, hatch, etc. information yet. Then, styles are applied to each before returning them to the user. 3) rcparam naming. I wanted to name things like "cycle.color" and "cycle.marker", however, we currently have "axes.color_cycle". While I am fine with continuing this naming convention, do we want to codify a set of naming rules for future additions, or can they continue to be named anyway we wish? No matter how I look at this problem, we are looking at significant behavioral changes and output results. This will likely have to be an ongoing project and should probably be slated for a major version number change (i.e., v2.0.0). One particular feature I am tinkering on is a subclassed dict() that performs automatic translations of various property names (i.e., style['c'] and style['color'] are both the same element) and also performs fallbacks (i.e., if style['ec'] hasn't been set yet, then retrieve style['c']). This object might then be the basis of holding the core appearance information that is applied to the artist elements. Using it, we can codify various behaviors with respect to default values, rcparams and any other idiomatic things we have been doing. For my own purposes, I am essentially continuing the current pattern for a few more properties and trying to apply them to a few more functions. However, because it breaks many things while continuing bad coding styles, I doubt it should be marged into the official repos. Cheers! Ben Root |
From: David H. <dh...@gm...> - 2012-01-06 16:55:18
|
Hi Ken, You're getting that error because you probably don't have Qt4 installed on your Mac (I do). I'm not sure what backends come with matplotlib and will work for you (maybe someone here knows). You can use any of the following: GTK GTKAgg GTKCairo CocoaAgg FltkAgg MacOSX QtAgg Qt4Agg TkAgg WX WXAgg Agg Cairo GDK PS PDF SVG Template Like Qt4, some of those may need to be installed. I also have Gtk installed (never used it before) and "GTKAgg" works for me, but not "GTK". It's also important to know that not all of those backends are interactive (they don't all show a window) and the figure must be saved to a file. Also make sure that the 2 lines I provided need to be BEFORE any other matplotlib/pyplot imports. Hope you find something that works for you, at least until the macosx bug is fixed. I'm not an expert, sorry. -Dave On 1/6/12 10:35 AM, Mingkui Li wrote: > Hi, Dave, > > I tried the two lines of code you posted, but when I ran the example I > mentioned above I got such error: > > ImportError: No module named sip > > Seems I can't import any other libs from matplotlib after > "matplotlib.use("Qt4Agg")" > > I'm kind of a newbie, sorry. > > Ken > > > On Sat, Jan 7, 2012 at 12:22 AM, David Hoese <dh...@gm... > <mailto:dh...@gm...>> wrote: > > I experienced the same problem on the macosx backend, switched to > Qt4Agg > and no problems. > > import matplotlib > matplotlib.use("Qt4Agg") > > -Dave > > On 1/6/12 10:08 AM, md...@st... <mailto:md...@st...> wrote: > > I suspect this bug is specific to the macosx backend. Can you > switch to > > another backend and confirm it doesn't happen there? (I can't > reproduce > > it on Linux). > > > > Mike > > > ------------------------------------------------------------------------------ > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a > complex > infrastructure or vast IT resources to deliver seamless, secure > access to > virtual desktops. With this all-in-one solution, easily deploy virtual > desktops for less than the cost of PCs and save 60% on VDI > infrastructure > costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > -- > Mingkui Li > |
From: Mingkui Li <ken...@gm...> - 2012-01-06 16:35:10
|
Hi, Dave, I tried the two lines of code you posted, but when I ran the example I mentioned above I got such error: ImportError: No module named sip Seems I can't import any other libs from matplotlib after "matplotlib.use("Qt4Agg")" I'm kind of a newbie, sorry. Ken On Sat, Jan 7, 2012 at 12:22 AM, David Hoese <dh...@gm...> wrote: > I experienced the same problem on the macosx backend, switched to Qt4Agg > and no problems. > > import matplotlib > matplotlib.use("Qt4Agg") > > -Dave > > On 1/6/12 10:08 AM, md...@st... wrote: > > I suspect this bug is specific to the macosx backend. Can you switch to > > another backend and confirm it doesn't happen there? (I can't reproduce > > it on Linux). > > > > Mike > > > > ------------------------------------------------------------------------------ > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex > infrastructure or vast IT resources to deliver seamless, secure access to > virtual desktops. With this all-in-one solution, easily deploy virtual > desktops for less than the cost of PCs and save 60% on VDI infrastructure > costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Mingkui Li |
From: Mingkui Li <ken...@gm...> - 2012-01-06 16:24:33
|
Thank you, Mike. I'll try the Linux version to find out. On Sat, Jan 7, 2012 at 12:06 AM, Michael Droettboom <md...@st...> wrote: > I suspect this bug is specific to the macosx backend. Can you switch to > another backend and confirm it doesn't happen there? (I can't reproduce it > on Linux). > > Mike > > > On 01/06/2012 10:54 AM, Mingkui Li wrote: > > I just updated matplotlib to 1.1 and want try the new features Sankey > Diagrams > > and > Animation > > but when I try the api example code: sankey_demo_basics.py > > I got the error messages as below: > > ============================================================================== > Traceback (most recent call last): > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py", > line 55, in draw_wrapper > draw(artist, renderer, *args, **kwargs) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/figure.py", > line 884, in draw > func(*args) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py", > line 55, in draw_wrapper > draw(artist, renderer, *args, **kwargs) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/axes.py", > line 1983, in draw > a.draw(renderer) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py", > line 55, in draw_wrapper > draw(artist, renderer, *args, **kwargs) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/patches.py", > line 385, in draw > gc.set_linewidth(lw) > TypeError: a float is required > Traceback (most recent call last): > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py", > line 55, in draw_wrapper > draw(artist, renderer, *args, **kwargs) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/figure.py", > line 884, in draw > func(*args) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py", > line 55, in draw_wrapper > draw(artist, renderer, *args, **kwargs) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/axes.py", > line 1983, in draw > a.draw(renderer) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py", > line 55, in draw_wrapper > draw(artist, renderer, *args, **kwargs) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/patches.py", > line 385, in draw > gc.set_linewidth(lw) > TypeError: a float is required > > ================================================================================== > > Then I looked into the > file /Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/patches.py > at the line 384 the code is: gc.set_linewidth(lw) > I added "lw = np.float(lw)" before "gc.set_linewidth(lw)", then the > example code runs successfully. > > Any help? > > Thanks for any reply. > > -- > Mingkui Li > > > > ------------------------------------------------------------------------------ > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex > infrastructure or vast IT resources to deliver seamless, secure access to > virtual desktops. With this all-in-one solution, easily deploy virtual > desktops for less than the cost of PCs and save 60% on VDI infrastructure > costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox > > > > _______________________________________________ > Matplotlib-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > ------------------------------------------------------------------------------ > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex > infrastructure or vast IT resources to deliver seamless, secure access to > virtual desktops. With this all-in-one solution, easily deploy virtual > desktops for less than the cost of PCs and save 60% on VDI infrastructure > costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Mingkui Li |
From: David H. <dh...@gm...> - 2012-01-06 16:22:56
|
I experienced the same problem on the macosx backend, switched to Qt4Agg and no problems. import matplotlib matplotlib.use("Qt4Agg") -Dave On 1/6/12 10:08 AM, md...@st... wrote: > I suspect this bug is specific to the macosx backend. Can you switch to > another backend and confirm it doesn't happen there? (I can't reproduce > it on Linux). > > Mike |
From: Michael D. <md...@st...> - 2012-01-06 16:08:14
|
I suspect this bug is specific to the macosx backend. Can you switch to another backend and confirm it doesn't happen there? (I can't reproduce it on Linux). Mike On 01/06/2012 10:54 AM, Mingkui Li wrote: > I just updated matplotlib to 1.1 and want try the new features > > > Sankey Diagrams > > > and > > > Animation > > > but when I try the api example code: sankey_demo_basics.py > > I got the error messages as below: > ============================================================================== > Traceback (most recent call last): > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py", > line 55, in draw_wrapper > draw(artist, renderer, *args, **kwargs) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/figure.py", > line 884, in draw > func(*args) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py", > line 55, in draw_wrapper > draw(artist, renderer, *args, **kwargs) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/axes.py", > line 1983, in draw > a.draw(renderer) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py", > line 55, in draw_wrapper > draw(artist, renderer, *args, **kwargs) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/patches.py", > line 385, in draw > gc.set_linewidth(lw) > TypeError: a float is required > Traceback (most recent call last): > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py", > line 55, in draw_wrapper > draw(artist, renderer, *args, **kwargs) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/figure.py", > line 884, in draw > func(*args) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py", > line 55, in draw_wrapper > draw(artist, renderer, *args, **kwargs) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/axes.py", > line 1983, in draw > a.draw(renderer) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py", > line 55, in draw_wrapper > draw(artist, renderer, *args, **kwargs) > File > "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/patches.py", > line 385, in draw > gc.set_linewidth(lw) > TypeError: a float is required > ================================================================================== > > Then I looked into the > file /Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/patches.py > at the line 384 the code is: gc.set_linewidth(lw) > I added "lw = np.float(lw)" before "gc.set_linewidth(lw)", then the > example code runs successfully. > > Any help? > > Thanks for any reply. > > -- > Mingkui Li > > > > ------------------------------------------------------------------------------ > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex > infrastructure or vast IT resources to deliver seamless, secure access to > virtual desktops. With this all-in-one solution, easily deploy virtual > desktops for less than the cost of PCs and save 60% on VDI infrastructure > costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Mingkui Li <ken...@gm...> - 2012-01-06 15:54:59
|
I just updated matplotlib to 1.1 and want try the new featuresSankey Diagrams and Animation but when I try the api example code: sankey_demo_basics.py I got the error messages as below: ============================================================================== Traceback (most recent call last): File "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/figure.py", line 884, in draw func(*args) File "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/axes.py", line 1983, in draw a.draw(renderer) File "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/patches.py", line 385, in draw gc.set_linewidth(lw) TypeError: a float is required Traceback (most recent call last): File "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/figure.py", line 884, in draw func(*args) File "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/axes.py", line 1983, in draw a.draw(renderer) File "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/patches.py", line 385, in draw gc.set_linewidth(lw) TypeError: a float is required ================================================================================== Then I looked into the file /Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/patches.py at the line 384 the code is: gc.set_linewidth(lw) I added "lw = np.float(lw)" before "gc.set_linewidth(lw)", then the example code runs successfully. Any help? Thanks for any reply. -- Mingkui Li |
From: Karthik K. <14....@gm...> - 2012-01-06 05:18:08
|
Hi, I'm trying to embed a Matplotlib graph along with the toolbar in my Tkinter application. The problem I'm facing is that when I maximize the application, the plot only fills the top half of the screen and the bottom half is taken up by the toolbar with a lot of whitespace. I based my code on the embedding_with_tk examples, and I've tried every layout combination with pack(), but I still can't get just the plot to take up all the space. This is the relevant code: f2 = Tkinter.Frame(n()) canvas = FigureCanvasTkAgg(f, master=f2) canvas.show() canvas.get_tk_widget().pack(side=Tkinter.TOP, fill=Tkinter.BOTH, expand=1) toolbar = NavigationToolbar2TkAgg(canvas, f2) toolbar.update() canvas._tkcanvas.pack(side=Tkinter.BOTTOM, fill=Tkinter.BOTH, expand=0) Any help would be welcome. Thanks, KK |