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
(11) |
|
2
(24) |
3
(24) |
4
(31) |
5
(30) |
6
(27) |
7
(25) |
8
(8) |
|
9
(2) |
10
(12) |
11
(16) |
12
(33) |
13
(18) |
14
(17) |
15
(3) |
|
16
(7) |
17
(8) |
18
(22) |
19
(20) |
20
(25) |
21
(10) |
22
(17) |
|
23
(18) |
24
(23) |
25
(15) |
26
(19) |
27
(6) |
28
(7) |
29
(6) |
|
30
(1) |
31
(12) |
|
|
|
|
|
|
From: John H. <jd...@gm...> - 2009-08-10 15:28:17
|
On Mon, Aug 10, 2009 at 10:23 AM, Jae-Joon Lee<lee...@gm...> wrote: > John, > > I changed the axes_grid examples to use get_sample_data and committed > them to the svn yesterday. > However, these examples won't work unless the user uses mpl from the > svn (I don't think get_sample_data is in 0.99 maint). > But, at some point during the last dev cycle, I think the gallery in > our web page started to show the examples from the svn. So, if we're > going to repeat it again (I mean pushing the docs from the svn), I > think I'd better revert those changes I made. And maybe modify them to > run standalone. I can keep building the website off the 0.99 branch until release 1.0, so this shouldn't be a problem. JDH |
|
From: Jae-Joon L. <lee...@gm...> - 2009-08-10 15:23:48
|
John, I changed the axes_grid examples to use get_sample_data and committed them to the svn yesterday. However, these examples won't work unless the user uses mpl from the svn (I don't think get_sample_data is in 0.99 maint). But, at some point during the last dev cycle, I think the gallery in our web page started to show the examples from the svn. So, if we're going to repeat it again (I mean pushing the docs from the svn), I think I'd better revert those changes I made. And maybe modify them to run standalone. Regards, -JJ On Mon, Aug 10, 2009 at 7:27 AM, John Hunter<jd...@gm...> wrote: > On Mon, Aug 10, 2009 at 5:05 AM, Gary Ruben<gr...@bi...> wrote: >> Many of the axes_grid examples in the thumbnail gallery don't work out >> of the box with the latest matplotlib 0.99 because they rely on >> demo_image and demo_axes_divider modules. Should these have been >> packaged with 0.99 or were they left out deliberately? > > We've addressed this already in svn HEAD, but the fixes won't be out > until mpl1.0. For now, just drop the attached file in the same > directory as your example code (you may also need to touch a > __init__.py in that dir. > > As developers, we run all of our code from the examples directory > (which has the data and files) but now that the website has actually > become useful, more and more people are running examples downloaded > from the server, and so they don't have the extra code and files that > some examples need. We have mostly resolved this problem in svn HEAD, > but will be a little while before it makes it into a production > release, so you may want to check out the examples from svn > > svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib/examples > mpl_examples > > JDH > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Gary R. <gr...@bi...> - 2009-08-10 12:07:54
|
Thanks John. John Hunter wrote: > On Mon, Aug 10, 2009 at 5:05 AM, Gary Ruben<gr...@bi...> wrote: >> Many of the axes_grid examples in the thumbnail gallery don't work out >> of the box with the latest matplotlib 0.99 because they rely on >> demo_image and demo_axes_divider modules. Should these have been >> packaged with 0.99 or were they left out deliberately? > > We've addressed this already in svn HEAD, but the fixes won't be out > until mpl1.0. For now, just drop the attached file in the same > directory as your example code (you may also need to touch a > __init__.py in that dir. <snip> |
|
From: Neil P. <mat...@ke...> - 2009-08-10 11:42:17
|
John Hunter wrote: > On Mon, Aug 10, 2009 at 5:05 AM, Gary Ruben<gr...@bi...> wrote: >> Many of the axes_grid examples in the thumbnail gallery don't work out >> of the box with the latest matplotlib 0.99 because they rely on >> demo_image and demo_axes_divider modules. Should these have been >> packaged with 0.99 or were they left out deliberately? > > We've addressed this already in svn HEAD, but the fixes won't be out > until mpl1.0. For now, just drop the attached file in the same > directory as your example code (you may also need to touch a > __init__.py in that dir. [...] What about some kind of 'requires(version)'? (assert? module function?) Maybe even with a latest version that it supported for code that is out of date? Then if an example (essentially a test?) is added in tandem with some new code, then the 'requires(version)' code can be updated. Similar checks could be made if examples are updated to support larger-scale changes (which are hopefully not as common!). This could also allow examples to be tagged with the required version, and even sorted according to 'added in this version'. I run debian lenny with its version of mpl, and I was very glad when I upgraded to it, in order not to have to regularly compile mpl if there was some new feature. However, if I could clearly see from examples/thumbnails which features required which version, then this would make things a little clearer, and balance a need to upgrade perhaps? Thoughts? -- Neil Pilgrim |
|
From: John H. <jd...@gm...> - 2009-08-10 11:29:29
|
On Sun, Aug 9, 2009 at 11:53 PM, per freem<per...@gm...> wrote: > is there a way to plot separated axes in matplotlib? i.e. plots where > the origin (0,0) has no meaning, either because the data on the x axes > is categorical (e.g. you are plotting a histograms for three > categories) or for other reasons. an example of what i mean is this > graph: > > http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=82 > > or this: http://msenux.redwoods.edu/math/R/graphics/hist1.gif > > any advice on how to do this would be greatly appreciated. thanks. with matplotlib 0.99: http://matplotlib.sourceforge.net/examples/pylab_examples/spine_placement_demo.html |
|
From: John H. <jd...@gm...> - 2009-08-10 11:27:20
|
On Mon, Aug 10, 2009 at 5:05 AM, Gary Ruben<gr...@bi...> wrote: > Many of the axes_grid examples in the thumbnail gallery don't work out > of the box with the latest matplotlib 0.99 because they rely on > demo_image and demo_axes_divider modules. Should these have been > packaged with 0.99 or were they left out deliberately? We've addressed this already in svn HEAD, but the fixes won't be out until mpl1.0. For now, just drop the attached file in the same directory as your example code (you may also need to touch a __init__.py in that dir. As developers, we run all of our code from the examples directory (which has the data and files) but now that the website has actually become useful, more and more people are running examples downloaded from the server, and so they don't have the extra code and files that some examples need. We have mostly resolved this problem in svn HEAD, but will be a little while before it makes it into a production release, so you may want to check out the examples from svn svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib/examples mpl_examples JDH |
|
From: Gary R. <gr...@bi...> - 2009-08-10 10:10:34
|
Many of the axes_grid examples in the thumbnail gallery don't work out of the box with the latest matplotlib 0.99 because they rely on demo_image and demo_axes_divider modules. Should these have been packaged with 0.99 or were they left out deliberately? Gary R. |
|
From: Gary R. <gr...@bi...> - 2009-08-10 09:58:39
|
Hi Per, The just-released mpl 0.99 contains Jae-Joon Lee's AxesGrid Toolkit <http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html> and Andrew Straw's support for axis spines <http://matplotlib.sourceforge.net/examples/pylab_examples/spine_placement_demo.html?highlight=spine> I think these address both your questions. The list of new features is here: <http://matplotlib.sourceforge.net/users/whats_new.html#new-in-matplotlib-0-99> Gary per freem wrote: > Hi all, > > i am wondering if there is a way or an interface in matplotlib to > design complex plot layouts. what i mean is something analogous to the > 'layout' function of R, where you can say what portion of space each > plot will take. i think this allows for more sophisticated layouts > than the usual square matrix layouts that the 'subplot' function > produces (unless i am missing some other usage of 'subplot'). |
|
From: per f. <per...@gm...> - 2009-08-10 04:53:31
|
hi all, is there a way to plot separated axes in matplotlib? i.e. plots where the origin (0,0) has no meaning, either because the data on the x axes is categorical (e.g. you are plotting a histograms for three categories) or for other reasons. an example of what i mean is this graph: http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=82 or this: http://msenux.redwoods.edu/math/R/graphics/hist1.gif any advice on how to do this would be greatly appreciated. thanks. |
|
From: per f. <per...@gm...> - 2009-08-10 04:40:20
|
Hi all, i am wondering if there is a way or an interface in matplotlib to design complex plot layouts. what i mean is something analogous to the 'layout' function of R, where you can say what portion of space each plot will take. i think this allows for more sophisticated layouts than the usual square matrix layouts that the 'subplot' function produces (unless i am missing some other usage of 'subplot'). for example, creating a central square plot with two plots that are narrower/rectangular on top of the square plot and to the side of it, as in the example shown here: http://www.statmethods.net/advgraphs/images/layout4.jpg The code for that in R can be found here http://www.statmethods.net/advgraphs/layout.html. is there a way to do this in matplotlib? ideally i'd like the top and right plots to just be ordinary plot objects, such that i can change their axes/labels in the same way that i change normal plots. thanks. |
|
From: G J. <gle...@gm...> - 2009-08-09 18:31:06
|
Hello, I am trying to make a figure with the attached code. The resulting figure is attached. I would like to make the pink boxes the same size as the blue boxes. I have read the documentation for axes.text and the bbox dict, but I cannot figure out how to specify the size of the box. When I try passing bbox=dict(width=30), I got an error saying the keyword argument width was specified twice. I assume this is because the text command specifies the width automatically. What is the prefered way to do this? The only solution I can think of so far is to draw the rectangle patches, and then add the text after without a bbox, but this seems cumbersome. Thank you, Glenn |
|
From: Michiel de H. <mjl...@ya...> - 2009-08-09 15:06:39
|
The error occurs in the first line of _macosx.m, which is #include <Cocoa/Cocoa.h> Can you compile anything (with the same compiler flags) that contains this line? --Michiel --- On Fri, 8/7/09, Gideon Simpson <si...@ma...> wrote: > From: Gideon Simpson <si...@ma...> > Subject: [Matplotlib-users] os x trouble > To: mat...@li... > Date: Friday, August 7, 2009, 12:27 PM > With 0.99.0, I'm getting the > following error when building from > source. I believe this is the same error I got in > earlier versions: > > gcc -fno-strict-aliasing -mno-fused-madd -DNDEBUG -g > -fwrapv -O3 -Wall > -Wstrict-prototypes -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API > -I/opt/lib/ > python2.5/site-packages/numpy/core/include > -I/sw/lib/freetype219/ > include -I/usr/local/include -I/usr/include -I/sw/include > -I. -I/opt/ > lib/python2.5/site-packages/numpy/core/include -Isrc > -Iagg24/include - > I. -I/sw/include/python2.5 -c src/_macosx.m -o > build/temp.macosx-10.5- > i386-2.5/src/_macosx.o > In file included from > /System/Library/Frameworks/Foundation.framework/ > Headers/NSAffineTransform.h:5, > > from /System/Library/Frameworks/Foundation.framework/ > > Headers/Foundation.h:13, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:12, > > from src/_macosx.m:1: > /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h: > > 122: error: expected ‘;’ before ‘__attribute__’ > In file included from > /System/Library/Frameworks/Foundation.framework/ > Headers/NSGeometry.h:7, > > from /System/Library/Frameworks/Foundation.framework/ > > Headers/NSAffineTransform.h:6, > > from /System/Library/Frameworks/Foundation.framework/ > > Headers/Foundation.h:13, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:12, > > from src/_macosx.m:1: > /System/Library/Frameworks/Foundation.framework/Headers/NSCoder.h:79: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSCoder.h:87: > > error: expected ‘;’ before ‘__attribute__’ > In file included from > /System/Library/Frameworks/Foundation.framework/ > Headers/Foundation.h:15, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:12, > > from src/_macosx.m:1: > /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:62: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:66: > > error: expected ‘;’ before ‘__attribute__’ > In file included from > /System/Library/Frameworks/Foundation.framework/ > Headers/NSAttributedString.h:5, > > from /System/Library/Frameworks/Foundation.framework/ > > Headers/Foundation.h:16, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:12, > > from src/_macosx.m:1: > /System/Library/Frameworks/Foundation.framework/Headers/NSString.h: > > 345: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSString.h: > > 346: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSString.h: > > 347: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSString.h: > > 348: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSString.h: > > 349: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSString.h: > > 350: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSString.h: > > 352: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSString.h: > > 353: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSString.h: > > 355: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSString.h: > > 356: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSString.h: > > 357: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSString.h: > > 358: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSString.h: > > 360: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSString.h: > > 361: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSString.h: > > 362: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSString.h: > > 363: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSString.h: > > 364: error: expected ‘;’ before ‘__attribute__’ > In file included from > /System/Library/Frameworks/Foundation.framework/ > Headers/NSAttributedString.h:6, > > from /System/Library/Frameworks/Foundation.framework/ > > Headers/Foundation.h:16, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:12, > > from src/_macosx.m:1: > /System/Library/Frameworks/Foundation.framework/Headers/NSDictionary.h: > > 45: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSDictionary.h: > > 50: error: expected ‘;’ before ‘__attribute__’ > In file included from > /System/Library/Frameworks/Foundation.framework/ > Headers/NSHashTable.h:5, > > from /System/Library/Frameworks/Foundation.framework/ > > Headers/Foundation.h:43, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:12, > > from src/_macosx.m:1: > /System/Library/Frameworks/Foundation.framework/Headers/ > NSPointerFunctions.h:59: error: stray ‘@’ in program > /System/Library/Frameworks/Foundation.framework/Headers/ > NSPointerFunctions.h:59: error: expected ‘=’, ‘,’, > ‘;’, ‘asm’ or > ‘__attribute__’ before ‘NSUInteger’ > /System/Library/Frameworks/Foundation.framework/Headers/ > NSPointerFunctions.h:60: error: stray ‘@’ in program > /System/Library/Frameworks/Foundation.framework/Headers/ > NSPointerFunctions.h:60: error: expected ‘=’, ‘,’, > ‘;’, ‘asm’ or > ‘__attribute__’ before ‘BOOL’ > /System/Library/Frameworks/Foundation.framework/Headers/ > NSPointerFunctions.h:61: error: stray ‘@’ in program > /System/Library/Frameworks/Foundation.framework/Headers/ > NSPointerFunctions.h:61: error: expected ‘=’, ‘,’, > ‘;’, ‘asm’ or > ‘__attribute__’ before ‘NSUInteger’ > /System/Library/Frameworks/Foundation.framework/Headers/ > NSPointerFunctions.h:62: error: stray ‘@’ in program > /System/Library/Frameworks/Foundation.framework/Headers/ > NSPointerFunctions.h:62: error: expected ‘=’, ‘,’, > ‘;’, ‘asm’ or > ‘__attribute__’ before ‘NSString’ > /System/Library/Frameworks/Foundation.framework/Headers/ > NSPointerFunctions.h:65: error: stray ‘@’ in program > /System/Library/Frameworks/Foundation.framework/Headers/ > NSPointerFunctions.h:65: error: expected ‘=’, ‘,’, > ‘;’, ‘asm’ or > ‘__attribute__’ before ‘void’ > /System/Library/Frameworks/Foundation.framework/Headers/ > NSPointerFunctions.h:66: error: stray ‘@’ in program > /System/Library/Frameworks/Foundation.framework/Headers/ > NSPointerFunctions.h:66: error: expected ‘=’, ‘,’, > ‘;’, ‘asm’ or > ‘__attribute__’ before ‘void’ > /System/Library/Frameworks/Foundation.framework/Headers/ > NSPointerFunctions.h:69: error: stray ‘@’ in program > /System/Library/Frameworks/Foundation.framework/Headers/ > NSPointerFunctions.h:69: error: expected ‘=’, ‘,’, > ‘;’, ‘asm’ or > ‘__attribute__’ before ‘BOOL’ > /System/Library/Frameworks/Foundation.framework/Headers/ > NSPointerFunctions.h:70: error: stray ‘@’ in program > /System/Library/Frameworks/Foundation.framework/Headers/ > NSPointerFunctions.h:70: error: expected ‘=’, ‘,’, > ‘;’, ‘asm’ or > ‘__attribute__’ before ‘BOOL’ > In file included from > /System/Library/Frameworks/Foundation.framework/ > Headers/NSKeyValueCoding.h:9, > > from /System/Library/Frameworks/Foundation.framework/ > > Headers/Foundation.h:49, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:12, > > from src/_macosx.m:1: > /System/Library/Frameworks/Foundation.framework/Headers/NSSet.h:45: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSSet.h:50: > > error: expected ‘;’ before ‘__attribute__’ > In file included from > /System/Library/Frameworks/Foundation.framework/ > Headers/Foundation.h:76, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:12, > > from src/_macosx.m:1: > /System/Library/Frameworks/Foundation.framework/Headers/NSRunLoop.h: > > 44: error: expected ‘;’ before ‘__attribute__’ > In file included from > /System/Library/Frameworks/Foundation.framework/ > Headers/NSURL.h:6, > > from /System/Library/Frameworks/Foundation.framework/ > > Headers/Foundation.h:88, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:12, > > from src/_macosx.m:1: > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 52: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 53: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 54: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 55: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 56: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 67: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 68: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 70: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 71: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 73: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 74: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 76: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 77: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 79: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 80: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 83: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 86: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 89: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 90: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 93: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 94: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 95: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 97: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 98: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 99: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 100: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 102: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 103: error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURLHandle.h: > > 104: error: expected ‘;’ before ‘__attribute__’ > In file included from > /System/Library/Frameworks/Foundation.framework/ > Headers/Foundation.h:88, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:12, > > from src/_macosx.m:1: > /System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:75: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:76: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:77: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:78: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:83: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:84: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:85: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:88: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:89: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:91: > > error: expected ‘;’ before ‘__attribute__’ > In file included from > /System/Library/Frameworks/AppKit.framework/ > Headers/AppKit.h:19, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:13, > > from src/_macosx.m:1: > /System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h: > > 68: error: expected specifier-qualifier-list before > ‘__weak’ > In file included from > /System/Library/Frameworks/AppKit.framework/ > Headers/AppKit.h:27, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:13, > > from src/_macosx.m:1: > /System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:215: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:216: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:217: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:218: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:219: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:220: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:221: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:222: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:223: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:224: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:227: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:228: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:229: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:230: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:231: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:232: > > error: expected ‘;’ before ‘__attribute__’ > In file included from > /System/Library/Frameworks/AppKit.framework/ > Headers/NSPanel.h:8, > > from /System/Library/Frameworks/AppKit.framework/ > Headers/NSFontPanel.h:8, > > from /System/Library/Frameworks/AppKit.framework/ > Headers/AppKit.h:30, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:13, > > from src/_macosx.m:1: > /System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:471: > > error: expected ‘;’ before ‘__attribute__’ > /System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:472: > > error: expected ‘;’ before ‘__attribute__’ > In file included from > /System/Library/Frameworks/AppKit.framework/ > Headers/AppKit.h:78, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:13, > > from src/_macosx.m:1: > /System/Library/Frameworks/AppKit.framework/Headers/NSPrintPanel.h:57: > > error: stray ‘@’ in program > /System/Library/Frameworks/AppKit.framework/Headers/NSPrintPanel.h:61: > > error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘-’ token > In file included from > /System/Library/Frameworks/AppKit.framework/ > Headers/AppKit.h:95, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:13, > > from src/_macosx.m:1: > /System/Library/Frameworks/AppKit.framework/Headers/NSTrackingArea.h: > > 44: error: expected specifier-qualifier-list before > ‘__weak’ > In file included from > /System/Library/Frameworks/AppKit.framework/ > Headers/NSTextView.h:16, > > from /System/Library/Frameworks/AppKit.framework/ > Headers/AppKit.h:112, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:13, > > from src/_macosx.m:1: > /System/Library/Frameworks/AppKit.framework/Headers/ > NSTextInputClient.h:17: error: stray ‘@’ in program > /System/Library/Frameworks/AppKit.framework/Headers/ > NSTextInputClient.h:20: error: expected ‘=’, ‘,’, > ‘;’, ‘asm’ or > ‘__attribute__’ before ‘-’ token > /System/Library/Frameworks/AppKit.framework/Headers/ > NSTextInputClient.h:62: error: stray ‘@’ in program > /System/Library/Frameworks/AppKit.framework/Headers/ > NSTextInputClient.h:65: error: expected ‘=’, ‘,’, > ‘;’, ‘asm’ or > ‘__attribute__’ before ‘-’ token > In file included from > /System/Library/Frameworks/AppKit.framework/ > Headers/AppKit.h:153, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:13, > > from src/_macosx.m:1: > /System/Library/Frameworks/AppKit.framework/Headers/NSATSTypesetter.h: > > 46: error: expected ‘;’ before ‘__attribute__’ > In file included from > /System/Library/Frameworks/AppKit.framework/ > Headers/NSObjectController.h:10, > > from /System/Library/Frameworks/AppKit.framework/ > Headers/AppKit.h:158, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:13, > > from src/_macosx.m:1: > /System/Library/Frameworks/CoreData.framework/Headers/NSFetchRequest.h: > > 24: error: expected specifier-qualifier-list before > ‘__weak’ > In file included from > /System/Library/Frameworks/CoreData.framework/ > Headers/NSAttributeDescription.h:10, > > from /System/Library/Frameworks/AppKit.framework/ > Headers/NSPredicateEditorRowTemplate.h:13, > > from /System/Library/Frameworks/AppKit.framework/ > Headers/AppKit.h:175, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:13, > > from src/_macosx.m:1: > /System/Library/Frameworks/CoreData.framework/Headers/ > NSPropertyDescription.h:25: error: expected > specifier-qualifier-list > before ‘__weak’ > In file included from > /System/Library/Frameworks/AppKit.framework/ > Headers/AppKit.h:176, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:13, > > from src/_macosx.m:1: > /System/Library/Frameworks/AppKit.framework/Headers/NSPathCell.h:148: > > error: stray ‘@’ in program > /System/Library/Frameworks/AppKit.framework/Headers/NSPathCell.h:152: > > error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘-’ token > In file included from > /System/Library/Frameworks/AppKit.framework/ > Headers/AppKit.h:177, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:13, > > from src/_macosx.m:1: > /System/Library/Frameworks/AppKit.framework/Headers/NSPathControl.h: > > 73: error: stray ‘@’ in program > /System/Library/Frameworks/AppKit.framework/Headers/NSPathControl.h: > > 77: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > ‘__attribute__’ before ‘-’ > token > In file included from > /System/Library/Frameworks/CoreData.framework/ > Headers/CoreData.h:14, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:14, > > from src/_macosx.m:1: > /System/Library/Frameworks/CoreData.framework/Headers/ > NSEntityDescription.h:28: error: expected > specifier-qualifier-list > before ‘__weak’ > /System/Library/Frameworks/CoreData.framework/Headers/ > NSEntityDescription.h:32: error: expected > specifier-qualifier-list > before ‘__weak’ > /System/Library/Frameworks/CoreData.framework/Headers/ > NSEntityDescription.h:33: error: expected > specifier-qualifier-list > before ‘__weak’ > In file included from > /System/Library/Frameworks/CoreData.framework/ > Headers/CoreData.h:17, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:14, > > from src/_macosx.m:1: > /System/Library/Frameworks/CoreData.framework/Headers/ > NSRelationshipDescription.h:28: error: expected > specifier-qualifier- > list before ‘__weak’ > In file included from > /System/Library/Frameworks/CoreData.framework/ > Headers/CoreData.h:22, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:14, > > from src/_macosx.m:1: > /System/Library/Frameworks/CoreData.framework/Headers/ > NSManagedObject.h:26: error: expected > specifier-qualifier-list before > ‘__weak’ > In file included from > /System/Library/Frameworks/CoreData.framework/ > Headers/CoreData.h:25, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:14, > > from src/_macosx.m:1: > /System/Library/Frameworks/CoreData.framework/Headers/ > NSPersistentStoreCoordinator.h:172: error: expected ‘;’ > before > ‘__attribute__’ > In file included from > /System/Library/Frameworks/CoreData.framework/ > Headers/CoreData.h:27, > > from /System/Library/Frameworks/Cocoa.framework/ > Headers/Cocoa.h:14, > > from src/_macosx.m:1: > /System/Library/Frameworks/CoreData.framework/Headers/ > NSPersistentStore.h:16: error: expected > specifier-qualifier-list > before ‘__weak’ > error: command 'gcc' failed with exit status 1 > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal > Reports 2008 30-Day > trial. Simplify your report design, integration and > deployment - and focus on > what you do best, core application coding. Discover what's > new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Alan G I. <ala...@gm...> - 2009-08-08 18:53:23
|
On 8/8/2009 10:09 AM John Hunter apparently wrote: > Here is the corrected example: Seems perfect! Time to study it. Thanks! Alan |
|
From: Gael V. <gae...@no...> - 2009-08-08 16:13:19
|
On Thu, Aug 06, 2009 at 10:53:13AM -0400, Jae-Joon Lee wrote: > The thread below might be helpful. > http://thread.gmane.org/gmane.comp.python.matplotlib.general/16373 > This will work as far as you keep the aspect="auto". > Also, if you're using matplotlib 0.99rc version, or matplotlib from > svn, you may take a look at > http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#insetlocator > This works even though aspect=1 (or other value). Thanks a lot to both of you. I have fallen in a time gap, and thus have had to switch to other work and haven't been able to use your advice, but it will come in handy when I get back to what I was doing. Gaël |
|
From: John H. <jd...@gm...> - 2009-08-08 14:09:41
|
On Sat, Aug 8, 2009 at 9:00 AM, John Hunter<jd...@gm...> wrote:
> """
> This example shows how to use a path patch to draw a bunch of
> rectangles for an animated histogram
> """
Oops, in my last post I have the timer logic wrong because the call is
non-blocking so the animation ran too fast -- a rare occurrence in the
world of mpl animation :-)
Here is the corrected example:
"""
This example shows how to use a path patch to draw a bunch of
rectangles for an animated histogram
"""
import time
import numpy as np
import matplotlib
matplotlib.use('TkAgg') # do this before importing pylab
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import matplotlib.path as path
fig = plt.figure()
ax = fig.add_subplot(111)
# histogram our data with numpy
data = np.random.randn(1000)
n, bins = np.histogram(data, 100)
# get the corners of the rectangles for the histogram
left = np.array(bins[:-1])
right = np.array(bins[1:])
bottom = np.zeros(len(left))
top = bottom + n
nrects = len(left)
# here comes the tricky part -- we have to set up the vertex and path
# codes arrays using moveto, lineto and closepoly
# for each rect: 1 for the MOVETO, 3 for the LINETO, 1 for the
# CLOSEPOLY; the vert for the closepoly is ignored but we still need
# it to keep the codes aligned with the vertices
nverts = nrects*(1+3+1)
verts = np.zeros((nverts, 2))
codes = np.ones(nverts, int) * path.Path.LINETO
codes[0::5] = path.Path.MOVETO
codes[4::5] = path.Path.CLOSEPOLY
verts[0::5,0] = left
verts[0::5,1] = bottom
verts[1::5,0] = left
verts[1::5,1] = top
verts[2::5,0] = right
verts[2::5,1] = top
verts[3::5,0] = right
verts[3::5,1] = bottom
barpath = path.Path(verts, codes)
patch = patches.PathPatch(barpath, facecolor='green',
edgecolor='yellow', alpha=0.5)
ax.add_patch(patch)
ax.set_xlim(left[0], right[-1])
ax.set_ylim(bottom.min(), top.max())
def animate():
if animate.cnt>=100:
return
animate.cnt += 1
# simulate new data coming in
data = np.random.randn(1000)
n, bins = np.histogram(data, 100)
top = bottom + n
verts[1::5,1] = top
verts[2::5,1] = top
fig.canvas.draw()
fig.canvas.manager.window.after(100, animate)
animate.cnt = 0
fig.canvas.manager.window.after(100, animate)
plt.show()
|
|
From: John H. <jd...@gm...> - 2009-08-08 14:00:28
|
On Sat, Aug 8, 2009 at 6:17 AM, Kaushik Ghose<Kau...@hm...> wrote: > (http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.patches.Rectangle) > e.g. set_height() to change the rectangles? > > e.g. code > ------------------------------ > import pylab > x = pylab.rand(20) > h = pylab.hist(x) > h[2][0].set_height(1) > pylab.draw() > -------------------------------- This is the right idea, but it is likely to be slow for animation, since each rectangle is a separate mpl object, each with its own graphics contexs, rendering step, etc. bar and hist were very early functions which I wrote before we had collections and compound paths. If I were rewriting it from scratch, I would use a compound path. It's a little more work upfront because you have to manually compute the vertices and path codes, but it will be goo-gobs faster. Here is the animated histogram for tk using compound paths """ This example shows how to use a path patch to draw a bunch of rectangles for an animated histogram """ import numpy as np import matplotlib matplotlib.use('TkAgg') # do this before importing pylab import matplotlib.pyplot as plt import matplotlib.patches as patches import matplotlib.path as path fig = plt.figure() ax = fig.add_subplot(111) # histogram our data with numpy data = np.random.randn(1000) n, bins = np.histogram(data, 100) # get the corners of the rectangles for the histogram left = np.array(bins[:-1]) right = np.array(bins[1:]) bottom = np.zeros(len(left)) top = bottom + n nrects = len(left) # here comes the tricky part -- we have to set up the vertex and path # codes arrays using moveto, lineto and closepoly # for each rect: 1 for the MOVETO, 3 for the LINETO, 1 for the # CLOSEPOLY; the vert for the closepoly is ignored but we still need # it to keep the codes aligned with the vertices nverts = nrects*(1+3+1) verts = np.zeros((nverts, 2)) codes = np.ones(nverts, int) * path.Path.LINETO codes[0::5] = path.Path.MOVETO codes[4::5] = path.Path.CLOSEPOLY verts[0::5,0] = left verts[0::5,1] = bottom verts[1::5,0] = left verts[1::5,1] = top verts[2::5,0] = right verts[2::5,1] = top verts[3::5,0] = right verts[3::5,1] = bottom barpath = path.Path(verts, codes) patch = patches.PathPatch(barpath, facecolor='green', edgecolor='yellow', alpha=0.5) ax.add_patch(patch) ax.set_xlim(left[0], right[-1]) ax.set_ylim(bottom.min(), top.max()) def animate(): # simulate new data coming in data = np.random.randn(1000) n, bins = np.histogram(data, 100) top = bottom + n verts[1::5,1] = top verts[2::5,1] = top fig.canvas.draw() def run(): for i in range(100): fig.canvas.manager.window.after(100, animate) fig.canvas.manager.window.after(100, run) plt.show() |
|
From: Jae-Joon L. <lee...@gm...> - 2009-08-08 11:31:28
|
The guide is based on mpl 0.99.
You may upgrade your mpl,
or take a look at the thread below. it is a workaround that will work
with older version.
-JJ
On Fri, Aug 7, 2009 at 8:29 PM, Eliezer, David<del...@kn...> wrote:
> Hi,
> I am graphing several time series together on the same graph,
> and so it is important to have a legend. I am also stacking two graphs
> on top of one another, because some of the data is of a different type.
>
> I wrote the graphing code as follows (pardon the newbie code, this is my
> first matplotlib day…)
>
> fig = plt.figure()
> axU = fig.add_subplot(211)
> axU.set_ylabel('price,$', color='r')
> axU.grid(True)
> axL = fig.add_subplot(212)
> axL.set_ylabel('size, shs', color='b')
> axL.grid(True)
> stepPlotsU = []
> stepPlotsL = []
> for i in range( len( plotvalues ) ) :
> if axisSide[i] == 'U' :
> stepPlotsU.append(axU.step( T,plotvalues[i], where='post' ))
> else :
> stepPlotsL.append(axL.step( T,plotvalues[i], where='post' ))
>
> lU = axU.legend(tuple(stepPlotsU),tuple(legendArrayU),loc='upper right')
> lL = axL.legend( tuple(stepPlotsL),tuple(legendArrayL),loc='upper right')
> axU.axis([float(TMin),float(TMax),1.1 * minValueU -0.1 *
> maxValueU,1.1*maxValueU - 0.1*minValueU])
> axL.axis([float(TMin),float(TMax),0.8*minValueL,1.2*maxValueL])
> axU.set_xlabel("Time, secs")
> fig.savefig('test.png')
>
> My code works, and produces an almost perfect graph, BUT…
> My problem is that the legend is quite large, and covers up a lot of the
> graph.
> The solution seems to be in the user guide, here
>
> <http://matplotlib.sourceforge.net/users/plotting/legend.html#plotting-guide-legend>
>
> where it shows how to call legend with the kwarg bbox_to_anchor=(1.05,1),
> and in the
> example, the box is nicely moved.
>
> In my case, though, I am calling
>
> axU.legend(tuple(stepPlotsU),tuple(legendArrayU),loc='upper right',
> bbox_to_anchor=(1.05,1))
>
> but it says this is an “unexpected keyword)”, I assume it is saying that
> axis.legend() doesn’t use this
> keyword, even if legend does.
>
> lL = axL.legend( tuple(stepPlotsL),tuple(legendArrayL),loc='upper
> right',bbox_to_anchor=(1.05,1))
> File
> "/etg/source/Linux/pkg/Python-2.6.2/lib/python2.6/site-packages/matplotlib/axes.py",
> line 3823, in legend
> self.legend_ = mlegend.Legend(self, handles, labels, **kwargs)
> TypeError: __init__() got an unexpected keyword argument 'bbox_to_anchor'
>
> Does anyone out there know what I can do to get the legend off my graph?
> And is there a way
> to shrink the legend font size down? It is way too large, and I can’t find
> anything in the docs about this,
> that axis.legend() will accept…
>
> Dave
>
> PS: I am using Python 2.6.2, matplotlib 0.98.5.3, numpy 1.3.0, scipy 0.7.1
>
>
>
> DISCLAIMER:
> This e-mail, and any attachments thereto, is intended only for use by the
> addressee(s) named herein and may contain legally privileged and/or
> confidential information. If you are not the intended recipient of this
> e-mail, you are hereby notified that any dissemination, distribution or
> copying of this e-mail, and any attachments thereto, is strictly prohibited.
> If you have received this in error, please immediately notify me and
> permanently delete the original and any copy of any e-mail and any printout
> thereof. E-mail transmission cannot be guaranteed to be secure or
> error-free. The sender therefore does not accept liability for any errors or
> omissions in the contents of this message which arise as a result of e-mail
> transmission.
> NOTICE REGARDING PRIVACY AND CONFIDENTIALITY Knight Capital Group may, at
> its discretion, monitor and review the content of all e-mail communications.
> http://www.knight.com
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Kaushik G. <Kau...@hm...> - 2009-08-08 11:17:19
|
Hi Alan, Alan G Isaac wrote: > This is a second plea for help. > http://www.mail-archive.com/mat...@li.../msg12632.html > > I have a figure.Figure embedded in a FigureCanvasTkAgg. > Each iteration, new data are received, > and I want an updated histogram. > > Now I can at least see a way to do this with pyplot: > I just clear my axes each iteration, call ax.hist, > and then call plot.draw(). I think (?) my problem > is finding an equivalent to plt.draw() in the object > oriented interface. > > What I'd really like to do each iteration is change > only the heights of the rectangles. > I don't do fancy stuff like embedding figures in GUIs, but assuming things work the same way regardless: have you tried grabbing the object handles from hist (which are patches) and using the rectangle patch functions (http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.patches.Rectangle) e.g. set_height() to change the rectangles? e.g. code ------------------------------ import pylab x = pylab.rand(20) h = pylab.hist(x) h[2][0].set_height(1) pylab.draw() -------------------------------- h is a tuple with the last element as a list of patch objects In [82]: h Out[82]: (array([3, 3, 2, 1, 3, 0, 0, 1, 3, 4]), array([ 0.02262869, 0.11966418, 0.21669968, 0.31373517, 0.41077066, 0.50780615, 0.60484164, 0.70187713, 0.79891263, 0.89594812, 0.99298361]), <a list of 10 Patch objects>) Best -Kaushik |
|
From: Eric F. <ef...@ha...> - 2009-08-08 02:19:06
|
Zane Selvans wrote: > Hey there, > > I'm trying to plot a bunch-o-vectors, colored red or blue, depending on > whether their magnitude is positive or negative (they represent > stresses), and I'm doing something like this: > > mag1 = evals[:,0] > ex1 = evecs[:,0,1] > ey1 = evecs[:,0,0] > C1 = np.where(mag1 >= 0, 'red', 'blue') > > mag2 = evals[:,1] > ex2 = evecs[:,1,1] > ey2 = evecs[:,1,0] > C2 = np.where(mag2 >= 0, 'red', 'blue') > The C argument to quiver is for an array to be used with a colormap; you could use that with a listed colormap, or, to use something very close to what you already have, try using the "color" kwarg for your C1 and C2. It takes a single value or a sequence of color specs. Eric > basemap_ax.quiver(np.degrees(calc_phis), > np.degrees(np.pi/2.0-calc_thetas), mag1*ex1, mag1*ey1, C1, lw=0, > width=0.002, scale=1e8) > basemap_ax.quiver(np.degrees(calc_phis), > np.degrees(np.pi/2.0-calc_thetas), mag2*ex2, mag2*ey2, C2, lw=0, > width=0.002, scale=1e8) > basemap_ax.quiver(np.degrees(calc_phis), > np.degrees(np.pi/2.0-calc_thetas), -mag1*ex1, -mag1*ey1, C1, lw=0, > width=0.002, scale=1e8) > basemap_ax.quiver(np.degrees(calc_phis), > np.degrees(np.pi/2.0-calc_thetas), -mag2*ex2, -mag2*ey2, C2, lw=0, > width=0.002, scale=1e8) > > And it gives me the stack trace below... I also tried just using > plain-old quiver (not via basemap) and got the same error. I tried > using rgba tuples and grayscale strings as colors as well, and still got > the same error. Anybody have any idea what the deal is? Or am I > misunderstanding what *C* is supposed to be (i.e. not just an array of > colors, of the same length as the number of vectors being plotted...) > > /Library/Python/2.5/site-packages/mpl_toolkits/basemap/__init__.pyc in > quiver(self, x, y, u, v, *args, **kwargs) > 2877 ax.hold(h) > 2878 try: > -> 2879 ret = ax.quiver(x,y,u,v,*args,**kwargs) > 2880 try: > 2881 plt.draw_if_interactive() > > /Library/Python/2.5/site-packages/matplotlib/axes.pyc in quiver(self, > *args, **kw) > 5850 def quiver(self, *args, **kw): > 5851 if not self._hold: self.cla() > -> 5852 q = mquiver.Quiver(self, *args, **kw) > 5853 self.add_collection(q, False) > 5854 self.update_datalim(q.XY) > > /Library/Python/2.5/site-packages/matplotlib/quiver.pyc in > __init__(self, ax, *args, **kw) > 367 **kw) > 368 self.polykw = kw > --> 369 self.set_UVC(U, V, C) > 370 self._initialized = False > 371 > > /Library/Python/2.5/site-packages/matplotlib/quiver.pyc in set_UVC(self, > U, V, C) > 439 mask = ma.mask_or(U.mask, V.mask, copy=False, shrink=True) > 440 if C is not None: > --> 441 C = ma.masked_invalid(C, copy=False).ravel() > 442 mask = ma.mask_or(mask, C.mask, copy=False, shrink=True) > 443 if mask is ma.nomask: > > /Library/Python/2.5/site-packages/numpy/ma/core.pyc in masked_invalid(a, > copy) > 1996 """ > 1997 a = np.array(a, copy=copy, subok=True) > -> 1998 condition = ~(np.isfinite(a)) > 1999 if hasattr(a, '_mask'): > 2000 condition = mask_or(condition, a._mask) > > TypeError: bad operand type for unary ~: 'NotImplementedType' > > > -- > Zane A. Selvans > Amateur Earthling > http://zaneselvans.org > +1 303 815 6866 > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Eliezer, D. <del...@kn...> - 2009-08-08 00:44:51
|
Hi,
I am graphing several time series together on the same graph,
and so it is important to have a legend. I am also stacking two graphs
on top of one another, because some of the data is of a different type.
I wrote the graphing code as follows (pardon the newbie code, this is my first matplotlib day...)
fig = plt.figure()
axU = fig.add_subplot(211)
axU.set_ylabel('price,$', color='r')
axU.grid(True)
axL = fig.add_subplot(212)
axL.set_ylabel('size, shs', color='b')
axL.grid(True)
stepPlotsU = []
stepPlotsL = []
for i in range( len( plotvalues ) ) :
if axisSide[i] == 'U' :
stepPlotsU.append(axU.step( T,plotvalues[i], where='post' ))
else :
stepPlotsL.append(axL.step( T,plotvalues[i], where='post' ))
lU = axU.legend(tuple(stepPlotsU),tuple(legendArrayU),loc='upper right')
lL = axL.legend( tuple(stepPlotsL),tuple(legendArrayL),loc='upper right')
axU.axis([float(TMin),float(TMax),1.1 * minValueU -0.1 * maxValueU,1.1*maxValueU - 0.1*minValueU])
axL.axis([float(TMin),float(TMax),0.8*minValueL,1.2*maxValueL])
axU.set_xlabel("Time, secs")
fig.savefig('test.png')
My code works, and produces an almost perfect graph, BUT...
My problem is that the legend is quite large, and covers up a lot of the graph.
The solution seems to be in the user guide, here
<http://matplotlib.sourceforge.net/users/plotting/legend.html#plotting-guide-legend>
where it shows how to call legend with the kwarg bbox_to_anchor=(1.05,1), and in the
example, the box is nicely moved.
In my case, though, I am calling
axU.legend(tuple(stepPlotsU),tuple(legendArrayU),loc='upper right', bbox_to_anchor=(1.05,1))
but it says this is an "unexpected keyword)", I assume it is saying that axis.legend() doesn't use this
keyword, even if legend does.
lL = axL.legend( tuple(stepPlotsL),tuple(legendArrayL),loc='upper right',bbox_to_anchor=(1.05,1))
File "/etg/source/Linux/pkg/Python-2.6.2/lib/python2.6/site-packages/matplotlib/axes.py", line 3823, in legend
self.legend_ = mlegend.Legend(self, handles, labels, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'bbox_to_anchor'
Does anyone out there know what I can do to get the legend off my graph? And is there a way
to shrink the legend font size down? It is way too large, and I can't find anything in the docs about this,
that axis.legend() will accept...
Dave
PS: I am using Python 2.6.2, matplotlib 0.98.5.3, numpy 1.3.0, scipy 0.7.1
DISCLAIMER:
This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this in error, please immediately notify me and permanently delete the original and any copy of any e-mail and any printout thereof. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission.
NOTICE REGARDING PRIVACY AND CONFIDENTIALITY Knight Capital Group may, at its discretion, monitor and review the content of all e-mail communications. http://www.knight.com
|
|
From: Zane S. <za...@id...> - 2009-08-07 23:56:16
|
Hey there,
I'm trying to plot a bunch-o-vectors, colored red or blue, depending on
whether their magnitude is positive or negative (they represent stresses),
and I'm doing something like this:
mag1 = evals[:,0]
ex1 = evecs[:,0,1]
ey1 = evecs[:,0,0]
C1 = np.where(mag1 >= 0, 'red', 'blue')
mag2 = evals[:,1]
ex2 = evecs[:,1,1]
ey2 = evecs[:,1,0]
C2 = np.where(mag2 >= 0, 'red', 'blue')
basemap_ax.quiver(np.degrees(calc_phis), np.degrees(np.pi/2.0-calc_thetas),
mag1*ex1, mag1*ey1, C1, lw=0, width=0.002, scale=1e8)
basemap_ax.quiver(np.degrees(calc_phis), np.degrees(np.pi/2.0-calc_thetas),
mag2*ex2, mag2*ey2, C2, lw=0, width=0.002, scale=1e8)
basemap_ax.quiver(np.degrees(calc_phis), np.degrees(np.pi/2.0-calc_thetas),
-mag1*ex1, -mag1*ey1, C1, lw=0, width=0.002, scale=1e8)
basemap_ax.quiver(np.degrees(calc_phis), np.degrees(np.pi/2.0-calc_thetas),
-mag2*ex2, -mag2*ey2, C2, lw=0, width=0.002, scale=1e8)
And it gives me the stack trace below... I also tried just using plain-old
quiver (not via basemap) and got the same error. I tried using rgba tuples
and grayscale strings as colors as well, and still got the same error.
Anybody have any idea what the deal is? Or am I misunderstanding what *C*
is supposed to be (i.e. not just an array of colors, of the same length as
the number of vectors being plotted...)
/Library/Python/2.5/site-packages/mpl_toolkits/basemap/__init__.pyc in
quiver(self, x, y, u, v, *args, **kwargs)
2877 ax.hold(h)
2878 try:
-> 2879 ret = ax.quiver(x,y,u,v,*args,**kwargs)
2880 try:
2881 plt.draw_if_interactive()
/Library/Python/2.5/site-packages/matplotlib/axes.pyc in quiver(self, *args,
**kw)
5850 def quiver(self, *args, **kw):
5851 if not self._hold: self.cla()
-> 5852 q = mquiver.Quiver(self, *args, **kw)
5853 self.add_collection(q, False)
5854 self.update_datalim(q.XY)
/Library/Python/2.5/site-packages/matplotlib/quiver.pyc in __init__(self,
ax, *args, **kw)
367 **kw)
368 self.polykw = kw
--> 369 self.set_UVC(U, V, C)
370 self._initialized = False
371
/Library/Python/2.5/site-packages/matplotlib/quiver.pyc in set_UVC(self, U,
V, C)
439 mask = ma.mask_or(U.mask, V.mask, copy=False, shrink=True)
440 if C is not None:
--> 441 C = ma.masked_invalid(C, copy=False).ravel()
442 mask = ma.mask_or(mask, C.mask, copy=False, shrink=True)
443 if mask is ma.nomask:
/Library/Python/2.5/site-packages/numpy/ma/core.pyc in masked_invalid(a,
copy)
1996 """
1997 a = np.array(a, copy=copy, subok=True)
-> 1998 condition = ~(np.isfinite(a))
1999 if hasattr(a, '_mask'):
2000 condition = mask_or(condition, a._mask)
TypeError: bad operand type for unary ~: 'NotImplementedType'
--
Zane A. Selvans
Amateur Earthling
http://zaneselvans.org
+1 303 815 6866
|
|
From: Bernd E. <mo...@su...> - 2009-08-07 20:44:28
|
John Hunter schrieb: > On Fri, Aug 7, 2009 at 10:34 AM, John Hunter<jd...@gm...> wrote: > >> Unfortunately, the exception glib.GError is gtk version dependent so I >> can't easily catch it. I am loathe to do a blanket except catch, but >> I am not sure what the alternative is here. > > I committed a change to the release branch (I did not try setting the > png if the svg failed, I just give up on the icon) -- if you could > test from the svn repo: > > > svn co https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_99_maint > mpl99 It works now, but as expected I get no icon. Not sure if I don't like my hack better... I suspect it has to do with my glib or gtk installation (both compiled from source). Maybe I'll ask the folks there. Thanks anyway, Bernd -- Bernd Eggink http://sudrala.de |
|
From: Alan G I. <ala...@gm...> - 2009-08-07 20:25:59
|
This is a second plea for help. http://www.mail-archive.com/mat...@li.../msg12632.html I have a figure.Figure embedded in a FigureCanvasTkAgg. Each iteration, new data are received, and I want an updated histogram. Now I can at least see a way to do this with pyplot: I just clear my axes each iteration, call ax.hist, and then call plot.draw(). I think (?) my problem is finding an equivalent to plt.draw() in the object oriented interface. What I'd really like to do each iteration is change only the heights of the rectangles. *But*, any clues are welcome. Thanks, Alan Isaac |
|
From: Christoph G. <cg...@uc...> - 2009-08-07 17:59:47
|
Hi, here is a VS2003 build of matplotlib-0.99.0 for Python 2.5 for comparison: <http://www.lfd.uci.edu/~gohlke/download/matplotlib-0.99.0.win32-py2.5.exe> Christoph On 08/07/2009 00:27, John Hunter wrote: > On Thu, Aug 6, 2009 at 8:48 PM, Patrick Rynhart<pry...@gm...> wrote: >> Dear all, >> >> We are using Python 2.5, matplotlib and NumPy on Windows to assist >> with the teaching for an undergraduate paper. On a small number of >> installations, an error attempting to load some required DLL's is >> being reported (on approx 3 machines out of approximately 60). There >> doesn't appear to be any pattern with this - we can seen it on one >> install of Windows Server 2008 and also on various versions of Windows >> XP (Professional and Home). >> >> Symptoms are, after a "from pylab import *", the following traceback: >> >> Traceback (most recent call last): >> File "C:\Documents and >> Settings\Jo\workspace\test\src\root\nested\__init__.py", line 2, in >> <module> >> from pylab import * >> File "C:\Python25\Lib\site-packages\pylab.py", line 1, in<module> >> from matplotlib.pylab import * >> File "C:\Python25\Lib\site-packages\matplotlib\pylab.py", line 206, >> in<module> >> from matplotlib import mpl # pulls in most modules >> File "C:\Python25\Lib\site-packages\matplotlib\mpl.py", line 1, in<module> >> from matplotlib import artist >> File "C:\Python25\Lib\site-packages\matplotlib\artist.py", line 4, in<module> >> from transforms import Bbox, IdentityTransform, TransformedBbox, >> TransformedPath >> File "C:\Python25\Lib\site-packages\matplotlib\transforms.py", line >> 34, in<module> >> from matplotlib._path import affine_transform >> ImportError: DLL load failed: The specified module could not be found. > > We have seen this problem several times before, and have labored hard > to banish it, but it always has a way of coming back to haunt us. I > am aware of a bug in python2.6 which causes mingw to build broken > win32 binaries, but am not aware of such a problem w/ python2.5, > which you appear to be using. We often use a program called > dependency walker to track these problems down: > > http://www.dependencywalker.com/ > > Open the problematic file (it should be > C:\Python25\Lib\site-packages\matplotlib\_path.pyd) and report any > errors you find here; it should tell you which DLLs are missing. > Search the good and the bad boxes for these DLL filenames and see if > it is a difference in the boxes, eg do the good boxes have the DLL and > the bad boxes not, and if so maybe you can figure out why (different > version in the OS patch level?). I am really interested to know the > difference in the boxes because it may give us the critical clue as to > why some users report this problem and others do not see it. > > Also, on one of the bad boxes, could you try the new 0.99 release and > let me know if you have the same issue? > > I build the python2.5 installers with mingw; Christoph builds the > python2.6 installers with Visual Studio precisely because mingw is > broken on python2.6. If we can't banish this bug on 2.5 w/ mingw, I > may have to lean on his generosity and ask him to make a python2.5 > installer with Visual Studio as well. > > JDH > > PS: rereading your email, I see you are using 0.98.3. The first time > I read it, when I wrote the response above, I thought you were using > 0.98.5.3 -- the .3 at the end tricked me. The latter is fairly > recent, and came out 10 months after 0.98.3, and we did several things > to fix exactly this dll problem in interim. At a minimum, you need to > be testing and installing 0.98.5.3. This is a very stable, bug fix > release, suitable for use in the classroom. I can't guarantee you > won't hit the same problem, but at least you will be using a version > that *shouldn't* have it, though I am still interested in the results > of the dependency walker tests above, because I have wasted so much > time trying to fix these win32 installers. > > |
|
From: Christopher B. <Chr...@no...> - 2009-08-07 17:13:57
|
sasha wrote: > Ok i fixed insytalling in usr local lib from source (both png and freetype) > i tried to tell matplotlib to find the frameworks but i don't know how. for the record, William's Frameworks all have a "unix" dir in them, which have "lib" and "include" dirs. You need to add those to MPL's search paths, by editing setup_ext.py. Look for the basedir dict. -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |