[Matplotlib-users] Continuously varying line colors?
I'm hoping to generate a line plot where the color of each pixel on the plot is given by linearly interpolating the colormap from each point specified in the line, instead of having the whole line be a solid color. I can "mock this up" by doing a scatter plot where the points are much closer together than the screen resolution, but that seems inelegant, and sometimes produces weird output. So is there a way to do effectively the same thing with a line plot or somehow specify this behavior in scatter? -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Continuously varying line colors?
Hi Erik, On Mon, May 4, 2009 at 09:22, Erik Tollerud wrote: > I'm hoping to generate a line plot where the color of each pixel on > the plot is given by linearly interpolating the colormap from each > point specified in the line, instead of having the whole line be a > solid color. I can "mock this up" by doing a scatter plot where the > points are much closer together than the screen resolution, but that > seems inelegant, and sometimes produces weird output. So is there a > way to do effectively the same thing with a line plot or somehow > specify this behavior in scatter? maybe this[1] could be of help? [1] http://www.scipy.org/Cookbook/Matplotlib/MulticoloredLine Cheers, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] I need all value on X(hours, minutes) label
Hi, I'm new with matplotlib. I need to make a graph with the X axis represents time in hours and minutes. My script don't works, I want to display all the values of time that I have. I use a list of string like this : t=['0015', '0030', '0045', '0100', '0115', '0130', '0145', '0200', '0215', '0230', '0245', '0300', '03 15', '0330', '0345', '0400', '0415', '0430', '0445', '0500', '0515', '0530', '0545', '0600', '0615', '0630', '0645', '0700', '0715', '0730', '0745', '0800', '0815', '0830', '0845', '0900', '0915', '09 30', '0945', '1000', '1015', '1030', '1045', '1100', '1115', '1130', '1145', '1200', '1215', '1230', '1245', '1300', '1315', '1330', '1345', '1400', '1415'] ax.plot(t, y) I tried to convert hours and minutes to the base 100 ( , it works but I can not show on the x-axis the hours, minutes. I tried to use plot_date, but I don't understand "x and/or y can be a sequence of dates represented as float days since 0001-01-01 UTC." Could you help me, please ? /olivier -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] mathtext and py2exe
Hi, Could you send your setup. I'm not expert but I can check it. /olivier -Original Message- From: sordnay [mailto:sord...@gmail.com] Sent: jeudi 30 avril 2009 18:23 To: matplotlib-users@lists.sourceforge.net Subject: [Matplotlib-users] mathtext and py2exe hello, I have written a program which uses matplotlib to plot some figures, it uses mathtext to add some special chars (basically just the square on acceleration units), and the program works just fine, but using py2exe to build a windows executable, it fails somewhere drawing that square symbol. The error the program yields is something like "unable to convert string to unicode". Has anyone experienced this kind of problem with mathtext and py2exe or has any clue what is needed to be included at the py2exe setup.py to fix it? I know this is not the best place for an answer, but I couldn't find where to get help on py2exe site :-/ so if anyone could help... Thanks a lot. -- View this message in context: http://www.nabble.com/mathtext-and-py2exe-tp23319691p23319691.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] mpl sphinx extension
Hello, why is the matplotlib.sphinxext.mathmpl been taken off the SVN repository: https://matplotlib.svn.sourceforge.net/svnroot/ matplotlib/trunk/matplotlib/doc/sphinxext/ I have been using it to parse formulas in my documentation source. It is still used by the Sphinx configuration from mpl svn: extensions = ['matplotlib.sphinxext.mathmpl', 'math_symbol_table', 'sphinx.ext.autodoc', 'matplotlib.sphinxext.only_directives', 'matplotlib.sphinxext.plot_directive', 'inheritance_diagram', 'gen_gallery', 'gen_rst'] Thanks in advance, Timmie -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] latex rendering weirdness
Hi, why is $\sum M_\theta$ rendered correctly, but $M_\theta$" is printed as "_\theta$"? Regards, wr -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Embed in GTK + dynamic plot
Hi John, On Sun, May 3, 2009 at 00:21, John Hunter wrote: > On Sat, May 2, 2009 at 9:42 AM, Sandro Tosi wrote: >> >> Hi all! >> I'd like to embed a mpl graph into a GTK application (and for that >> embedding_in_gtk*.py examples are fine) but I would also like to >> dynamically update the graph with time. > > >> >> Consider like if I want to plot some dynamic system information, like >> cpu usage, memory occupation, or so. Than I want to gather those info >> at 1 sec interval, and dynamically update the graph adding the new >> values. >> >> How can I do it? I'm stuck with the "update data as they come" part >> (please note I need for GTK embedded mpl code). > > The idioms in the examples/animations dir should be directly portable > to an embedded gtk app, eg simple_anim_gtk.py, > dynamic_image_gtkagg.py, etc. You will need to either use an idle > handle, a timeout handler, or a special event in the gtk event > handling framework to trigger an update to the data and draw. You can > extend the gobject signals to handle custom events (eg data arrives) > if you want to go this route, but since you are trying to illustrate > mpl more than gtk (I assume) you may want to go the easy route and use you assume right :) > the timeout or idle handler and just check and see if new data has > arrived and then update as necessary. yeah, I solved with "gobject.idle_add" >> PS: if there's someone that knows how to gather cpu percentage usage >> on a linux sys, please tell me :) It seems not that easy to find it >> out from google ;) > > http://tinyurl.com/d7lkga > > Sorry :-) Couldn't resist ehhe :) but you're right, I've expressed the question wrongly: I was searching some python module / binding :) > (less obnoxious answer > http://www.cyberciti.biz/tips/how-do-i-find-out-linux-cpu-utilization.html) At the end I used subprocess module to call sar Cheers, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] latex rendering weirdness
Hello, could you please provide a stand-alone example of what is failing and what version/ backend you are using? for me the following works (with mpl-0.98.6svn and backend 'GTKAgg'): text(0.25, 0.75, r"$M_\theta$") regards Matthias PS: You can access the used backend and the matplotlib version via: print matplotlib.get_backend() print matplotlib.__version__ On Monday 04 May 2009 17:20:51 Willi Richert wrote: > Hi, > > why is $\sum M_\theta$ rendered correctly, but $M_\theta$" is printed as > "_\theta$"? > > Regards, > wr -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] mpl sphinx extension
I believe that it is just moved to another directory (lib/matplotlib/sphinxext). http://www.nabble.com/Re%3A-Sphinx-custom-extension-mess%2C-and-patches-p22037746.html Regards, -JJ On Mon, May 4, 2009 at 11:02 AM, Timmie wrote: > Hello, > why is the matplotlib.sphinxext.mathmpl been taken off the SVN repository: > https://matplotlib.svn.sourceforge.net/svnroot/ > matplotlib/trunk/matplotlib/doc/sphinxext/ > > I have been using it to parse formulas in my documentation source. > > It is still used by the Sphinx configuration from mpl svn: > > extensions = ['matplotlib.sphinxext.mathmpl', 'math_symbol_table', > 'sphinx.ext.autodoc', 'matplotlib.sphinxext.only_directives', > 'matplotlib.sphinxext.plot_directive', 'inheritance_diagram', > 'gen_gallery', 'gen_rst'] > > Thanks in advance, > Timmie > > > -- > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Continuously varying line colors?
On Mon, May 4, 2009 at 2:22 AM, Erik Tollerud wrote: > I'm hoping to generate a line plot where the color of each pixel on > the plot is given by linearly interpolating the colormap from each > point specified in the line, instead of having the whole line be a > solid color. I can "mock this up" by doing a scatter plot where the > points are much closer together than the screen resolution, but that > seems inelegant, and sometimes produces weird output. So is there a > way to do effectively the same thing with a line plot or somehow > specify this behavior in scatter? IIRC, the backends that matplotlib uses (Gtk, Agg, etc.) only support a single color per line, so breaking up the line into different segments/points is really your only option. Instead of scatter, you can break up your line into separate sections and have them colormapped for you, using a LineCollection. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma Sent from Norman, Oklahoma, United States -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] numpy and lapack on linux
I need to distribute matplotlib as part of a large and somewhat heterogeneous package of Python-based software. On Macs, lapack is installed by default, and I can rely on the linking working regardless of which OS version it was compiled on (we use 10.4.11, but it runs fine on 10.5). On Linux, it's variable - the kernel 2.6-based OSes we use appear to have it, but not the older 2.4-based systems. For the older systems this is not a problem - it results in this: n...@linux2.4> ldd lapack_lite.so linux-gate.so.1 => (0xe000) libc.so.6 => /lib/libc.so.6 (0xf7d97000) /lib/ld-linux.so.2 (0x56555000) The lack of links to the full lapack module doesn't appear to break anything that I do - I'm just plotting simple lines and I don't use any of the numpy routines in my code. This is what happens on the newer systems: n...@linux2.6> ldd lapack_lite.so linux-gate.so.1 => (0xe000) liblapack.so.3 => not found libblas.so.3 => not found libg2c.so.0 => /usr/lib/libg2c.so.0 (0xf7fb6000) libm.so.6 => /lib/libm.so.6 (0xf7f8f000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xf7f82000) libc.so.6 => /lib/libc.so.6 (0xf7e45000) /lib/ld-linux.so.2 (0x56555000) This results in an import error on systems that *don't* have lapack3 installed. We would prefer to avoid having to tell our users to install more software in order to use what I've written. Is there any way to force numpy to *not* link to anything besides what it saw in the first example? I would prefer to avoid hacking into the numpy distutils scripts if possible. Sorry this isn't directly matplotlib-related, but I thought I'd see if someone here had encountered this problem before I subscribed to another list. thanks, Nat -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] numpy and lapack on linux
Hi, Just compile numpy on a system that doesn't have lapack3 installed. Matthieu 2009/5/4 Nathaniel Echols : > I need to distribute matplotlib as part of a large and somewhat > heterogeneous package of Python-based software. On Macs, lapack is > installed by default, and I can rely on the linking working regardless of > which OS version it was compiled on (we use 10.4.11, but it runs fine on > 10.5). On Linux, it's variable - the kernel 2.6-based OSes we use appear to > have it, but not the older 2.4-based systems. For the older systems this is > not a problem - it results in this: > > n...@linux2.4> ldd lapack_lite.so > linux-gate.so.1 => (0xe000) > libc.so.6 => /lib/libc.so.6 (0xf7d97000) > /lib/ld-linux.so.2 (0x56555000) > The lack of links to the full lapack module doesn't appear to break anything > that I do - I'm just plotting simple lines and I don't use any of the numpy > routines in my code. > This is what happens on the newer systems: > n...@linux2.6> ldd lapack_lite.so > linux-gate.so.1 => (0xe000) > liblapack.so.3 => not found > libblas.so.3 => not found > libg2c.so.0 => /usr/lib/libg2c.so.0 (0xf7fb6000) > libm.so.6 => /lib/libm.so.6 (0xf7f8f000) > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xf7f82000) > libc.so.6 => /lib/libc.so.6 (0xf7e45000) > /lib/ld-linux.so.2 (0x56555000) > This results in an import error on systems that *don't* have lapack3 > installed. We would prefer to avoid having to tell our users to install > more software in order to use what I've written. Is there any way to force > numpy to *not* link to anything besides what it saw in the first example? I > would prefer to avoid hacking into the numpy distutils scripts if possible. > Sorry this isn't directly matplotlib-related, but I thought I'd see if > someone here had encountered this problem before I subscribed to another > list. > thanks, > Nat > -- > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Information System Engineer, Ph.D. Website: http://matthieu-brucher.developpez.com/ Blogs: http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn: http://www.linkedin.com/in/matthieubrucher -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Fast imshow plotting
Eric and Thomas, Thanks for your help. I was able to get it plotting MUCH faster. Here's my code: #!/usr/bin/env python from pylab import * from scipy import * ion() img = standard_normal((50,100)) image = imshow(img,interpolation='nearest',animated=True,label="blah") for k in range(1,100): img = standard_normal((100,100)) image.set_data(img) draw() Thanks again. -Joey On Sat, May 2, 2009 at 1:27 PM, Eric Firing wrote: > Thomas Robitaille wrote: > >> Not sure if this will help, but maybe you can do something like this? >> >> --- >> #!/usr/bin/env python >> >> from pylab import * >> from scipy import * >> > > To run this as a standalone script, without ipython -pylab, you need to > include: > > ion() > > >> img = standard_normal((40,40)) >> image = imshow(img,interpolation='nearest',animated=True,label="blah") >> >> for k in range(1,1): >> img = standard_normal((40,40)) >> image.set_data(img) >> show() >> > > show() should never be called more than once for a given figure; what you > want here is draw(). > > Eric > > > > --- >> >> Note, interpolation='nearest' can be faster than interpolation=None if >> your default interpolation is set to bicubic (which it probably is) >> >> Does this speed things up? >> >> Thomas >> >> On May 1, 2009, at 3:31 PM, Joey Wilson wrote: >> >> I am creating a script that generates images and displays them to the >>> screen in real time. I created the following simple script: >>> >>> __ >>> >>> #!/usr/bin/env python >>> >>> from pylab import * >>> from scipy import * >>> >>> for k in range(1,1): >>>img = standard_normal((40,40)) >>>imshow(img,interpolation=None,animated=True,label="blah") >>>clf() >>>show() >>> >>> __ >>> >>> Now, this script plots the image too slowly. I am forced to use the >>> clf() function so that it doesn't slow down at each iteration of the for >>> loop. Is there a way that I can plot this simple image faster? What's the >>> best way to get imshow() to plot quickly? Thanks for your help. >>> >>> -Joey >>> >>> >>> -- >>> Register Now & Save for Velocity, the Web Performance & Operations >>> Conference from O'Reilly Media. Velocity features a full day of >>> expert-led, hands-on workshops and two days of sessions from industry >>> leaders in dedicated Performance & Operations tracks. Use code vel09scf >>> and Save an extra 15% before 5/3. >>> http://p.sf.net/sfu/velocityconf___ >>> Matplotlib-users mailing list >>> Matplotlib-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >> >> >> >> -- >> Register Now & Save for Velocity, the Web Performance & Operations >> Conference from O'Reilly Media. Velocity features a full day of expert-led, >> hands-on workshops and two days of sessions from industry leaders in >> dedicated Performance & Operations tracks. Use code vel09scf and Save an >> extra 15% before 5/3. http://p.sf.net/sfu/velocityconf >> ___ >> Matplotlib-users mailing list >> Matplotlib-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] numpy and lapack on linux
On Mon, May 4, 2009 at 10:50 AM, Matthieu Brucher < matthieu.bruc...@gmail.com> wrote: > Just compile numpy on a system that doesn't have lapack3 installed. > Unfortunately, this is going to be difficult - our build process is very automated (done every night) and we use these systems for other things too, so I'm very reluctant to tinker with the installed software, and I doubt we have spare boxes with suitable hardware. I will talk to our admin but my guess is he'll say the same thing. thanks, Nat -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Basemap - plot on a polar figure
Hello, Is it possible to have basemap plot in the usual way on a polar-projection subplot? I want to do something like this: fig = plt.figure(figsize) ax = fig.add_subplot(111, polar=True) m = Basemap(...) m.drawcoastlines(...) etc. The reason I want to have a polar-projection plot is because I want to add concentric circles to the subplot using rgrids. Thanks, jtamir -- View this message in context: http://www.nabble.com/Basemap---plot-on-a-polar-figure-tp23377500p23377500.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Basemap - plot on a polar figure
jtamir wrote: > Hello, > > Is it possible to have basemap plot in the usual way on a polar-projection > subplot? > No. > I want to do something like this: > fig = plt.figure(figsize) > ax = fig.add_subplot(111, polar=True) > m = Basemap(...) > m.drawcoastlines(...) > etc. > > The reason I want to have a polar-projection plot is because I want to add > concentric circles to the subplot using rgrids. > > Thanks, > > jtamir > You can draw lines of latitude with the drawparallels method - these are concentric circles on a polar projection. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX: (303)497-6449 NOAA/OAR/PSD R/PSD1Email : jeffrey.s.whita...@noaa.gov 325 BroadwayOffice : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] how to center a legend
The docs http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.legend suggest that loc=(0.5,0.5) is equivalent to loc='center' but it is not. How can I center the legend relative to the x-axis? It seems to me that I need to be able to set not only the coordinates but also what part of the legend box is placed at those coordinates. (Along the lines of LaTeX box placement.) Can I do that? Thanks, Alan Isaac -- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] how to center a legend
On Mon, May 4, 2009 at 10:47 PM, Alan G Isaac wrote: > The docs > http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.legend > suggest that > loc=(0.5,0.5) > is equivalent to > loc='center' > but it is not. How can I center the legend > relative to the x-axis? > As you may have noticed, loc with a tuple of two floats is interpreted as a coordinate for the lower-left corner. > It seems to me that I need to be able to set > not only the coordinates but also what part > of the legend box is placed at those coordinates. > (Along the lines of LaTeX box placement.) > Can I do that? > You can, but with mpl from svn trunk. For example, legend(bbox_to_anchor=(0.5, 0.5), loc="center") For some more details, take a look at the link below, which is my work-in-progress legend guide. http://dl.getdropbox.com/u/178748/mpl/legend_guid/html/legend.html#legend-location Regards, -JJ > Thanks, > Alan Isaac > > -- > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users