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
(5) |
2
(17) |
3
(13) |
4
(17) |
5
(26) |
6
(13) |
7
(9) |
|
8
(8) |
9
(13) |
10
(25) |
11
(19) |
12
(24) |
13
(12) |
14
|
|
15
|
16
(5) |
17
(10) |
18
(7) |
19
|
20
(7) |
21
(2) |
|
22
(3) |
23
(11) |
24
(19) |
25
(17) |
26
(6) |
27
(10) |
28
(2) |
|
29
(4) |
30
(15) |
|
|
|
|
|
|
From: Eric F. <ef...@ha...> - 2007-04-18 17:43:42
|
James Boyle wrote: > Eric, > Thanks for the quick reply. > I should have looked more closely at the examples for the contourf > solution. > As I indicated, my problem is a bit beyond contours. I have routines > that fill polygons ( finite element mesh) using a specified color map. > The ability to fill areas with the proper color is easy - getting the > corresponding color bar has been the more interesting part. > It is going to take some time to look over your suggestion to see how I > could implement it in my application. > Presently I sub-class scalarMappable, and set the appropriate values and > pass this to colorbar(). However, I have not been able to figure out how > to do this for non-uniform intervals. > This is a long winded way of saying that getting pcolor and matshow to > work may or may not solve my specific problem. I think that something close to my example should do the job. It sounds like your difficulty is with the colorbar; but colorbar gives quite a bit of control via the kwargs, and you can also drop back from colorbar.Colorbar (which the pylab colorbar command uses) to colorbar.ColorbarBase, using the colorbar.Colorbar code as an example. I don't think you should need to use an intermediate ScalarMappable subclass, although this may be a perfectly good approach. Eric > > Thanks again, > > --Jim > > On Apr 18, 2007, at 1:52 AM, Eric Firing wrote: > >> James Boyle wrote: >>> I wish to make a color filled plot with the colors defined for >>> discrete, non-uniform intervals. Something like: >>> 0.0 -0.001 0.001-0.05 0.05-0.2 0.2-0.4 0.4-0.8 0.8-1.0 >>> red blue green magenta >>> yellow cyan >>> with the colorbar labeled appropriately. >>> I have seen discussions and solutions for discrete colors but not >>> for non-uniform intervals + discrete. >>> The last post I saw regarding this type of issue was august 2005 - >>> and a solution was not resolved at that time. >>> However, Eric has done a huge amount of work in the intervening time >>> and a smarter person than myself might have a solution now. >>> Note that I do not wish just to make contours - although that would >>> be good - but to have a general mapping code that joins allows the >>> color rmapping to be passed to colorbar. >>> maybe some sub-class of scalarMappable that could work. >> >> This is very easy for contourf, and is illustrated in the second >> figure made by examples/contourf_demo.py. For your case above, it >> would be something like >> >> levs = [0, 0.001, 0.05, 0.2, 0.4, 0.8, 1] >> colors = ['r', 'b', 'g', 'm', 'y', 'c'] >> contourf(z, levs, colors=colors) >> colorbar() >> >> Unfortunately, although it *should* be just as easy for imshow or >> pcolor, it is not at present; it can be done, probably in several >> ways, but not in such a transparent way. Attached is a quick attempt >> at something that might be close to what you need. The right way to >> do this is to make some changes and additions to colors.py and >> colorbar.py; I might get to that in a few days, or, more likely, it >> might be a few weeks. >> >> Eric >> >>> Thanks for any help. >>> --Jim >> import pylab as P >> import numpy >> from matplotlib import colors >> >> class BoundaryNorm(colors.Normalize): >> def __init__(self, boundaries): >> self.vmin = boundaries[0] >> self.vmax = boundaries[-1] >> self.boundaries = boundaries >> self.N = len(self.boundaries) >> >> def __call__(self, x, clip=False): >> x = numpy.asarray(x) >> ret = numpy.zeros(x.shape, dtype=numpy.int) >> for i, b in enumerate(self.boundaries): >> ret[numpy.greater_equal(x, b)] = i >> ret[numpy.less(x, self.vmin)] = -1 >> ret = numpy.ma.asarray(ret / float(self.N-1)) >> return ret >> >> bounds = [0, 0.1, 0.5, 1] >> cm = colors.ListedColormap(['r', 'g', 'b']) >> >> z = (numpy.arange(5)[:,None] * >> numpy.arange(8)[None,:]).astype(numpy.float) >> z = z / z.max() >> >> P.pcolor(z, cmap=cm, norm=BoundaryNorm(bounds)) >> P.colorbar(boundaries=bounds) >> P.show() |
|
From: <na...@te...> - 2007-04-18 17:40:47
|
Greetings, I have a 3d plot and, in the 'walls' of the plot, I need to plot some 2d functions to represent the projections of the 3d function. Is there any way to do or emulate that? The functions are actually very simple, so a work around might do the job. Also, is there a way to change the plot color? I tried using the 'color' keyword, but that didn't work. And I can't work well with the ticks. These two aren't really that important for what I need the plot, but any idea could help. =2D-=20 Jos=E9 Alexandre Nalon na...@te... |
|
From: James B. <bo...@ll...> - 2007-04-18 17:13:33
|
Eric, Thanks for the quick reply. I should have looked more closely at the examples for the contourf solution. As I indicated, my problem is a bit beyond contours. I have routines that fill polygons ( finite element mesh) using a specified color map. The ability to fill areas with the proper color is easy - getting the corresponding color bar has been the more interesting part. It is going to take some time to look over your suggestion to see how I could implement it in my application. Presently I sub-class scalarMappable, and set the appropriate values and pass this to colorbar(). However, I have not been able to figure out how to do this for non-uniform intervals. This is a long winded way of saying that getting pcolor and matshow to work may or may not solve my specific problem. Thanks again, --Jim On Apr 18, 2007, at 1:52 AM, Eric Firing wrote: > James Boyle wrote: >> I wish to make a color filled plot with the colors defined for >> discrete, non-uniform intervals. Something like: >> 0.0 -0.001 0.001-0.05 0.05-0.2 0.2-0.4 0.4-0.8 >> 0.8-1.0 >> red blue green magenta >> yellow cyan >> with the colorbar labeled appropriately. >> I have seen discussions and solutions for discrete colors but not >> for non-uniform intervals + discrete. >> The last post I saw regarding this type of issue was august 2005 >> - and a solution was not resolved at that time. >> However, Eric has done a huge amount of work in the intervening >> time and a smarter person than myself might have a solution now. >> Note that I do not wish just to make contours - although that >> would be good - but to have a general mapping code that joins >> allows the color rmapping to be passed to colorbar. >> maybe some sub-class of scalarMappable that could work. > > This is very easy for contourf, and is illustrated in the second > figure made by examples/contourf_demo.py. For your case above, it > would be something like > > levs = [0, 0.001, 0.05, 0.2, 0.4, 0.8, 1] > colors = ['r', 'b', 'g', 'm', 'y', 'c'] > contourf(z, levs, colors=colors) > colorbar() > > Unfortunately, although it *should* be just as easy for imshow or > pcolor, it is not at present; it can be done, probably in several > ways, but not in such a transparent way. Attached is a quick > attempt at something that might be close to what you need. The > right way to do this is to make some changes and additions to > colors.py and colorbar.py; I might get to that in a few days, or, > more likely, it might be a few weeks. > > Eric > >> Thanks for any help. >> --Jim > import pylab as P > import numpy > from matplotlib import colors > > class BoundaryNorm(colors.Normalize): > def __init__(self, boundaries): > self.vmin = boundaries[0] > self.vmax = boundaries[-1] > self.boundaries = boundaries > self.N = len(self.boundaries) > > def __call__(self, x, clip=False): > x = numpy.asarray(x) > ret = numpy.zeros(x.shape, dtype=numpy.int) > for i, b in enumerate(self.boundaries): > ret[numpy.greater_equal(x, b)] = i > ret[numpy.less(x, self.vmin)] = -1 > ret = numpy.ma.asarray(ret / float(self.N-1)) > return ret > > bounds = [0, 0.1, 0.5, 1] > cm = colors.ListedColormap(['r', 'g', 'b']) > > z = (numpy.arange(5)[:,None] * numpy.arange(8)[None,:]).astype > (numpy.float) > z = z / z.max() > > P.pcolor(z, cmap=cm, norm=BoundaryNorm(bounds)) > P.colorbar(boundaries=bounds) > P.show() |
|
From: ednspace <dai...@me...> - 2007-04-18 13:37:56
|
Christopher Barker wrote:
>
> ednspace wrote:
>> I'm using WXpython and the OO api of matplotlib.
>
> Have you tried wxAgg? if nothing else, it should look better. It would
> be interesting to see if it behaves differently as far as memory is
> concerned.
>
> Also, be sure to post your versions and platform.
>
>
switched matplotlib.use('WX') matplotlib.use('WXAgg')
not sure if I need to change anything else in my code to use WXAgg
everything looked the same to me, memory just keeps creeping up.
is there something that needs to be done to clear the:
self.lines[0].set_data(self.x,self.y)
That I am setting with:
self.lines = a.plot(self.x,self.y,'-')
I am confused about what exactly self.lines ends up being, I mean
self.lines[0] makes it seem like an array, however the assignment of the
a.plot does not seem like one.
thanks for the clues
Versions
Python 2.4.3
2.6.15-28-386 (Ubuntu Linux)
Matplotlib 0.82
Numpy 1.0
--
View this message in context: http://www.nabble.com/WX-dynamic-plot-slowly-fills-memory-tf3590828.html#a10058901
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Bill B. <wb...@gm...> - 2007-04-18 09:01:49
|
On 4/18/07, Eric Firing <ef...@ha...> wrote: > Bill Baxter wrote: > > There are a couple things about legend that I'm finding a little > > irksome. Is there some better way to do this? > > > > 1) if you have a contour, legend() wants to add all the contours to > > the list. calling contour(...,label='_nolegend_') doesn't seem to > > help. > > I think it would be quite unusual that someone would want contour lines > to show up in a legend, so I made the change I suggested in an earlier > response to this thread: the LineCollections in the ContourSet now have > their labels set to _nolegend_. If someone really does want contour > lines in a legend, these labels still can be changed manually, as > described earlier in this thread. You can also use colorbar() to show the levels if you want that information to be visible, and that's probably more appropriate than a legend anyway. I think it's a good change. Thanks! --bb |
|
From: Eric F. <ef...@ha...> - 2007-04-18 08:52:23
|
James Boyle wrote: > I wish to make a color filled plot with the colors defined for > discrete, non-uniform intervals. Something like: > 0.0 -0.001 0.001-0.05 0.05-0.2 0.2-0.4 0.4-0.8 0.8-1.0 > red blue green magenta > yellow cyan > > with the colorbar labeled appropriately. > I have seen discussions and solutions for discrete colors but not for > non-uniform intervals + discrete. > The last post I saw regarding this type of issue was august 2005 - > and a solution was not resolved at that time. > However, Eric has done a huge amount of work in the intervening time > and a smarter person than myself might have a solution now. > > Note that I do not wish just to make contours - although that would > be good - but to have a general mapping code that joins allows the > color rmapping to be passed to colorbar. > maybe some sub-class of scalarMappable that could work. This is very easy for contourf, and is illustrated in the second figure made by examples/contourf_demo.py. For your case above, it would be something like levs = [0, 0.001, 0.05, 0.2, 0.4, 0.8, 1] colors = ['r', 'b', 'g', 'm', 'y', 'c'] contourf(z, levs, colors=colors) colorbar() Unfortunately, although it *should* be just as easy for imshow or pcolor, it is not at present; it can be done, probably in several ways, but not in such a transparent way. Attached is a quick attempt at something that might be close to what you need. The right way to do this is to make some changes and additions to colors.py and colorbar.py; I might get to that in a few days, or, more likely, it might be a few weeks. Eric > > Thanks for any help. > > --Jim |
|
From: Eric F. <ef...@ha...> - 2007-04-18 07:46:15
|
Bill Baxter wrote: > There are a couple things about legend that I'm finding a little > irksome. Is there some better way to do this? > > 1) if you have a contour, legend() wants to add all the contours to > the list. calling contour(...,label='_nolegend_') doesn't seem to > help. I think it would be quite unusual that someone would want contour lines to show up in a legend, so I made the change I suggested in an earlier response to this thread: the LineCollections in the ContourSet now have their labels set to _nolegend_. If someone really does want contour lines in a legend, these labels still can be changed manually, as described earlier in this thread. Eric |