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
(10) |
2
(11) |
3
(4) |
4
(2) |
5
(10) |
6
(20) |
7
(18) |
8
(32) |
9
(15) |
10
(2) |
11
(5) |
12
(7) |
13
(13) |
14
(9) |
15
(17) |
16
(10) |
17
(4) |
18
(7) |
19
(15) |
20
(16) |
21
(10) |
22
(19) |
23
(13) |
24
(4) |
25
(5) |
26
(8) |
27
(10) |
28
(17) |
29
(7) |
30
(18) |
31
(2) |
Hello, I would like to change the color of the yticklabels. I tried to use this command: ax1=p.subplot(212) ax1.set_xlabel('t [sec]') ax1.set_ylabel('g^2(q,t)') ax1.set_yticklabels(color='r') but it gives an error: TypeError: set_yticklabels() takes at least 2 non-keyword arguments (1 given) if I write instead ax1.set_yticklabels(['1','2'],color='r') it works, but it puts clearly labels 1 and 2... I don't want to change the labels, only the color! is there anyway of doing it? Hope you can help me Chiara > Date: 2008年5月22日 14:52:13 +0200 > From: dav...@ch... > To: mat...@li... > Subject: [Matplotlib-users] Legend labels - interaction with functions > > This is probably my lack of knowledge of python, but how do I set up > legend labels for some bar-plots that have been produced inside a > function. For example, the following will nicely plot my bar-plots, but > then legend doesn't know about the colours used, so here just uses black > for both labels. I'd like the labels to have the same colour as the bars > generated inside plotb. (I am using a function here as my real code has > extra stuff to calculate error-bars and suchlike for each data set.) > > x=arange(0,5) > y=array([ 1.2, 3.4, 5.4, 2.3, 1.0]) > z=array([ 2.2, 0.7, 0.4, 1.3, 1.2]) > > def plotb(x,y,col): > p=bar(x,y,color=col) > > plotb(x,y,'k') > plotb(x+0.4,z,'y') > > legend(('YYY,'ZZZ')) > > > I tried passing the object "p" through the plotb argument list, but > python didn't like that. (I am just learning python, and so far haven't > seen how to pass such objects around. > > Thanks for any tips, > > Dave > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
This is probably my lack of knowledge of python, but how do I set up legend labels for some bar-plots that have been produced inside a function. For example, the following will nicely plot my bar-plots, but then legend doesn't know about the colours used, so here just uses black for both labels. I'd like the labels to have the same colour as the bars generated inside plotb. (I am using a function here as my real code has extra stuff to calculate error-bars and suchlike for each data set.) x=arange(0,5) y=array([ 1.2, 3.4, 5.4, 2.3, 1.0]) z=array([ 2.2, 0.7, 0.4, 1.3, 1.2]) def plotb(x,y,col): p=bar(x,y,color=col) plotb(x,y,'k') plotb(x+0.4,z,'y') legend(('YYY,'ZZZ')) I tried passing the object "p" through the plotb argument list, but python didn't like that. (I am just learning python, and so far haven't seen how to pass such objects around. Thanks for any tips, Dave
Hello, On Wednesday 21 May 2008 17:57:28 PaterMaximus wrote: > I want to make one scatter plot and use the same scales on another. I think > I seen getting the Axes from the first scatter plot using v=axis() and then > setting them on second with axis(v) but I can not get to work. Any help > appreciated Maybe I don't understand correctly, but what you can do with v=axis() and axis(v) is to get the current axes limits and apply them to another axes. Doing so you need to build the second axes by yourself (with axes oder subplot - command) and afterwards apply the limits. regards Matthias
I wanted to try switching over from apple python to mac python 2.5.2, so I went to rebuild matplotlib svn. With the config: BUILDING MATPLOTLIB matplotlib: 0.98pre python: 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.1.0rc1 freetype2: 9.16.3 OPTIONAL BACKEND DEPENDENCIES libpng: 1.2.24 Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4 wxPython: no * wxPython not found Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to "import gtk" in your build/install environment Qt: no Qt4: no Cairo: no OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: matplotlib will provide pytz: matplotlib will provide OPTIONAL USETEX DEPENDENCIES dvipng: 1.9 ghostscript: 8.61 latex: 3.141592 EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES configobj: matplotlib will provide enthought.traits: matplotlib will provide [Edit setup.cfg to suppress the above messages] I get the error: building 'matplotlib.ft2font' extension creating build/temp.macosx-10.3-i386-2.5 creating build/temp.macosx-10.3-i386-2.5/src creating build/temp.macosx-10.3-i386-2.5/CXX gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd - fno-common -dynamic -DNDEBUG -g -O3 -I/usr/X11/include/freetype2 -I/ usr/X11/include -I/sw/lib/freetype219/include -I/usr/local/include -I/ usr/include -I/sw/include -I/usr/X11R6/include -I. -I/Library/ Frameworks/Python.framework/Versions/2.5/include/python2.5 -c src/ ft2font.cpp -o build/temp.macosx-10.3-i386-2.5/src/ft2font.o In file included from /usr/X11/include/freetype2/freetype/freetype.h:41, from src/ft2font.h:14, from src/ft2font.cpp:1: /usr/X11/include/freetype2/freetype/config/ftconfig.h:65:1: warning: "SIZEOF_LONG" redefined In file included from /Library/Frameworks/Python.framework/Versions/ 2.5/include/python2.5/Python.h:8, from ./CXX/WrapPython.h:42, from ./CXX/Extensions.hxx:48, from src/ft2font.h:4, from src/ft2font.cpp:1: /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ pyconfig.h:814:1: warning: this is the location of the previous definition In file included from /usr/X11/include/freetype2/freetype/freetype.h:41, from src/ft2font.h:14, from src/ft2font.cpp:1: /usr/X11/include/freetype2/freetype/config/ftconfig.h:65:1: warning: "SIZEOF_LONG" redefined In file included from /Library/Frameworks/Python.framework/Versions/ 2.5/include/python2.5/Python.h:8, from ./CXX/WrapPython.h:42, from ./CXX/Extensions.hxx:48, from src/ft2font.h:4, from src/ft2font.cpp:1: /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ pyconfig.h:814:1: warning: this is the location of the previous definition gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd - fno-common -dynamic -DNDEBUG -g -O3 -I/usr/X11/include/freetype2 -I/ usr/X11/include -I/sw/lib/freetype219/include -I/usr/local/include -I/ usr/include -I/sw/include -I/usr/X11R6/include -I. -I/Library/ Frameworks/Python.framework/Versions/2.5/include/python2.5 -c src/ mplutils.cpp -o build/temp.macosx-10.3-i386-2.5/src/mplutils.o gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd - fno-common -dynamic -DNDEBUG -g -O3 -I/usr/X11/include/freetype2 -I/ usr/X11/include -I/sw/lib/freetype219/include -I/usr/local/include -I/ usr/include -I/sw/include -I/usr/X11R6/include -I. -I/Library/ Frameworks/Python.framework/Versions/2.5/include/python2.5 -c CXX/ cxx_extensions.cxx -o build/temp.macosx-10.3-i386-2.5/CXX/ cxx_extensions.o gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd - fno-common -dynamic -DNDEBUG -g -O3 -I/usr/X11/include/freetype2 -I/ usr/X11/include -I/sw/lib/freetype219/include -I/usr/local/include -I/ usr/include -I/sw/include -I/usr/X11R6/include -I. -I/Library/ Frameworks/Python.framework/Versions/2.5/include/python2.5 -c CXX/ cxxsupport.cxx -o build/temp.macosx-10.3-i386-2.5/CXX/cxxsupport.o gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd - fno-common -dynamic -DNDEBUG -g -O3 -I/usr/X11/include/freetype2 -I/ usr/X11/include -I/sw/lib/freetype219/include -I/usr/local/include -I/ usr/include -I/sw/include -I/usr/X11R6/include -I. -I/Library/ Frameworks/Python.framework/Versions/2.5/include/python2.5 -c CXX/ IndirectPythonInterface.cxx -o build/temp.macosx-10.3-i386-2.5/CXX/ IndirectPythonInterface.o gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd - fno-common -dynamic -DNDEBUG -g -O3 -I/usr/X11/include/freetype2 -I/ usr/X11/include -I/sw/lib/freetype219/include -I/usr/local/include -I/ usr/include -I/sw/include -I/usr/X11R6/include -I. -I/Library/ Frameworks/Python.framework/Versions/2.5/include/python2.5 -c CXX/ cxxextensions.c -o build/temp.macosx-10.3-i386-2.5/CXX/cxxextensions.o In file included from /usr/include/math.h:26, from /Library/Frameworks/Python.framework/Versions/ 2.5/include/python2.5/pyport.h:231, from /Library/Frameworks/Python.framework/Versions/ 2.5/include/python2.5/Python.h:57, from ./CXX/WrapPython.h:42, from CXX/cxxextensions.c:38: /usr/include/architecture/ppc/math.h:675: warning: conflicting types for built-in function ‘scalb’ g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g - bundle -undefined dynamic_lookup build/temp.macosx-10.3-i386-2.5/src/ ft2font.o build/temp.macosx-10.3-i386-2.5/src/mplutils.o build/ temp.macosx-10.3-i386-2.5/CXX/cxx_extensions.o build/temp.macosx-10.3- i386-2.5/CXX/cxxsupport.o build/temp.macosx-10.3-i386-2.5/CXX/ IndirectPythonInterface.o build/temp.macosx-10.3-i386-2.5/CXX/ cxxextensions.o -L/usr/X11/lib -L/sw/lib/freetype219/lib -L/usr/local/ lib -L/usr/lib -L/sw/lib -L/usr/X11R6/lib -lfreetype -lz -lz -lstdc++ - lm -o build/lib.macosx-10.3-i386-2.5/matplotlib/ft2font.so -Wl,- framework,CoreServices,-framework,ApplicationServices ld: warning in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s. 10.4.dylib, missing required architecture ppc in file ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.1.dylib, missing required architecture ppc in file for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/folders/yL/yLD5tRJiGWa7oyM6mWJUN+++ +TI/-Tmp-//ccFeJN3g.out (No such file or directory) error: command 'g++' failed with exit status 1
I have overridden the size handler (_onSize) of FigureCanvasWxAgg. In there I essentially added a few lines to set the DPI value with respect to the current canvas size in order to resize elements as suggested by John (using figure.dpi.set). At a first glance everything works as expected. However, if the canvas becomes too small (and apparently with some font types only) I get the following runtime error: "Could not convert glyph to bitmap". Where is the problem? Jürgen -------- Original-Nachricht -------- > Datum: 2008年1月14日 18:24:11 -0500 > Von: Michael Droettboom <md...@st...> > An: John Hunter <jd...@gm...> > CC: DaFudl <jue...@gm...>, mat...@li... > Betreff: Re: [Matplotlib-users] re sizing behaviour like in Mircrocal Origin > Doh! Why didn't I think of that? > > Mike > > John Hunter wrote: > > On Jan 14, 2008 3:55 PM, Michael Droettboom <md...@st...> wrote: > > > >> I think what you're asking for would require a pretty major overhaul of > >> matplotlib. The fact that all the text etc. remains the same size is a > > > > matplotlib is designed to scale in the way Jurgen requests with DPI > > (eg fonts, line thicknesses and the like scale with DPI). > > > > In [65]: fig = figure() > > > > In [66]: plot([1,2,3]) > > Out[66]: [<matplotlib.lines.Line2D instance at 0xbf965ec>] > > > > In [67]: fig.dpi.set(200) > > > > In [68]: fig.canvas.draw() > > > > with a little work, one could hook into the resize mechanism to > > increase the dpi to create the desired effect w/o a major overhaul. > > By default what happens is the width and height in inches are changed > > with a resize but the dpi is held constant. One could trick > > matplotlib by computing a new width, height in inches, and a new dpi > > so that the resized canvas width in pixels is the requested size based > > on the resize event but the dpi is increased to create the microcal > > effect > > > > JDH > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA -- Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten Browser-Versionen downloaden: http://www.gmx.net/de/go/browser -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
On Wed, May 21, 2008 at 11:13:55AM -0700, Christopher Brown wrote: > I am changing this property, but nothing changes on the figure. From > ipython, and when the figure is visible, I type: > > gca().yaxis.labelpad = 100 > > but the ylabel doesn't move. I'm in 0.98pre from svn. What am I doing > wrong? Yust a guess: Try draw() to redraw the hole figure. By, Friedrich
> This shouldn't happen if the font metrics are correct, since the > label gets the bounding box of the tick labels and adjusts itself > correctly. This behavior is causing a problem for me. I have two figures with different sets of yticklabels (100 vs 1000), and the ylabels are in different places as a result. I'd like to have the two ylabels be in the exact same position. > To increase the distance, you can increase the LABELPAD parameter > > ax.xaxis.LABELPAD = 8 # default is 5 I am changing this property, but nothing changes on the figure. From ipython, and when the figure is visible, I type: gca().yaxis.labelpad = 100 but the ylabel doesn't move. I'm in 0.98pre from svn. What am I doing wrong? -- Chris
I want to make one scatter plot and use the same scales on another. I think I seen getting the Axes from the first scatter plot using v=axis() and then setting them on second with axis(v) but I can not get to work. Any help appreciated
I assume you're using the matplotlib 0.91.2 that's distributed with Ubuntu 8.04. There was a recent fix for segfaulting in the exact same place (outside of any sort of freezing apparatus). Since it was related to the interpretation of a pointer, it's possible that you would see this inside of cx-freeze and not outside on the same machine, just because things get loaded into different parts of memory. I would try that fix first, and then look at problems related to freezing. We should have a new release out shortly, but it's unclear how long that will take to trickle down into Ubuntu repositories. You can check out the SVN maintenance branch from here (which has this bugfix): svn co https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_91_maint matplotlib-0.91.x Let us know how that works for you. Cheers, Mike Jonathan Wright wrote: > Hello, > > I am getting segmentation faults when I try to freeze a script which > uses the TkAgg backend, on python2.5.2, gcc 4.2.3 (ubuntu 8.04, hardy > heron). A trial script is: > > import matplotlib > matplotlib.use("TkAgg") # unless you have it in matplotlibrc > import matplotlib.backends.backend_tkagg # explicit for freezer > from matplotlib.pylab import plot, show > plot(range(10), range(10), "+") > show() > > Is anyone already familiar with the problem? Things seem to work with > the GTkAgg backend, but sadly many years ago I decided to use Tk as I > thought it'd be easier to distribute. In order to reproduce the problem > with bbfreeze you should just need this freezing script: > > from bbfreeze import Freezer > f = Freezer("dist", > includes=("matplotlib", > "matplotlib.numerix.fft", > "matplotlib.numerix.linear_algebra", > "matplotlib.numerix.ma", > "matplotlib.numerix.mlab", > "matplotlib.numerix.random_array")) > f.addScript("t.py") > f() > > For reproducing the problem with cx-freeze you need to (a) install it by > patching the cx-freeze setup.py [so that (2, 5) -> (2, 6)] and (b) add > an import for numpy.linalg.lapack_lite and edit your numpy.__init__ to > remove numpy.test. > > Thanks for any advice, > > Jon > --- > > PS: gdb says > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 0xb7c806b0 (LWP 8158)] > 0xb6e145a0 in ?? () from > /home/wright/testcx/build/exe.linux-i686-2.5/matplotlib.backends._tkagg.so > (gdb) bt > #0 0xb6e145a0 in ?? () from > /home/wright/testcx/build/exe.linux-i686-2.5/matplotlib.backends._tkagg.so > #1 0xb6badb6e in TclInvokeStringCommand () from /usr/lib/libtcl8.4.so.0 > #2 0xb6baee56 in TclEvalObjvInternal () from /usr/lib/libtcl8.4.so.0 > #3 0xb6baf0db in Tcl_EvalObjv () from /usr/lib/libtcl8.4.so.0 > #4 0xb6ef96c6 in ?? () from > /home/wright/testcx/build/exe.linux-i686-2.5/_tkinter.so > #5 0x0827a0c8 in ?? () > #6 0x00000005 in ?? () > ... > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
Hi, I have the following code to produce a greyscale stack bar graph for an arbitrary numbers of input vectors with an arbitrary number of elements. This is what I have so far. It works fine - the only problem is I have n times too many legend entries where n is the number of input vectors. I just want to label the color for the first element of each vector once, but I'm a bit stuck on how to do this. Any help appreciated. def plot_stacked(*vals): numstacks = len(vals) vallength = set([len(val) for val in vals]) if len(vallength) > 1: raise ValueError,'All input values should have the same length' vallength = vallength.pop() ind = 0.25 + arange(numstacks) width = 0.5 bottom = zeros(numstacks) print arange(vallength) colorvals = arange(vallength) * (1.0/(vallength-1)) print colorvals orderlabels = ['First Order','Second Order','Third Order','Fourth Order'] labels = orderlabels[:vallength-1] + ['Higher Order'] for i in range(vallength): ivals = [val[i] for val in vals] bar(ind, ivals, width, bottom=bottom, color=str(colorvals[i]),label=labels[i]) bottom += ivals xlim(0,numstacks+1) legend() Thanks Robin
On Wednesday 21 May 2008 13:59:31 Johan Mazel wrote: > Hi > I'm displaying 4 graphs in one figure. > But the 4 graphs are really to much near each other and the center of the > figure. > Is there anyway to change this, and move them nearer to the edges of the > figure ? > Thanks > Johan Mazel Hi Johan, subplots_adjust(wspace=0.5) may help regards Matthias
Hi I'm displaying 4 graphs in one figure. But the 4 graphs are really to much near each other and the center of the figure. Is there anyway to change this, and move them nearer to the edges of the figure ? Thanks Johan Mazel
Hello, I am getting segmentation faults when I try to freeze a script which uses the TkAgg backend, on python2.5.2, gcc 4.2.3 (ubuntu 8.04, hardy heron). A trial script is: import matplotlib matplotlib.use("TkAgg") # unless you have it in matplotlibrc import matplotlib.backends.backend_tkagg # explicit for freezer from matplotlib.pylab import plot, show plot(range(10), range(10), "+") show() Is anyone already familiar with the problem? Things seem to work with the GTkAgg backend, but sadly many years ago I decided to use Tk as I thought it'd be easier to distribute. In order to reproduce the problem with bbfreeze you should just need this freezing script: from bbfreeze import Freezer f = Freezer("dist", includes=("matplotlib", "matplotlib.numerix.fft", "matplotlib.numerix.linear_algebra", "matplotlib.numerix.ma", "matplotlib.numerix.mlab", "matplotlib.numerix.random_array")) f.addScript("t.py") f() For reproducing the problem with cx-freeze you need to (a) install it by patching the cx-freeze setup.py [so that (2, 5) -> (2, 6)] and (b) add an import for numpy.linalg.lapack_lite and edit your numpy.__init__ to remove numpy.test. Thanks for any advice, Jon --- PS: gdb says Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb7c806b0 (LWP 8158)] 0xb6e145a0 in ?? () from /home/wright/testcx/build/exe.linux-i686-2.5/matplotlib.backends._tkagg.so (gdb) bt #0 0xb6e145a0 in ?? () from /home/wright/testcx/build/exe.linux-i686-2.5/matplotlib.backends._tkagg.so #1 0xb6badb6e in TclInvokeStringCommand () from /usr/lib/libtcl8.4.so.0 #2 0xb6baee56 in TclEvalObjvInternal () from /usr/lib/libtcl8.4.so.0 #3 0xb6baf0db in Tcl_EvalObjv () from /usr/lib/libtcl8.4.so.0 #4 0xb6ef96c6 in ?? () from /home/wright/testcx/build/exe.linux-i686-2.5/_tkinter.so #5 0x0827a0c8 in ?? () #6 0x00000005 in ?? () ...
Hi, I need the same, and I did not understood the example. I have an imageplot with imshow and in the colorbar in donot wish to have values but text strings. can someone give me a small example to work on. thanks, On Sat, Mar 1, 2008 at 8:44 PM, John Hunter <jd...@gm...> wrote: > On Sat, Mar 1, 2008 at 8:34 PM, John R. Dowdle <jrd...@gm...> wrote: > > Hi, > > > > Is is possible to customize the labels for the ticks of the colorbar? > If so, > > could someone please explain how this may be accomplished? > > The colorbar method returns a matplotlib.colorbar.Colorbar instance, > which contains a matplotlib.axes.Axes instance named "ax" (this is the > axes of the colorbar). I'm freestyling here, so there could be a > typo, but here is the idea: > > cb = fig.colorbar(something) > for ticklabel in cb.ax.get_yticklabels(): > ticklabel.set_color('red') # the ticklabels are > matplotlib.text.Text instances > > See http://matplotlib.sf.net/matplotlib.text.html and > http://matplotlib.sf.net/matplotlib.axes.html for details on the Text > and Axes methods that are available to you. You can set all kinds of > attributes on the Text instance (font style, fontsize, font weight, > color, etc...) > > JDH > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
On Tue, May 20, 2008 at 10:32 AM, Johan Mazel <joh...@gm...> wrote: > Hi > I'm plotting data associated with dates. > I have two problems. > > The first one is that the xlabel "date" is displayed despite that haven't > set Matplotlib to do so. Yes, that was meant to be a feature but it is mainly an annoyance. I've removed it from svn. You can set the xlabel to be blank on any axes with ax.set_xlabel('') > > My code is the following one : > > fig = plt.figure(1) > > title_to_display=str("Entropy, Kullback-LeiblerL, symmetric KL > and resistor KL from %s to > %s"%(IP_list_RTT[i][0].split("_")[1],IP_list_RTT[i][0].split("_")[2])) > > ax_1 = fig.add_subplot(2,2,1) > ax_1.plot(dates_RTT,data_RTT,'r-') > > ax_2 = twinx() > ax_2.plot(dates_distances,entropy_list) > ax_2.plot(dates_distances,kullback_leibler_list) > ax_2.plot(dates_distances,symmetric_kullback_leibler_list) > > ax_2.plot(dates_distances,resistor_average_kullback_leibler_list) > ax_2.yaxis.tick_right() > > title(title_to_display,fontsize=size_font_title) > ax_1.grid(True) > ax_1.xaxis.set_major_formatter(formatter_1) > ax_2.xaxis.set_major_formatter(formatter_2) > labels_x1 = ax_1.get_xticklabels() > labels_x2 = ax_2.get_xticklabels() > setp(labels_x1, rotation=rotation_x_label, > fontsize=size_font_x_label) > setp(labels_x2, rotation=rotation_x_label, > fontsize=size_font_x_label) > > All the variables relatives to the display > (rotation_x_label,size_font_x_label,size_font_title) are defined before. > If I add xlabel("tutut"), I just get "tutut" print over the two previous > "date" (one for ax_1 and one for ax_2). > > > It also looks like there is two x tick labels formatted displayed. > I tried to define two formatters with one empty and one "normal" and assign > them to the two different axes that I'm using with something like this : > formatter_1 = DateFormatter('') > formatter_2 = DateFormatter('%H-%M-%S') > and then : > ax_1.xaxis.set_major_formatter(formatter_1) > ax_2.xaxis.set_major_formatter(formatter_2) With twinx, you get shared x-axis, and because they are shared they share the same locator and formatter. What you need to do is make the ones on axes 1 *invisible* for label in ax1.get_xticklabels(): label.set_visible(False) BTW, for other uses, yo umay want to use the NullFormatter when you want no strings. But this doesn't work with shared axes so use the invisible trick. JDH
Hi I'm plotting data associated with dates. I have two problems. The first one is that the xlabel "date" is displayed despite that haven't set Matplotlib to do so. My code is the following one : fig = plt.figure(1) title_to_display=str("Entropy, Kullback-LeiblerL, symmetric KL and resistor KL from %s to %s"%(IP_list_RTT[i][0].split("_")[1],IP_list_RTT[i][0].split("_")[2])) ax_1 = fig.add_subplot(2,2,1) ax_1.plot(dates_RTT,data_RTT,'r-') ax_2 = twinx() ax_2.plot(dates_distances,entropy_list) ax_2.plot(dates_distances,kullback_leibler_list) ax_2.plot(dates_distances,symmetric_kullback_leibler_list) ax_2.plot(dates_distances,resistor_average_kullback_leibler_list) ax_2.yaxis.tick_right() title(title_to_display,fontsize=size_font_title) ax_1.grid(True) ax_1.xaxis.set_major_formatter(formatter_1) ax_2.xaxis.set_major_formatter(formatter_2) labels_x1 = ax_1.get_xticklabels() labels_x2 = ax_2.get_xticklabels() setp(labels_x1, rotation=rotation_x_label, fontsize=size_font_x_label) setp(labels_x2, rotation=rotation_x_label, fontsize=size_font_x_label) All the variables relatives to the display (rotation_x_label,size_font_x_label,size_font_title) are defined before. If I add xlabel("tutut"), I just get "tutut" print over the two previous "date" (one for ax_1 and one for ax_2). It also looks like there is two x tick labels formatted displayed. I tried to define two formatters with one empty and one "normal" and assign them to the two different axes that I'm using with something like this : formatter_1 = DateFormatter('') formatter_2 = DateFormatter('%H-%M-%S') and then : ax_1.xaxis.set_major_formatter(formatter_1) ax_2.xaxis.set_major_formatter(formatter_2) But it doesn't work. If the empty formatter is the first one, it looks that both x tick labels are displayed at the same time (just as before). And if the empty formatter is the second, none of the x tick labels are displayed. Thanks in advance for the help. Regards. Johan Mazel
On Tue, May 20, 2008 at 8:31 AM, Marcus Vinicius Eiffle Duarte <eif...@gm...> wrote: > Thanks, John. That worked fine. > But does this mean that I can't make the figure repaint just a > portion/object, and always will have to repaint/refresh the whole figure > (all objects)? Or does matplotlib automatically keep track of what objects > were changes and refreshes only these? If you call fig.canvas.draw, everything will be updated. If you want to selectively draw certain artists, you can use the animated property w/ background copy/restore and the draw_artist method as described at http://www.scipy.org/Cookbook/Matplotlib/Animations Hope this helps, JDH
On Tue, May 20, 2008 at 8:34 PM, Michael Droettboom <md...@st...> wrote: > The compiler that ships with Fedora 9 is a little more strict about C header > file usage from a C++ file. This was fixed in matplotlib SVN less than two > weeks ago. > > You can either > > a) checkout the maintenance branch from SVN, which is basically like 0.91.2 > but with a number of small bugfixes, including this one: > > svn co > https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_91_maint > matplotlib-0.91.x > > b) manually apply this diff to your 0.91.2 copy: > > http://matplotlib.svn.sourceforge.net/viewvc/matplotlib?view=rev&revision=5128 > > I'd recommend a) if you're comfortable with subversion. > > Cheers, > Mike > > fri...@gm... wrote: >> >> Dear all, >> >> I am building the 0.91.2 version on a Fedora 9. I have compiled this >> version on Fedora 8 earlier with no problem. However, this time the >> package failed to build. >> >> Here is the last lines from the output: >> >> gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall >> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector >> --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic >> -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fPIC >> -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c >> ttconv/pprdrv_tt2.cpp -o build/temp.linux-i686-2.5/ttconv/pprdrv_tt2.o >> In file included from ttconv/pprdrv_tt2.cpp:40: >> ttconv/truetype.h:50: error: ISO C++ forbids declaration of 'FILE' with no >> type >> ttconv/truetype.h:50: error: expected ';' before '*' token >> error: command 'gcc' failed with exit status 1 >> >> The compilers I use are gcc 4.3.0 (with g++). >> Is there anything broken, or I'm missing something? >> >> Thanks in advance. >> >> Cong. >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft Defy all challenges. >> Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > > Thanks for the information. The svn version built seamlessly.
2008年5月20日 John Hunter <jd...@gm...>: > > My problem is: even though I call draw() twice, the figure is not > > imeediately updated when the user selects a given line on the treeview. > The > > figure is updated only when I change the size of a pane. I tried using > > matplotlib in interactive mode, adding the line > > > > matplotlib.interactive( True ) > > You don't need this - -this is for people working interactively from > the python shell, not using mpl in a GUI. > > > > after the lines > > > > import matplotlib > > matplotlib.use( 'GTK' ) > > This is fine, but also not necessary. This affects people using > pylab/pyplot. You should not be. You should be following the > "embedding_in_YOURGUI*.py examples at > http://matplotlib.sf.net/examples > > > barraAtual.draw( ) > > If I read your post correctly, barraActual is a Rectangle. You need > to be calling draw on the FigureCanvas, not on the individual artists. > Eg > > fig.canvas.draw > > where fig is your matplotlib.figure.Figure instance. > > JDH Thanks, John. That worked fine. But does this mean that I can't make the figure repaint just a portion/object, and always will have to repaint/refresh the whole figure (all objects)? Or does matplotlib automatically keep track of what objects were changes and refreshes only these? Marcus Vinicius Eiffle Duarte eif...@gm... Niterói, RJ, Brasil
> My problem is: even though I call draw() twice, the figure is not > imeediately updated when the user selects a given line on the treeview. The > figure is updated only when I change the size of a pane. I tried using > matplotlib in interactive mode, adding the line > > matplotlib.interactive( True ) You don't need this - -this is for people working interactively from the python shell, not using mpl in a GUI. > > after the lines > > import matplotlib > matplotlib.use( 'GTK' ) This is fine, but also not necessary. This affects people using pylab/pyplot. You should not be. You should be following the "embedding_in_YOURGUI*.py examples at http://matplotlib.sf.net/examples > barraAtual.draw( ) If I read your post correctly, barraActual is a Rectangle. You need to be calling draw on the FigureCanvas, not on the individual artists. Eg fig.canvas.draw where fig is your matplotlib.figure.Figure instance. JDH
The compiler that ships with Fedora 9 is a little more strict about C header file usage from a C++ file. This was fixed in matplotlib SVN less than two weeks ago. You can either a) checkout the maintenance branch from SVN, which is basically like 0.91.2 but with a number of small bugfixes, including this one: svn co https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_91_maint matplotlib-0.91.x b) manually apply this diff to your 0.91.2 copy: http://matplotlib.svn.sourceforge.net/viewvc/matplotlib?view=rev&revision=5128 I'd recommend a) if you're comfortable with subversion. Cheers, Mike fri...@gm... wrote: > Dear all, > > I am building the 0.91.2 version on a Fedora 9. I have compiled this > version on Fedora 8 earlier with no problem. However, this time the > package failed to build. > > Here is the last lines from the output: > > gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall > -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector > --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic > -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fPIC > -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c > ttconv/pprdrv_tt2.cpp -o build/temp.linux-i686-2.5/ttconv/pprdrv_tt2.o > In file included from ttconv/pprdrv_tt2.cpp:40: > ttconv/truetype.h:50: error: ISO C++ forbids declaration of 'FILE' with no type > ttconv/truetype.h:50: error: expected ';' before '*' token > error: command 'gcc' failed with exit status 1 > > The compilers I use are gcc 4.3.0 (with g++). > Is there anything broken, or I'm missing something? > > Thanks in advance. > > Cong. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
Hi, folks! I am using matplotlib (for the first time ever) to embed some graphics in an application written using python + pygtk + glade. So, I inserted on a page of a notebook a vertical pane, containing a treeview with data on the left pane, and a matplotlib bar graph of this data on the right. I wrote some code to "highlight" the individual rectangle on the graph concerning a given line of the treeview, activated by a click on the treeview's line (selection of the line). The code is show below, where self.hndBar is a list with the handles to all the Rectangle objects created by the bar method: def show_component_on_bar_graph( self, widget ): selecao = self.treeComp.get_selection() ( modelo, iteravel ) = selecao.get_selected() if (iteravel ): idx = int( self.modeloComposicao.get_value( iteravel, 0 ) ) barraAnterior = self.barraAtual if barraAnterior != '': print "barraAnterior = ", barraAnterior barraAnterior.set_facecolor( 'b' ) barraAnterior.set_edgecolor( 'b' ) barraAnterior.draw() barraAtual = self.hndBar[ idx - 1 ] self.barraAtual = barraAtual print "barraAtual = ", barraAtual barraAtual.set_facecolor( 'r' ) barraAtual.set_edgecolor( 'r' ) barraAtual.draw( ) My problem is: even though I call draw() twice, the figure is not imeediately updated when the user selects a given line on the treeview. The figure is updated only when I change the size of a pane. I tried using matplotlib in interactive mode, adding the line matplotlib.interactive( True ) after the lines import matplotlib matplotlib.use( 'GTK' ) but it didn't work. How can I make the figure be imeediately updated? Thanks in advance, Marcus Vinicius Eiffle Duarte eif...@gm... Niterói, RJ, Brasil
ttconv/truetype.h needs an "#include <cstdio>", otherwise it does not compile with gcc 4.3. Keith
Dear all, I am building the 0.91.2 version on a Fedora 9. I have compiled this version on Fedora 8 earlier with no problem. However, this time the package failed to build. Here is the last lines from the output: gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fPIC -I/usr/local/include -I/usr/include -I. -I/usr/include/python2.5 -c ttconv/pprdrv_tt2.cpp -o build/temp.linux-i686-2.5/ttconv/pprdrv_tt2.o In file included from ttconv/pprdrv_tt2.cpp:40: ttconv/truetype.h:50: error: ISO C++ forbids declaration of 'FILE' with no type ttconv/truetype.h:50: error: expected ';' before '*' token error: command 'gcc' failed with exit status 1 The compilers I use are gcc 4.3.0 (with g++). Is there anything broken, or I'm missing something? Thanks in advance. Cong.
On Mon, May 19, 2008 at 10:26 PM, Rodney Haynie <RH...@co...> wrote: > Ok, I found the answer and just wanted to post it for the archives. Thanks Rodney -- when posting for the archives, be sure to reply to the original thread and not change the subject (eg adding "answer") since that will break threading in many news readers and hence may destroy the context for future googlers. Thanks for posting the answer -- if you have the time, consider writing a matplotlib cookook recipe for your webapp server at http://www.scipy.org/Cookbook/Matplotlib JDH