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
(19) |
2
(28) |
3
(8) |
|
4
(15) |
5
(20) |
6
(23) |
7
(12) |
8
(11) |
9
(13) |
10
(4) |
|
11
(9) |
12
(34) |
13
(33) |
14
(24) |
15
(15) |
16
(12) |
17
(8) |
|
18
(5) |
19
(5) |
20
(6) |
21
(10) |
22
(9) |
23
(18) |
24
(10) |
|
25
(7) |
26
(13) |
27
(18) |
28
(29) |
29
(4) |
30
(5) |
31
(2) |
|
From: Eric F. <ef...@ha...> - 2009-10-04 23:51:18
|
Václav Šmilauer wrote: > Hi, > > about a year ago I developed for my own purposes a routine for averaging > irregularly-sampled data using gaussian average. I would like to > contribute it to matplotlib, after a clean-up, if there is interest. This sounds like a nice thing to have, but I am wondering whether it should go into scipy instead of mpl. On the other hand, I do see the rationale for simply putting it in mpl so it can be used for contouring etc. without adding an external dependency. > > First it stores all data points in a (regular) grid. One can ask for > value at arbitrary point within the grid range: based on stDev > parameter, all data points within some distance (user-settable) are > weighted using the normal distribution function and then the average is > returned. Storing data in grid avoids searching all data points every > time, only those within certain grid-range will be used. > Good idea. > It would be relatively easy to extend to another distribution types > (lines 120-130), such as elliptic-normal distribution, with different > stDev in each direction. This sounds a lot like "optimal interpolation". Comments? Certainly, in many fields it is essential to be able to specify different std for x and y. > > The code is here: > http://bazaar.launchpad.net/~yade-dev/yade/trunk/annotate/head% > 3A/lib/smoothing/WeightedAverage2d.hpp > > I should be able to convert it to accept numpy arrays, wrap using Python > API instead of boost::python and write some documentation. Let me know > if matplotlib-devel list would be more appropriate for this discussion. matplotlib-users is fine for checking for interest; it may make sense to move more technical discussion to -devel. But I will ignore that for now. Is wrapping with cython a reasonable option? I don't think we have any cython in mpl at present, but it seems to me like the way to go for many things, especially new things. It is readable, flexible, and promises to make the eventual transition to Python 3.1 painless for the components that use it. I realize it is C-oriented, not C++ oriented, but my understanding is that the wrapping of C++ is still reasonable in many cases. (I have not tried it.) Eric > > Cheers, Vaclav > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Jason S. <jas...@gm...> - 2009-10-04 22:33:01
|
I'm drawing a figure for inclusion into a LaTeX document, and I'm having trouble getting matplotlib to export a .pdf that 'tightly' encapsulates the drawing that is generated - I get a lot of whitespace at the bottom, in particular. After some experimentation, I've found that the culprit is an Arc that I am drawing near the bottom of the page. The angle range is something like pi/4 to 3*pi/4, so the actual line is located well above the center of the circle defining the arc, but it appears that the arc is reporting a bounding box that is the same as would be reported for a circle. Perhaps this isn't a bug and this behavior is useful to some, but I'd really like to be able to get the resulting image fit tightly around the drawn lines and not invisible bounding boxes. Can anyone help me out? Is there some way I can force matplotlib to 'clip' the output? Thanks, Jason P.S. I'm using matplotlib v. 0.98.5.2 on Python 2.6 running on x86_64 Linux |
|
From: Eric F. <ef...@ha...> - 2009-10-04 22:26:43
|
Dr. Phillip M. Feldman wrote: > The attached script creates a colormap containing five colors. At the end of > the script, I print the value of cmap.N, and it is 256 rather than 5. > > http://www.nabble.com/file/p25740788/bugdemo.py bugdemo.py No, it is not a bug. You never told LinearSegmentedColormap that you wanted a map with other than 256 colors, which is the default. If you want a colormap with 3 colors, use a ListedColormap. In fact, as I wrote before, this, together with a BoundaryNorm, is the best way to handle the mapping of discrete colors. Eric |
|
From: Robert K. <rob...@gm...> - 2009-10-04 21:25:20
|
On 2009-10-04 15:27 PM, Christopher Barker wrote: > Václav Šmilauer wrote: > >> about a year ago I developed for my own purposes a routine for averaging >> irregularly-sampled data using gaussian average. > > is this similar to Kernel Density estimation? > > http://www.scipy.org/doc/api_docs/SciPy.stats.kde.gaussian_kde.html No. It is probably closer to radial basis function interpolation (in fact, it almost certainly is a form of RBFs): http://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html#id1 -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco |
|
From: Christopher B. <Chr...@no...> - 2009-10-04 20:27:42
|
Václav Šmilauer wrote: > about a year ago I developed for my own purposes a routine for averaging > irregularly-sampled data using gaussian average. is this similar to Kernel Density estimation? http://www.scipy.org/doc/api_docs/SciPy.stats.kde.gaussian_kde.html In any case, it sounds more like an appropriate contribution to scipy than MPL. > First it stores all data points in a (regular) grid. What if your data points are not on a regular grid? Wouldn't this be a way to interpolate onto such a grid? > Storing data in grid avoids searching all data points every > time, only those within certain grid-range will be used. another option would be to store the points in some sort of spatial index, like an r-tree. > I should be able to convert it to accept numpy arrays, key. > wrap using Python > API instead of boost::python I'd consider Cython for that. sounds like a useful module, -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
|
From: Dr. P. M. F. <pfe...@ve...> - 2009-10-04 18:37:03
|
The attached script creates a colormap containing five colors. At the end of the script, I print the value of cmap.N, and it is 256 rather than 5. http://www.nabble.com/file/p25740788/bugdemo.py bugdemo.py -- View this message in context: http://www.nabble.com/possible-bug-in-LinearSegmentedColormap-tp25740788p25740788.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Gökhan S. <gok...@gm...> - 2009-10-04 16:34:42
|
Hello, Are there any opinions how to make this legend picking work after a zoom or pan event? There is no way to bring the cursor into its beginning shape and therefore non of the clicking works as expected. On Sun, Oct 4, 2009 at 9:37 AM, Peter Butterworth <bu...@gm...> wrote: > Hi, > > I am a bit surprised that a line that isn't visible remains pickable > by default : > > # toggle line visibility: > vis = not line.get_visible() > line.set_visible(vis) > # by default a line would remain pickable even if not visible : > if vis : line.set_picker(5) > else : line.set_picker(None) > > I've attached my line + legend picker example, in case it is of any > use to anybody. > > > On Mon, Sep 28, 2009 at 3:43 AM, John Hunter <jd...@gm...> wrote: > > On Sun, Sep 27, 2009 at 3:45 PM, Peter Butterworth <bu...@gm...> > wrote: > >> On Sun, Sep 27, 2009 at 9:31 PM, Jae-Joon Lee <lee...@gm...> > wrote: > >>>> Some feedback: If plotting a line2D as discrete points rather than a > >>>> continuous line, you must use numpoints=2 for the legend picking to > actually > >>>> occur on the points. The alpha blending doesn't work on the legend > symbols > >>>> however. > >>>> > >>> > >>> I tried numpoints=1,2,3 but all worked for me. Can someone else confirm > this? > >> > >> I'm using windows and mpl 0.99.0: > > > > Most of the enhancements to support legend picking happened after 99.0 > > -- you probably need to be on svn trunk (I don't think 99.1 would work > > either). The example is working fine for me on svn HEAD (regardless > > of ncol) with one exception: if I use a marker instead of a line, the > > alpha is not respected (the line markers are simply turned off). > > Apparently we need to fix Line2D to respect the alpha setting for > > markers in this use case. > > > > JDH > > > >> > >> > >> > >>> The alpha for legend symbols does not work since, inside legend, the > >>> lines and symbols are drawn by different artists. > >>> > >>> Try something like below. > >>> > >>> > >>> legline.set_alpha(1.0) > >>> try: > >>> legline._legmarker.set_alpha(1.0) > >>> except AttributeError: > >>> pass > >>> > >>> > >>> > >>>> Is there any other way, I can show in the legend whether the points of > the > >>>> series are visible or not ? > >>>> > >>>> I thought of changing the labels, but failed to get them to redraw. > >>>> > >>> > >>> Legend.get_texts() method returns the list of Text instances. > >>> > >>> > http://matplotlib.sourceforge.net/api/artist_api.html?highlight=legend#matplotlib.legend.Legend.get_texts > >>> > >>> You may modify the returned Text instances. > >>> > >>> -JJ > >>> > >> > >> works great. > >> > >> > >> > >>> > >>>> # plots: > >>>> ax.plot(t, y1, 'ro', picker=5, label='lab1') > >>>> ax.plot(t, y2, 'bo', picker=5, label='lab2') > >>>> > >>>> # legend > >>>> leg = ax.legend(loc='upper left', numpoints=2, fancybox=True, > shadow=True) > >>>> lines, labels = ax.get_legend_handles_labels() > >>>> > >>>> # Enable picking on the legend lines > >>>> leglines=leg.get_lines() > >>>> for legline in leglines: legline.set_picker(5) > >> > >> > ------------------------------------------------------------------------------ > >> Come build with us! The BlackBerry® Developer Conference in SF, CA > >> is the only developer event you need to attend this year. Jumpstart your > >> developing skills, take BlackBerry mobile applications to market and > stay > >> ahead of the curve. Join us from November 9-12, 2009. Register > now! > >> http://p.sf.net/sfu/devconf > >> _______________________________________________ > >> Matplotlib-users mailing list > >> Mat...@li... > >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >> > > > > > > -- > thanks, > peter butterworth > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Gökhan |
|
From: Václav Š. <eu...@ar...> - 2009-10-04 15:11:39
|
Hi, about a year ago I developed for my own purposes a routine for averaging irregularly-sampled data using gaussian average. I would like to contribute it to matplotlib, after a clean-up, if there is interest. First it stores all data points in a (regular) grid. One can ask for value at arbitrary point within the grid range: based on stDev parameter, all data points within some distance (user-settable) are weighted using the normal distribution function and then the average is returned. Storing data in grid avoids searching all data points every time, only those within certain grid-range will be used. It would be relatively easy to extend to another distribution types (lines 120-130), such as elliptic-normal distribution, with different stDev in each direction. The code is here: http://bazaar.launchpad.net/~yade-dev/yade/trunk/annotate/head% 3A/lib/smoothing/WeightedAverage2d.hpp I should be able to convert it to accept numpy arrays, wrap using Python API instead of boost::python and write some documentation. Let me know if matplotlib-devel list would be more appropriate for this discussion. Cheers, Vaclav |
|
From: Peter B. <bu...@gm...> - 2009-10-04 14:37:59
|
Hi,
I am a bit surprised that a line that isn't visible remains pickable
by default :
# toggle line visibility:
vis = not line.get_visible()
line.set_visible(vis)
# by default a line would remain pickable even if not visible :
if vis : line.set_picker(5)
else : line.set_picker(None)
I've attached my line + legend picker example, in case it is of any
use to anybody.
On Mon, Sep 28, 2009 at 3:43 AM, John Hunter <jd...@gm...> wrote:
> On Sun, Sep 27, 2009 at 3:45 PM, Peter Butterworth <bu...@gm...> wrote:
>> On Sun, Sep 27, 2009 at 9:31 PM, Jae-Joon Lee <lee...@gm...> wrote:
>>>> Some feedback: If plotting a line2D as discrete points rather than a
>>>> continuous line, you must use numpoints=2 for the legend picking to actually
>>>> occur on the points. The alpha blending doesn't work on the legend symbols
>>>> however.
>>>>
>>>
>>> I tried numpoints=1,2,3 but all worked for me. Can someone else confirm this?
>>
>> I'm using windows and mpl 0.99.0:
>
> Most of the enhancements to support legend picking happened after 99.0
> -- you probably need to be on svn trunk (I don't think 99.1 would work
> either). The example is working fine for me on svn HEAD (regardless
> of ncol) with one exception: if I use a marker instead of a line, the
> alpha is not respected (the line markers are simply turned off).
> Apparently we need to fix Line2D to respect the alpha setting for
> markers in this use case.
>
> JDH
>
>>
>>
>>
>>> The alpha for legend symbols does not work since, inside legend, the
>>> lines and symbols are drawn by different artists.
>>>
>>> Try something like below.
>>>
>>>
>>> legline.set_alpha(1.0)
>>> try:
>>> legline._legmarker.set_alpha(1.0)
>>> except AttributeError:
>>> pass
>>>
>>>
>>>
>>>> Is there any other way, I can show in the legend whether the points of the
>>>> series are visible or not ?
>>>>
>>>> I thought of changing the labels, but failed to get them to redraw.
>>>>
>>>
>>> Legend.get_texts() method returns the list of Text instances.
>>>
>>> http://matplotlib.sourceforge.net/api/artist_api.html?highlight=legend#matplotlib.legend.Legend.get_texts
>>>
>>> You may modify the returned Text instances.
>>>
>>> -JJ
>>>
>>
>> works great.
>>
>>
>>
>>>
>>>> # plots:
>>>> ax.plot(t, y1, 'ro', picker=5, label='lab1')
>>>> ax.plot(t, y2, 'bo', picker=5, label='lab2')
>>>>
>>>> # legend
>>>> leg = ax.legend(loc='upper left', numpoints=2, fancybox=True, shadow=True)
>>>> lines, labels = ax.get_legend_handles_labels()
>>>>
>>>> # Enable picking on the legend lines
>>>> leglines=leg.get_lines()
>>>> for legline in leglines: legline.set_picker(5)
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry® Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9-12, 2009. Register now!
>> http://p.sf.net/sfu/devconf
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
--
thanks,
peter butterworth
|
|
From: Gewton J. <gj...@gm...> - 2009-10-04 11:32:45
|
Ok, but there's a class called map color, I think it goes that way. But I
didn't find a way to create map colors with hexadecimal values, only with r,
g, b dicts from 0 to 1.0. I didn't get it.
I also didn't find how to apply this map colors to a pie patch.
On Sat, Oct 3, 2009 at 10:28 PM, Jae-Joon Lee <lee...@gm...> wrote:
> Unfortunately, there is no simple way, as MPL does not support gradient
> yet.
> There is a hard way though, that you create a gradient image by
> yourself and clip it with the appropriate path.
> I guess, the easiest way for a normal user is to export the figure as
> the SVG format and put some gradient using inkscape, or similar tools.
>
> Regards,
>
> -JJ
>
>
> On Wed, Sep 30, 2009 at 12:21 PM, Gewton Jhames <gj...@gm...> wrote:
> > Hello everyone,
> > I wish a simple sample of creating a pie graph filled with a gradient
> from
> > blue(#98D0D8) to a lighter blue(#BAE5EB).
> > Here's the code (I got from the samples):
> >
> > from pylab import *
> >
> >
> >
> > # make a square figure and axes
> > figure(1, figsize=(6,6))
> >
> >
> > ax = axes([0.1, 0.1, 0.8, 0.8])
> >
> >
> >
> > labels = 'Frogs', 'Hogs', 'Dogs', 'Logs'
> >
> >
> > fracs = [15,30,45, 10]
> >
> >
> >
> > explode=(0, 0.05, 0, 0)
> >
> >
> > pie(fracs, explode=explode, labels=labels, autopct='%1.1f%%',
> shadow=True)
> >
> >
> > title('Raining Hogs and Dogs', bbox={'facecolor':'0.8', 'pad':5})
> >
> >
> >
> > show()
> >
> > Thanks.
> >
> >
> ------------------------------------------------------------------------------
> > Come build with us! The BlackBerry® Developer Conference in SF, CA
> > is the only developer event you need to attend this year. Jumpstart your
> > developing skills, take BlackBerry mobile applications to market and stay
> > ahead of the curve. Join us from November 9-12, 2009. Register
> now!
> > http://p.sf.net/sfu/devconf
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> >
>
|
|
From: Jae-Joon L. <lee...@gm...> - 2009-10-04 01:40:20
|
Please take a look at the backend_gtk.py if you're going to customize the toolbar. fig.canvas.toolbar is derived from gtk.Toolbar. So, you can customize it as you do for any gtk.Toolbar. I guess something like below is similar to DeleteToolByPos in wx. I just grabbed it by doing dir on the toolbar, so there might be a better way. fig.canvas.toolbar.remove(fig.canvas.toolbar.get_nth_item(1)) Regards, -JJ On Sat, Oct 3, 2009 at 10:53 AM, redrum <jva...@ho...> wrote: > > Hi there, > > I'm currently trying to have my own navigation toolbar by deleting some > unuseful buttons. > > Solutions given as follows is working for wxpython but not for pygtk since > DeleteToolByPos cannot be found : > > http://www.nabble.com/Navigation-toolbar-w-o-subplot-configuration-button-td18747977.html > > Has anyone ever tried to edit navigation toolbar with a pygtk-based > algorithm and could share his experience ? > > Regards, > -- > View this message in context: http://www.nabble.com/Navigation-toolbar-edit-for-pygtk-based-algorithm-tp25729532p25729532.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Jae-Joon L. <lee...@gm...> - 2009-10-04 01:28:33
|
Unfortunately, there is no simple way, as MPL does not support gradient yet.
There is a hard way though, that you create a gradient image by
yourself and clip it with the appropriate path.
I guess, the easiest way for a normal user is to export the figure as
the SVG format and put some gradient using inkscape, or similar tools.
Regards,
-JJ
On Wed, Sep 30, 2009 at 12:21 PM, Gewton Jhames <gj...@gm...> wrote:
> Hello everyone,
> I wish a simple sample of creating a pie graph filled with a gradient from
> blue(#98D0D8) to a lighter blue(#BAE5EB).
> Here's the code (I got from the samples):
>
> from pylab import *
>
>
>
> # make a square figure and axes
> figure(1, figsize=(6,6))
>
>
> ax = axes([0.1, 0.1, 0.8, 0.8])
>
>
>
> labels = 'Frogs', 'Hogs', 'Dogs', 'Logs'
>
>
> fracs = [15,30,45, 10]
>
>
>
> explode=(0, 0.05, 0, 0)
>
>
> pie(fracs, explode=explode, labels=labels, autopct='%1.1f%%', shadow=True)
>
>
> title('Raining Hogs and Dogs', bbox={'facecolor':'0.8', 'pad':5})
>
>
>
> show()
>
> Thanks.
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Jae-Joon L. <lee...@gm...> - 2009-10-04 01:05:53
|
As one of who never used Sage, I don't think I'll be any help here.
Anyhow, can you tell us what kind of backed is used by default in the
two environment? I mean the type of the canvas that is initially
created.
It seems to be some dpi issue, but MPL supposed to handle this correctly.
I guess it also works fine if the figure is initially created with the
matching dpi as the savefig (72),?
Regards,
-JJ
On Thu, Oct 1, 2009 at 12:26 PM, <jas...@cr...> wrote:
> Hi everyone,
>
> We're having a problem in Sage where if we specify the dpi of a figure, the
> bottom of the figure is cut off, but only the first time we save it. If we
> save the figure again, with the same arguments, the resulting image looks
> fine. I'm puzzled whether this is a Sage problem or a problem with
> interfacing with matplotlib, since it only happens when we are launch Sage
> (as opposed to just launching the ipython that Sage uses).
>
> More details:
>
> Running the following code in the Sage notebook or from the Sage command
> line gives a figure in which the bottom is cut off and the file is 12K
> instead of 13K. While firefox displays an image in which the bottom is cut
> off, eog (the gnome image viewer) doesn't even display the image, so I think
> the image might be corrupted. When I open the image with Konqueror, it
> seems like the cut off part of the image (about the lower quarter of the
> image) is completely transparent. I've attached the cut off image.
>
> import matplotlib.pyplot as plt
> import numpy
> plt.figure()
> plt.plot(numpy.arange(0,1.1,0.01))
> plt.savefig('foo.png',dpi=72)
>
>
> However, if we immediately save the figure again:
>
> plt.savefig('foo.png',dpi=72)
>
> the resulting image looks fine (i.e., the bottom is not cut off, the file is
> 13K, and eog displays it).
>
>
> If we run the same code again using "sage -ipython" (which just launches
> Sage's ipython, without any Sage initialization), the same code:
>
> import matplotlib.pyplot as plt
> import numpy
> plt.figure()
> plt.plot(numpy.arange(0,1.1,0.01))
> plt.savefig('foo.png',dpi=72)
> works just fine (i.e., the file is correct and complete).
>
> I'm puzzled since we are just using matplotlib commands, not any Sage
> commands. If we remove the "dpi=72" argument from savefig, everything works
> perfectly in all cases. My guess is that there is some sort of
> configuration option that Sage is setting when it starts up, but that is
> overridden or something after the first time matplotlib saves a figure. But
> I have no clue what sort of thing to look for. Does anyone have an idea of
> what could be causing this issue?
>
> Thanks,
>
> Jason
>
> --
> Jason Grout
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Jae-Joon L. <lee...@gm...> - 2009-10-04 00:50:30
|
http://matplotlib.sourceforge.net/examples/pylab_examples/barchart_demo.html While the example uses "text", "annotate" is more useful for fine-tuning the location of texts. -JJ On Fri, Oct 2, 2009 at 8:26 AM, marcog <ma...@ga...> wrote: > > Hi there > > I am plotting a bar graph and would like to label the bars (rectangles) with > their quantities. If a bar represents 12 items I want a "12" on the top-end > of the bar, preferable on the edge of the bar and not off the chart as with > a table. > > Is this possible? > > Thanks > Marco > -- > View this message in context: http://www.nabble.com/Labelling-Rectangles-tp25714962p25714962.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Jae-Joon L. <lee...@gm...> - 2009-10-04 00:45:41
|
What you need to do is to share a normalizer among different surface plots (this is not just for surface plot, but for all (as far as I know) color representation that uses colormaps). Note that "norm" can also be a keyword argument. Regards, -JJ Z1 = 5*np.sin(R) s1 = ax.plot_surface(X, Y, Z1, rstride=1, cstride=1, cmap=cm.jet) mynorm = s1.norm Z2 = np.cos(R) s2 = ax.plot_surface(X, Y, Z2, rstride=1, cstride=1, cmap=cm.jet) s2.set_norm(mynorm) mynorm.vmax = max(Z1.max(), Z2.max()) mynorm.vmin = min(Z1.min(), Z2.min()) On Fri, Oct 2, 2009 at 5:44 PM, Sammo <sam...@gm...> wrote: > How do I draw two 3D surface plots where the surface patch colors have > consistent meaning? > > Hope this makes sense ... > > Currently, I'm just doing two plot_surface commands, each of which has > cmap=cm.jet. The two surfaces have different shapes and sizes and have > different highest/lowest points. It seems that the colormap is automatically > normalised to the highest/lowest values for each surface independently (e.g. > the highest point on both surfaces is red, even though they are different > values). Instead, I want the same color to represent the same value on both > surfaces. > > Any ideas will be appreciated. Perhaps there's a way to force the colormap > to be normalised to a specified range of values? > > from mpl_toolkits.mplot3d import Axes3D > from matplotlib import cm > import matplotlib.pyplot as plt > import numpy as np > fig = plt.figure() > ax = Axes3D(fig) > X = np.arange(-5, 5, 0.25) > Y = np.arange(-5, 5, 0.25) > X, Y = np.meshgrid(X, Y) > R = np.sqrt(X**2 + Y**2) > > Z = 5*np.sin(R) > ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.jet) > > Z = np.cos(R) > ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.jet) > > plt.show() > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |