You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
1
(2) |
2
(5) |
3
(8) |
4
(6) |
5
(9) |
6
(7) |
7
(6) |
8
(10) |
9
(27) |
10
(7) |
11
(22) |
12
(13) |
13
(7) |
14
(4) |
15
(12) |
16
(32) |
17
(26) |
18
(14) |
19
(1) |
20
(11) |
21
(6) |
22
(11) |
23
(17) |
24
(18) |
25
(28) |
26
(11) |
27
(6) |
28
(1) |
29
(10) |
30
(12) |
|
|
|
|
Hi Tony, Thank you for the reply, the solutions you propose are fine in this case. But I'm trying to use the polar plot as a smith chart for an instrument and there i will receive data that is unknown but can be something like this: r = np.transpose(.1+np.arange ( 0 , 0.7 , 0.001)) theta = -4.5 * np.pi *r freq = r*10e9 data = np.multiply(r,np.exp(1j*theta)) ax.plot(angle(data),abs(data)) Any idea why Polar plot can't handle theta going from negative to positive radians? Jan Tony S Yu wrote: > > On Sep 17, 2008, at 1:59 AM, jan gillis wrote: > >> Hello, >> >> I have a problem with polar plot, if i run the following code in >> matplotlib 0.98.3, polar plot is drawing a extra circle to go from >> angle -3.14159265 to angle 3.03753126. Is there a solution for this >> problem? >> >> ******************** >> import numpy as np >> from matplotlib.pyplot import figure, show, rc, grid >> >> # radar green, solid grid lines >> rc('grid', color='#316931', linewidth=1, linestyle='-') >> rc('xtick', labelsize=15) >> rc('ytick', labelsize=15) >> >> # force square figure and square axes looks better for polar, IMO >> fig = figure(figsize=(8,8)) >> ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True, axisbg='#d5de9c') >> >> z = np.zeros((1,2000),complex) >> z.real = 0.2 >> z.imag = np.arange(-50,50,0.05) >> gamma_r = np.transpose((z-1)/(z+1)) >> >> ax.plot(np.angle(gamma_r), np.abs(gamma_r), '.-', zorder=0) > > Hi Jan, > > It looks like you get the circle because the angles you're plotting go > from negative to positive radians in a weird way. The circle being > drawn starts around 0 radians and goes clockwise by negative values. > Then when it gets to - pi, it switches to positive indices, i.e. pi. > Of course, these are the same points on a polar plot, but different > angles, if you want to be consistent. > > Here are a couple of quick solutions, but there but there maybe better > ways of handling this. > > # ~~~~~~~~~~~~~~~~~~ > # get rid of the plot line above, and add the following > theta = np.angle(gamma_r) > mag = np.abs(gamma_r) > > # option 1 > ordered = np.argsort(theta, axis=0).squeeze() > ax.plot(theta[ordered], mag[ordered], '.-', zorder=0) > > # option 2 > neg_theta = np.where(theta < 0) > theta[neg_theta] += 2 * np.pi > ax.plot(theta, mag, '.-', zorder=0) > # ~~~~~~~~~~~~~~~~~~ > > I hope that's helpful, > -Tony > >> >> ax.set_rmax(2.0) >> grid(True) >> >> show() >> >> ******************** >> Kind regards, >> Jean >> >> >> ------------------------------------------------------------------------- >> >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win >> great prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Recently I noticed that the quiver plots all make the arrows as if the plot had aspect ratio 1. See, for example, the documentation for quiver: In all cases the arrow aspect ratio is 1, so that if *U*==*V* the angle of the arrow on the plot is 45 degrees CCW from the *x*-axis. This seems to make the plot pretty useless if the aspect ratio is not 1, since then the slopes of the arrows do not match up with the coordinate axes. What is the reason for this design decision? Does it have to do with the arrows distorting if the aspect ratio is not 1? At one time, there was talk of adding a line version of quiver (as opposed to the patch version there now). See http://article.gmane.org/gmane.comp.python.matplotlib.devel/1885. Has that happened? I suppose a line version would allow different aspect ratios. Is there an easy way to get a correct quiver plot (i.e., correct slopes) now if the aspect ratio is not 1? Thanks, Jason
Adjusting a physical size of the axes is a bit tricky in matplotlib, as the axes has an fixed position in normalized figure coordinate. But, I guess setting the axes aspect ratio in physical size is doable relatively easily, at least if your x,y axis are in linear scales. For example, if you want a square axes, set the aspect as the inverse of your data aspect (ratio). ax.set_aspect(1./ax.get_data_ratio()) As you see, you need to reset the aspect whenever your data limit changes. IHTH, -JJ On Wed, Sep 17, 2008 at 2:41 PM, Erik Tollerud <eri...@gm...> wrote: > I would like to ensure that the axes on a plot I'm making are square > in the sense of how the axes appear in the figure. I tried using > ax.set_aspect(1) , but that squares the axes in data coordinates, > rather than in figure coordinates. So aside from generating a figure > that is always square (which doesn't always work anyway if, for > example, I want a colorbar), how can I force the axes to be a > particular axis ratio in coordinates of physical size on the page? > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
import matplotlib.pyplot as plt import matplotlib.patches as mpatches xy = 0.3, 0.3, width, height = 0.2, 0.5 p = mpatches.Rectangle(xy, width, height, facecolor="orange", edgecolor="red") plt.gca().add_patch(p) plt.draw() A Rectangle is a patch class and (although I'm not sure) I don't think there is a helper function to easily create a patch object in the pyplot level. To draw a Rectangle (or any patch object), you need to import matplotlib.patches module, create a patch object and add it to your axes (add_patch method). The doc says that hatch is only supported in ps backend. Check the set_hatch method. Regards, -JJ On Wed, Sep 17, 2008 at 1:06 PM, Ryan Pavlovicz <pa...@gm...> wrote: > Hi. I'd like to add a filled area on my graph to denote the standard > deviation from an average. Additionally, i'd prefer the fill to be a > diagonal hatch. Reading online, i found that there is a 'Rectangle' class, > but i can't get this to work. Can someone suggest a good way to get the > results i'm looking for? Thanks! > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
I'm having trouble plotting data with NaN values. My plot has lines and markers and usually both are skipped for NaN values. But when I have more than 127 data a line is drawn from the last non-NaN to the next. I read somewhere about a similar issue (maybe here? sorry I can't find it just now), it seems like it has to do with some optimization performed for large datasets and the use if lineto instead of moveto or something like that. It was supposed to be fixed in 0.98.2 but I'm using 0.98.3 from Benjamin Drung's PPA (http://ppa.launchpad.net/bdrung). This code shows the difference between plotting 127 and 128 data (look at the left of each figure): import pylab as pl x = pl.random(128) x[4:7] = pl.NaN y = x[:-1] pl.figure(1) pl.plot(x, '-o') pl.grid(True) pl.figure(2) pl.plot(y, '-o') pl.grid(True) pl.show() Is this a known issue? Is there any workaround? Thanks Goyo
On Wed, Sep 17, 2008 at 12:55:40PM -0700, Ted Drain wrote: > I agree completely - I was just pointing that it is possible. I think what > people might not be aware of is that it's really an all or nothing > proposition. You either jump in completely and pay the large cost to handle > this in a maintainable, scalable way or don't do it at all. All of the > "quick and easy" solutions have too many problems and aren't really > maintainable. Here is my (easy and maintainable) way to handle the versions for my graphics: * I write the data creation in a python script * I write the creation of the mpl graphics in a script (most the same) * I manage these python file with a version-system (eg mercurial) So I have different versions for my mpl graphics and I can modify the graphic any time (with a new python run). If the data creation takes too long, I could save the data in an extra file (eg pickle file) and versioning the pickled file. So I dont need an extra way to reedit a mpl graphic. By, Friedrich
Josef, I too have been interested in such a feature for matplotlib and have made some (albeit lame) stabs at finding a solution. I started a project on google code that has some very limited capacity to save line plots and the necessary data arrays from matplotlib into an hdf5 file for later processing. It is by no means a complete solution but may serve as a VERY rough model to add this functionality. It was my hope that if you could capture the underlying keyword arguments necessary to recreate a plot then you might be able to simply recreate the original figure assuming the correct interpreter functions are established. Anyway, if you are interested please take a look to see if there may be something useful. From the perspective of the IPython users out there, a question to you: is there a good way to do achieve this feature with some of the logging commands? http://code.google.com/p/subplot/ Cheers, Brian -ps excuse the name of the project--I lacked creative drive at the time of naming. --- On Tue, 9/16/08, John Hunter <jd...@gm...> wrote: From: John Hunter <jd...@gm...> Subject: Re: [Matplotlib-users] save or pickle figure object To: "Josef Koller" <jk...@la...> Cc: mat...@li... Date: Tuesday, September 16, 2008, 7:49 PM On Tue, Sep 16, 2008 at 5:06 PM, Josef Koller <jk...@la...> wrote: > Hi folks, > I would like to save preliminary figures for later processing and > refinement with matplotlib. Is there a way to save or pickle a figure > object and later reload it. Matlab has a feature like that and and I was > wondering if matplotlib has it too. No, it doesn't exist. We've taken a stab at it once or twice, but have been stymied because we make extensive use of a python extension libray CXX, and these objects have resisted our attempts to pickle them. With our recent transforms refactoring, which removes the hairiest CXX dependency, it may be worth taking another look, but noone is currently working on it. JDH ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users
I agree completely - I was just pointing that it is possible. I think what people might not be aware of is that it's really an all or nothing proposition. You either jump in completely and pay the large cost to handle this in a maintainable, scalable way or don't do it at all. All of the "quick and easy" solutions have too many problems and aren't really maintainable. Ted > -----Original Message----- > From: Eric Firing [mailto:ef...@ha...] > Sent: Wednesday, September 17, 2008 12:01 PM > To: Ted Drain > Cc: mat...@li... > Subject: Re: [Matplotlib-users] save or pickle figure object > > Ted Drain wrote: > > We have some experience maintaining persistent object storage over > long > > periods of time. The best solution we've found is to do something > like > > this: > > > > - create a read/write method on each class. Every class that needs > to be > > stored must have this. This includes class you would store (eg > Figure) and > > things that are member variables of those classes. > > > > - Each class stores a version number along with it's data which > represents > > the version of the persistent representation for that class. So each > class > > has its own, internal versioning scheme that represents a specific > set of > > variables with specific types. > > > > - The read method on each class must check the version number and > then read > > the appropriate data for that version of itself. Whenever the > persistent > > representation of the class changes (usually if the member variables > > change), you increment the version number. Implicit in this is that > if you > > change the member variables of a class, the class read method must be > able > > to convert the variables that existed in the older version of itself > into > > the new member variables (since that's what the new methods on that > class > > will be using) > > > > FYI It is possible to use pickle to do this but you can't rely on > pickle to > > automatically save the member dictionary. You need to implement > > __getstate__ and __setstate__ and have them incorporate a version > number in > > the dictionary they return. In addition, you shouldn't blindly save > every > > member variable. If member variables can be constructed in terms of > other > > data, it may be better to store that data and then reconstruct the > member > > variables in the __setstate__ method. > > > > Using this type of system, you get a hierarchy of objects that each > have > > their own, internal versioning system. This lets you make changes to > a > > single class, increment it's version, and update its save/load > methods and > > it won't affect any other part of the system and still retains > backwards > > reading capability. > > > > Ted > > Sounds good--for some applications--but I would strongly oppose adding > this additional level of complexity to mpl. It's just not worth it. > If > you want to be able to work with a plot, then generate it with a > script, > and save the data and the script. That is the user's responsibility, > not mpl's. > > Unless mpl is taken over by a cadre of full-time professional > programmers, we have to try to keep it accessible to people who can > only > work on it sporadically. That means we need to try to keep it > simple--indeed, to work on simplifying it and cleaning up the rough > edges, and to work on maintaining a design that makes it easy to > improve > the real plotting capabilities and ease-of-use. > > Eric > > > > > >> -----Original Message----- > >> From: mat...@li... > >> [mailto:mat...@li...] On Behalf Of > >> Eric Firing > >> Sent: Tuesday, September 16, 2008 7:04 PM > >> To: John Hunter > >> Cc: Josef Koller; mat...@li... > >> Subject: Re: [Matplotlib-users] save or pickle figure object > >> > >> John Hunter wrote: > >>> On Tue, Sep 16, 2008 at 5:06 PM, Josef Koller <jk...@la...> > >> wrote: > >>>> Hi folks, > >>>> I would like to save preliminary figures for later processing and > >>>> refinement with matplotlib. Is there a way to save or pickle a > >> figure > >>>> object and later reload it. Matlab has a feature like that and and > I > >> was > >>>> wondering if matplotlib has it too. > >>> No, it doesn't exist. We've taken a stab at it once or twice, but > >>> have been stymied because we make extensive use of a python > extension > >>> libray CXX, and these objects have resisted our attempts to pickle > >>> them. With our recent transforms refactoring, which removes the > >>> hairiest CXX dependency, it may be worth taking another look, but > >>> noone is currently working on it. > >> My sense, based on very little experience, is that pickles of > >> complicated objects are very fragile, so even if we could pickle > >> figures, I fear it might cause more trouble ("I can't load this > >> absolutely critical figure I pickled 6 months ago") than it would be > >> worth. > >> > >> Eric > >> > >> -------------------------------------------------------------------- > --- > >> -- > >> This SF.Net email is sponsored by the Moblin Your Move Developer's > >> challenge > >> Build the coolest Linux based applications with Moblin SDK & win > great > >> prizes > >> Grand prize is a trip for two to an Open Source event anywhere in > the > >> world > >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ > >> _______________________________________________ > >> Matplotlib-users mailing list > >> Mat...@li... > >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >> Checked by AVG - http://www.avg.com > >> Version: 8.0.169 / Virus Database: 270.6.21/1674 - Release Date: > >> 9/16/2008 8:15 AM > > > > > > --------------------------------------------------------------------- > ---- > > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > > Build the coolest Linux based applications with Moblin SDK & win > great prizes > > Grand prize is a trip for two to an Open Source event anywhere in the > world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Ted Drain wrote: > We have some experience maintaining persistent object storage over long > periods of time. The best solution we've found is to do something like > this: > > - create a read/write method on each class. Every class that needs to be > stored must have this. This includes class you would store (eg Figure) and > things that are member variables of those classes. > > - Each class stores a version number along with it's data which represents > the version of the persistent representation for that class. So each class > has its own, internal versioning scheme that represents a specific set of > variables with specific types. > > - The read method on each class must check the version number and then read > the appropriate data for that version of itself. Whenever the persistent > representation of the class changes (usually if the member variables > change), you increment the version number. Implicit in this is that if you > change the member variables of a class, the class read method must be able > to convert the variables that existed in the older version of itself into > the new member variables (since that's what the new methods on that class > will be using) > > FYI It is possible to use pickle to do this but you can't rely on pickle to > automatically save the member dictionary. You need to implement > __getstate__ and __setstate__ and have them incorporate a version number in > the dictionary they return. In addition, you shouldn't blindly save every > member variable. If member variables can be constructed in terms of other > data, it may be better to store that data and then reconstruct the member > variables in the __setstate__ method. > > Using this type of system, you get a hierarchy of objects that each have > their own, internal versioning system. This lets you make changes to a > single class, increment it's version, and update its save/load methods and > it won't affect any other part of the system and still retains backwards > reading capability. > > Ted Sounds good--for some applications--but I would strongly oppose adding this additional level of complexity to mpl. It's just not worth it. If you want to be able to work with a plot, then generate it with a script, and save the data and the script. That is the user's responsibility, not mpl's. Unless mpl is taken over by a cadre of full-time professional programmers, we have to try to keep it accessible to people who can only work on it sporadically. That means we need to try to keep it simple--indeed, to work on simplifying it and cleaning up the rough edges, and to work on maintaining a design that makes it easy to improve the real plotting capabilities and ease-of-use. Eric > >> -----Original Message----- >> From: mat...@li... >> [mailto:mat...@li...] On Behalf Of >> Eric Firing >> Sent: Tuesday, September 16, 2008 7:04 PM >> To: John Hunter >> Cc: Josef Koller; mat...@li... >> Subject: Re: [Matplotlib-users] save or pickle figure object >> >> John Hunter wrote: >>> On Tue, Sep 16, 2008 at 5:06 PM, Josef Koller <jk...@la...> >> wrote: >>>> Hi folks, >>>> I would like to save preliminary figures for later processing and >>>> refinement with matplotlib. Is there a way to save or pickle a >> figure >>>> object and later reload it. Matlab has a feature like that and and I >> was >>>> wondering if matplotlib has it too. >>> No, it doesn't exist. We've taken a stab at it once or twice, but >>> have been stymied because we make extensive use of a python extension >>> libray CXX, and these objects have resisted our attempts to pickle >>> them. With our recent transforms refactoring, which removes the >>> hairiest CXX dependency, it may be worth taking another look, but >>> noone is currently working on it. >> My sense, based on very little experience, is that pickles of >> complicated objects are very fragile, so even if we could pickle >> figures, I fear it might cause more trouble ("I can't load this >> absolutely critical figure I pickled 6 months ago") than it would be >> worth. >> >> Eric >> >> ----------------------------------------------------------------------- >> -- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> Checked by AVG - http://www.avg.com >> Version: 8.0.169 / Virus Database: 270.6.21/1674 - Release Date: >> 9/16/2008 8:15 AM > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
I would like to ensure that the axes on a plot I'm making are square in the sense of how the axes appear in the figure. I tried using ax.set_aspect(1) , but that squares the axes in data coordinates, rather than in figure coordinates. So aside from generating a figure that is always square (which doesn't always work anyway if, for example, I want a colorbar), how can I force the axes to be a particular axis ratio in coordinates of physical size on the page?
Hi. I'd like to add a filled area on my graph to denote the standard deviation from an average. Additionally, i'd prefer the fill to be a diagonal hatch. Reading online, i found that there is a 'Rectangle' class, but i can't get this to work. Can someone suggest a good way to get the results i'm looking for? Thanks!
John Hunter wrote: > On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jd...@gm...> wrote: > > >> Attached is a screenshot (zoom.png) from the gimp, zoomed in near the >> axes border. The black horizontal line is the top axes border, the >> horizontal grey line is the artifact, the vertical dashed line is a >> grid line. I don't know if this offers a clue, but if you look at a >> zoom in the upper right corner, the grey line seems to break up and >> curve down and to the right (corner.png) >> > > Sorry, screwed up corner.png (I attached the original and not the > screenshot). The correct screenshot is attached > > > John: OK, now I finally see it. Antoine: Do these artifacts disappear if you comment out the imshow call? -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
On Wed, Sep 17, 2008 at 11:54 AM, John Hunter <jd...@gm...> wrote: > Attached is a screenshot (zoom.png) from the gimp, zoomed in near the > axes border. The black horizontal line is the top axes border, the > horizontal grey line is the artifact, the vertical dashed line is a > grid line. I don't know if this offers a clue, but if you look at a > zoom in the upper right corner, the grey line seems to break up and > curve down and to the right (corner.png) Sorry, screwed up corner.png (I attached the original and not the screenshot). The correct screenshot is attached
On Wed, Sep 17, 2008 at 11:48 AM, Jeff Whitaker <js...@fa...> wrote: > John: Well, you're eyes are better than mine. I still can't see it. No > idea why it might be there either. Attached is a screenshot (zoom.png) from the gimp, zoomed in near the axes border. The black horizontal line is the top axes border, the horizontal grey line is the artifact, the vertical dashed line is a grid line. I don't know if this offers a clue, but if you look at a zoom in the upper right corner, the grey line seems to break up and curve down and to the right (corner.png)
John Hunter wrote: > On Wed, Sep 17, 2008 at 11:08 AM, Jeff Whitaker <js...@fa...> wrote: > >> De Pauw Antoine wrote: >> >>> Jeff, >>> >>> I finally managed to obtain a neat image with imshow and griddata >>> >>> The code snippet is here: >>> http://snipplr.com/view/8307/map-plotting-python-code-temporary/ >>> >>> The only problem I have is now a grey line surrounding the plot, as you can >>> see in this low-res sample: >>> http://www.kirikoo.net/images/5shrad-20080917-151205.png >>> >>> >> Antoine: Sorry, but I don't see it. >> > > There is a very faint horizontal grey line at the top and bottom of > the plot, just inside the axes border. I think this is what he is > referring to. > > JDH > John: Well, you're eyes are better than mine. I still can't see it. No idea why it might be there either. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
On Wed, Sep 17, 2008 at 11:08 AM, Jeff Whitaker <js...@fa...> wrote: > De Pauw Antoine wrote: >> Jeff, >> >> I finally managed to obtain a neat image with imshow and griddata >> >> The code snippet is here: >> http://snipplr.com/view/8307/map-plotting-python-code-temporary/ >> >> The only problem I have is now a grey line surrounding the plot, as you can >> see in this low-res sample: >> http://www.kirikoo.net/images/5shrad-20080917-151205.png >> > > Antoine: Sorry, but I don't see it. There is a very faint horizontal grey line at the top and bottom of the plot, just inside the axes border. I think this is what he is referring to. JDH
I believe that "set" function in matplotlib has been deprecated (because "set" is now python builtin). Instead, you have to use "setp". Setting "xticks" (or "yticks") changes the tick locations. If you're trying to turn off only the labels, you may use use setp(gca().get_yticklabels(), visible=False) IHTH, -JJ 2008年9月17日 Nicholas Stephens <Nic...@un...>: > Hi all, > > Actually this is more like two problems :-) > > I am trying to turn off the yaxis labels on the right hand side figure > generated via subplot. After some trial and error it seems that I should be > able to change these settings using the set command. For example you should > be bale to do the following > > plot([1,2,3,4], [1,4,9,16]) > set(gca(), 'xticks', [1,2,3,4]) > > as per the ipython instructions. However I have a complaint about the number > of arguements (see below). This has been tried in a variety of ways, apart > from a way that actually works. > > In [1]: plot([1,2,3,4], [1,4,9,16]) > Out[1]: [<matplotlib.lines.Line2D instance at 0x8a490ac>] > > In [2]: set(gca(), 'xticks', [1,2,3,4]) > --------------------------------------------------------------------------- > <type 'exceptions.TypeError'> Traceback (most recent call last) > > /home/stephens/Fe_profiles/20yr_SS_BATS/<ipython console> in <module>() > > <type 'exceptions.TypeError'>: set expected at most 1 arguments, got 3 > > > So i)does anybody know of an easy (/sucessful) way of turning off the rhs > yaxis labels and ii) does anybody know why I am apparently having issues > with putting more than one argument in the set command when, according to > the help instructions, it should be possible. > > thanks in advance, > > nick stephens > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
On Sep 17, 2008, at 1:59 AM, jan gillis wrote: > Hello, > > I have a problem with polar plot, if i run the following code in > matplotlib 0.98.3, polar plot is drawing a extra circle to go from > angle -3.14159265 to angle 3.03753126. Is there a solution for this > problem? > > ******************** > import numpy as np > from matplotlib.pyplot import figure, show, rc, grid > > # radar green, solid grid lines > rc('grid', color='#316931', linewidth=1, linestyle='-') > rc('xtick', labelsize=15) > rc('ytick', labelsize=15) > > # force square figure and square axes looks better for polar, IMO > fig = figure(figsize=(8,8)) > ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True, axisbg='#d5de9c') > > z = np.zeros((1,2000),complex) > z.real = 0.2 > z.imag = np.arange(-50,50,0.05) > gamma_r = np.transpose((z-1)/(z+1)) > > ax.plot(np.angle(gamma_r), np.abs(gamma_r), '.-', zorder=0) Hi Jan, It looks like you get the circle because the angles you're plotting go from negative to positive radians in a weird way. The circle being drawn starts around 0 radians and goes clockwise by negative values. Then when it gets to - pi, it switches to positive indices, i.e. pi. Of course, these are the same points on a polar plot, but different angles, if you want to be consistent. Here are a couple of quick solutions, but there but there maybe better ways of handling this. # ~~~~~~~~~~~~~~~~~~ # get rid of the plot line above, and add the following theta = np.angle(gamma_r) mag = np.abs(gamma_r) # option 1 ordered = np.argsort(theta, axis=0).squeeze() ax.plot(theta[ordered], mag[ordered], '.-', zorder=0) # option 2 neg_theta = np.where(theta < 0) theta[neg_theta] += 2 * np.pi ax.plot(theta, mag, '.-', zorder=0) # ~~~~~~~~~~~~~~~~~~ I hope that's helpful, -Tony > > ax.set_rmax(2.0) > grid(True) > > show() > > ******************** > Kind regards, > Jean > > -- > Jan Gillis > Ghent University > IMEC vzw - INTEC > Sint-Pietersnieuwstraat 41 > B-9000 Gent > Belgium > tel. +32 9 264 33 33 > jan...@in... > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
De Pauw Antoine wrote: > Jeff, > > I finally managed to obtain a neat image with imshow and griddata > > The code snippet is here: > http://snipplr.com/view/8307/map-plotting-python-code-temporary/ > > The only problem I have is now a grey line surrounding the plot, as you can > see in this low-res sample: > http://www.kirikoo.net/images/5shrad-20080917-151205.png > Antoine: Sorry, but I don't see it. > I have added zero-value points at the corners of the map, thinking that > interpolation simply didn't do its job between the points because of a lack > of data, but it's still the same > > The masked array has been replaced with a "replace by zero if superior to > -1.2" thing as the border was surrounding masked zone as well > > Is there a border to imshow? No. -Jeff > If yes, how to remove it? > > Also, I tried with aspect='auto' as it seemed to be there for that, but > still no progress > > Thanks for the tips and have a nice evening! > > Antoine De Pauw > Collaborateur de recherches, Informatique - Research collaborator, IT > Laboratoire de chimie quantique et photophysique - Quantum chemistry and > photophysics laboratory > Université Libre de Bruxelles - ULB > > > -----Original Message----- > From: Jeff Whitaker [mailto:js...@fa...] > Sent: mercredi 17 septembre 2008 13:40 > To: De Pauw Antoine > Cc: 'John Hunter'; 'Eric Firing'; 'Matplotlib Users' > Subject: Re: [Matplotlib-users] Information request > > De Pauw Antoine wrote: > >> Hi John, >> >> I used your example with the missing .ax to modify these font sizes and it >> works nicely >> >> Anyway, by investigation, I found that there is no way of interpolation >> using scattered data >> >> I tried to figure out how to grid my values and use imshow or pcolor, but >> with no success yet.. >> >> Could you explain me how I could do to grid, for example, that data: >> >> Lat[] (double array containing latitudes) >> Lon[] (double array containing longitudes) >> Val[] (double array containing values) >> >> Each of the arrays having the same size, and Val[1] has latitude Lat[1] >> > and > >> longitude Lon[1], and so on, and the coordinates are completely unordered >> >> When I try to use griddata and use imshow or pcolor with the output array, >> my figure is blank >> >> A simple example or guideline would do, I guess, as I've already gained a >> good knowledge of the language >> >> Thanks in advance >> >> PS: Here's the code snippet: >> http://snipplr.com/view/8307/map-plotting-python-code-temporary/ >> >> >> Antoine De Pauw >> Collaborateur de recherches, Informatique - Research collaborator, IT >> Laboratoire de chimie quantique et photophysique - Quantum chemistry and >> photophysics laboratory >> Université Libre de Bruxelles - ULB >> >> > > Antoine: Griddata should work fine. Your code snippet does not try to > use griddata, so I can't guess what is wrong. Let me suggest again - > please post complete, self-contained examples that demonstrate your > problem. > > Did you look at the griddata_demo.py example? > > -Jeff > > >> -----Original Message----- >> From: John Hunter [mailto:jd...@gm...] >> Sent: mercredi 17 septembre 2008 13:00 >> To: De Pauw Antoine >> Cc: Eric Firing; Jeff Whitaker; Matplotlib Users >> Subject: Re: [Matplotlib-users] Information request >> >> On Wed, Sep 17, 2008 at 3:28 AM, De Pauw Antoine <and...@ul...> >> > wrote: > >> >> >>> The image generated is here: >>> http://www.kirikoo.net/images/5shrad-20080917-102544.png >>> >>> Also, I couldn't find any way to reduce the colorbar font size >>> >>> >> The colorbar method returns a matplotlib.colorbar.Colorbar instance, >> which has matplotlib.axes.Axes instance stored as an attribute. Thus >> you can do: >> >> cb = colorbar(something....) >> >> for t in cb.get_yticklabels(): >> t.set_fontsize(10) >> >> Eric: when you get some time, could you add docstrings to colorbar >> which document the publicly accessible attributes? >> >> JDH >> >> >> > > > -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
Hi all, Actually this is more like two problems :-) I am trying to turn off the yaxis labels on the right hand side figure generated via subplot. After some trial and error it seems that I should be able to change these settings using the set command. For example you should be bale to do the following plot([1,2,3,4], [1,4,9,16]) set(gca(), 'xticks', [1,2,3,4]) as per the ipython instructions. However I have a complaint about the number of arguements (see below). This has been tried in a variety of ways, apart from a way that actually works. In [1]: plot([1,2,3,4], [1,4,9,16]) Out[1]: [<matplotlib.lines.Line2D instance at 0x8a490ac>] In [2]: set(gca(), 'xticks', [1,2,3,4]) --------------------------------------------------------------------------- <type 'exceptions.TypeError'> Traceback (most recent call last) /home/stephens/Fe_profiles/20yr_SS_BATS/<ipython console> in <module>() <type 'exceptions.TypeError'>: set expected at most 1 arguments, got 3 So i)does anybody know of an easy (/sucessful) way of turning off the rhs yaxis labels and ii) does anybody know why I am apparently having issues with putting more than one argument in the set command when, according to the help instructions, it should be possible. thanks in advance, nick stephens
Jeff, I finally managed to obtain a neat image with imshow and griddata The code snippet is here: http://snipplr.com/view/8307/map-plotting-python-code-temporary/ The only problem I have is now a grey line surrounding the plot, as you can see in this low-res sample: http://www.kirikoo.net/images/5shrad-20080917-151205.png I have added zero-value points at the corners of the map, thinking that interpolation simply didn't do its job between the points because of a lack of data, but it's still the same The masked array has been replaced with a "replace by zero if superior to -1.2" thing as the border was surrounding masked zone as well Is there a border to imshow? If yes, how to remove it? Also, I tried with aspect='auto' as it seemed to be there for that, but still no progress Thanks for the tips and have a nice evening! Antoine De Pauw Collaborateur de recherches, Informatique - Research collaborator, IT Laboratoire de chimie quantique et photophysique - Quantum chemistry and photophysics laboratory Université Libre de Bruxelles - ULB -----Original Message----- From: Jeff Whitaker [mailto:js...@fa...] Sent: mercredi 17 septembre 2008 13:40 To: De Pauw Antoine Cc: 'John Hunter'; 'Eric Firing'; 'Matplotlib Users' Subject: Re: [Matplotlib-users] Information request De Pauw Antoine wrote: > Hi John, > > I used your example with the missing .ax to modify these font sizes and it > works nicely > > Anyway, by investigation, I found that there is no way of interpolation > using scattered data > > I tried to figure out how to grid my values and use imshow or pcolor, but > with no success yet.. > > Could you explain me how I could do to grid, for example, that data: > > Lat[] (double array containing latitudes) > Lon[] (double array containing longitudes) > Val[] (double array containing values) > > Each of the arrays having the same size, and Val[1] has latitude Lat[1] and > longitude Lon[1], and so on, and the coordinates are completely unordered > > When I try to use griddata and use imshow or pcolor with the output array, > my figure is blank > > A simple example or guideline would do, I guess, as I've already gained a > good knowledge of the language > > Thanks in advance > > PS: Here's the code snippet: > http://snipplr.com/view/8307/map-plotting-python-code-temporary/ > > > Antoine De Pauw > Collaborateur de recherches, Informatique - Research collaborator, IT > Laboratoire de chimie quantique et photophysique - Quantum chemistry and > photophysics laboratory > Université Libre de Bruxelles - ULB > Antoine: Griddata should work fine. Your code snippet does not try to use griddata, so I can't guess what is wrong. Let me suggest again - please post complete, self-contained examples that demonstrate your problem. Did you look at the griddata_demo.py example? -Jeff > > -----Original Message----- > From: John Hunter [mailto:jd...@gm...] > Sent: mercredi 17 septembre 2008 13:00 > To: De Pauw Antoine > Cc: Eric Firing; Jeff Whitaker; Matplotlib Users > Subject: Re: [Matplotlib-users] Information request > > On Wed, Sep 17, 2008 at 3:28 AM, De Pauw Antoine <and...@ul...> wrote: > > >> The image generated is here: >> http://www.kirikoo.net/images/5shrad-20080917-102544.png >> >> Also, I couldn't find any way to reduce the colorbar font size >> > > The colorbar method returns a matplotlib.colorbar.Colorbar instance, > which has matplotlib.axes.Axes instance stored as an attribute. Thus > you can do: > > cb = colorbar(something....) > > for t in cb.get_yticklabels(): > t.set_fontsize(10) > > Eric: when you get some time, could you add docstrings to colorbar > which document the publicly accessible attributes? > > JDH > > -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328
Jeff, Sorry, I have forgotten to add this piece of code since I'm continually adding/removing bits This code comes instead of the scatter method and colorbar things: xi=np.linspace(-180,180,360) yi=np.linspace(-90,90,180) zi=griddata(Lon,Lat,Val_masked,xi,yi) Is it done the good way? If it is, what's the best method to display it with interpolation? Antoine De Pauw Collaborateur de recherches, Informatique - Research collaborator, IT Laboratoire de chimie quantique et photophysique - Quantum chemistry and photophysics laboratory Université Libre de Bruxelles - ULB -----Original Message----- From: Jeff Whitaker [mailto:js...@fa...] Sent: mercredi 17 septembre 2008 13:40 To: De Pauw Antoine Cc: 'John Hunter'; 'Eric Firing'; 'Matplotlib Users' Subject: Re: [Matplotlib-users] Information request De Pauw Antoine wrote: > Hi John, > > I used your example with the missing .ax to modify these font sizes and it > works nicely > > Anyway, by investigation, I found that there is no way of interpolation > using scattered data > > I tried to figure out how to grid my values and use imshow or pcolor, but > with no success yet.. > > Could you explain me how I could do to grid, for example, that data: > > Lat[] (double array containing latitudes) > Lon[] (double array containing longitudes) > Val[] (double array containing values) > > Each of the arrays having the same size, and Val[1] has latitude Lat[1] and > longitude Lon[1], and so on, and the coordinates are completely unordered > > When I try to use griddata and use imshow or pcolor with the output array, > my figure is blank > > A simple example or guideline would do, I guess, as I've already gained a > good knowledge of the language > > Thanks in advance > > PS: Here's the code snippet: > http://snipplr.com/view/8307/map-plotting-python-code-temporary/ > > > Antoine De Pauw > Collaborateur de recherches, Informatique - Research collaborator, IT > Laboratoire de chimie quantique et photophysique - Quantum chemistry and > photophysics laboratory > Université Libre de Bruxelles - ULB > Antoine: Griddata should work fine. Your code snippet does not try to use griddata, so I can't guess what is wrong. Let me suggest again - please post complete, self-contained examples that demonstrate your problem. Did you look at the griddata_demo.py example? -Jeff > > -----Original Message----- > From: John Hunter [mailto:jd...@gm...] > Sent: mercredi 17 septembre 2008 13:00 > To: De Pauw Antoine > Cc: Eric Firing; Jeff Whitaker; Matplotlib Users > Subject: Re: [Matplotlib-users] Information request > > On Wed, Sep 17, 2008 at 3:28 AM, De Pauw Antoine <and...@ul...> wrote: > > >> The image generated is here: >> http://www.kirikoo.net/images/5shrad-20080917-102544.png >> >> Also, I couldn't find any way to reduce the colorbar font size >> > > The colorbar method returns a matplotlib.colorbar.Colorbar instance, > which has matplotlib.axes.Axes instance stored as an attribute. Thus > you can do: > > cb = colorbar(something....) > > for t in cb.get_yticklabels(): > t.set_fontsize(10) > > Eric: when you get some time, could you add docstrings to colorbar > which document the publicly accessible attributes? > > JDH > > -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328
De Pauw Antoine wrote: > Hi John, > > I used your example with the missing .ax to modify these font sizes and it > works nicely > > Anyway, by investigation, I found that there is no way of interpolation > using scattered data > > I tried to figure out how to grid my values and use imshow or pcolor, but > with no success yet.. > > Could you explain me how I could do to grid, for example, that data: > > Lat[] (double array containing latitudes) > Lon[] (double array containing longitudes) > Val[] (double array containing values) > > Each of the arrays having the same size, and Val[1] has latitude Lat[1] and > longitude Lon[1], and so on, and the coordinates are completely unordered > > When I try to use griddata and use imshow or pcolor with the output array, > my figure is blank > > A simple example or guideline would do, I guess, as I've already gained a > good knowledge of the language > > Thanks in advance > > PS: Here's the code snippet: > http://snipplr.com/view/8307/map-plotting-python-code-temporary/ > > > Antoine De Pauw > Collaborateur de recherches, Informatique - Research collaborator, IT > Laboratoire de chimie quantique et photophysique - Quantum chemistry and > photophysics laboratory > Université Libre de Bruxelles - ULB > Antoine: Griddata should work fine. Your code snippet does not try to use griddata, so I can't guess what is wrong. Let me suggest again - please post complete, self-contained examples that demonstrate your problem. Did you look at the griddata_demo.py example? -Jeff > > -----Original Message----- > From: John Hunter [mailto:jd...@gm...] > Sent: mercredi 17 septembre 2008 13:00 > To: De Pauw Antoine > Cc: Eric Firing; Jeff Whitaker; Matplotlib Users > Subject: Re: [Matplotlib-users] Information request > > On Wed, Sep 17, 2008 at 3:28 AM, De Pauw Antoine <and...@ul...> wrote: > > >> The image generated is here: >> http://www.kirikoo.net/images/5shrad-20080917-102544.png >> >> Also, I couldn't find any way to reduce the colorbar font size >> > > The colorbar method returns a matplotlib.colorbar.Colorbar instance, > which has matplotlib.axes.Axes instance stored as an attribute. Thus > you can do: > > cb = colorbar(something....) > > for t in cb.get_yticklabels(): > t.set_fontsize(10) > > Eric: when you get some time, could you add docstrings to colorbar > which document the publicly accessible attributes? > > JDH > > -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328
Hi John, I used your example with the missing .ax to modify these font sizes and it works nicely Anyway, by investigation, I found that there is no way of interpolation using scattered data I tried to figure out how to grid my values and use imshow or pcolor, but with no success yet.. Could you explain me how I could do to grid, for example, that data: Lat[] (double array containing latitudes) Lon[] (double array containing longitudes) Val[] (double array containing values) Each of the arrays having the same size, and Val[1] has latitude Lat[1] and longitude Lon[1], and so on, and the coordinates are completely unordered When I try to use griddata and use imshow or pcolor with the output array, my figure is blank A simple example or guideline would do, I guess, as I've already gained a good knowledge of the language Thanks in advance PS: Here's the code snippet: http://snipplr.com/view/8307/map-plotting-python-code-temporary/ Antoine De Pauw Collaborateur de recherches, Informatique - Research collaborator, IT Laboratoire de chimie quantique et photophysique - Quantum chemistry and photophysics laboratory Université Libre de Bruxelles - ULB -----Original Message----- From: John Hunter [mailto:jd...@gm...] Sent: mercredi 17 septembre 2008 13:00 To: De Pauw Antoine Cc: Eric Firing; Jeff Whitaker; Matplotlib Users Subject: Re: [Matplotlib-users] Information request On Wed, Sep 17, 2008 at 3:28 AM, De Pauw Antoine <and...@ul...> wrote: > The image generated is here: > http://www.kirikoo.net/images/5shrad-20080917-102544.png > > Also, I couldn't find any way to reduce the colorbar font size The colorbar method returns a matplotlib.colorbar.Colorbar instance, which has matplotlib.axes.Axes instance stored as an attribute. Thus you can do: cb = colorbar(something....) for t in cb.get_yticklabels(): t.set_fontsize(10) Eric: when you get some time, could you add docstrings to colorbar which document the publicly accessible attributes? JDH
On Wed, Sep 17, 2008 at 3:28 AM, De Pauw Antoine <and...@ul...> wrote: > The image generated is here: > http://www.kirikoo.net/images/5shrad-20080917-102544.png > > Also, I couldn't find any way to reduce the colorbar font size The colorbar method returns a matplotlib.colorbar.Colorbar instance, which has matplotlib.axes.Axes instance stored as an attribute. Thus you can do: cb = colorbar(something....) for t in cb.get_yticklabels(): t.set_fontsize(10) Eric: when you get some time, could you add docstrings to colorbar which document the publicly accessible attributes? JDH