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}
(151) 
_{Aug}

_{Sep}

_{Oct}

_{Nov}

_{Dec}

S  M  T  W  T  F  S 



1
(20) 
2
(21) 
3
(21) 
4
(14) 
5
(8) 
6
(12) 
7
(16) 
8
(27) 
9
(39) 
10
(19) 
11
(12) 
12
(3) 
13
(3) 
14
(18) 
15
(14) 
16
(6) 
17
(7) 
18
(19) 
19
(5) 
20
(8) 
21
(24) 
22
(42) 
23
(12) 
24
(11) 
25
(16) 
26
(2) 
27
(4) 
28
(10) 





From: Jeremy Conlin <jlconlin@gm...>  20110201 23:48:42

I'm trying to create a custom colormap used with pcolormesh, but the results seem inconsistent to me. I want the following colors 3 < x <= 2  Black 2 < x <= 1  Blue 1 < x <= 0  Yellow 0 < x <= 1  Green 1 < x <= inf  Red A minimal example is copied below. I have a 2D array that looks like: 1, 6, 2.5 1.3, 2, 4/3 2.5, 6, 0 I want to get a pcolormesh that looks like R R Y R K R B R R But instead I get: Y R B Y K Y K R Y I recognize that the pcolormesh is plotted "upsidedown" from how the matrix is printed. I apparently don't understand how to use a custom colormap. I have tried to follow the example here: http://matplotlib.sourceforge.net/examples/api/colorbar_only.html but haven't been too successful. It seems like there is a normalization going on that I can't seem to track down. Can anyone see what is wrong? Thanks, Jeremy import numpy import matplotlib.pyplot as pyplot import matplotlib.colors C = numpy.array([[1,6,2.5],[4/3., 2, 4/3.],[2.5,6,0.0]],dtype=float) cMap = matplotlib.colors.ListedColormap(['k', 'b', 'y', 'g', 'r']) Bounds = [3.0, 2.0, 1.0, 0.0, 1.0, numpy.inf] # Plot Fig = pyplot.figure() pyplot.pcolormesh(C, cmap=cMap) 
From: Paul Ivanov <pivanov314@gm...>  20110201 21:42:30

Denzel Li, on 20110201 15:34, wrote: > I had this problem but could not find the answer online. I will be highly > appreciating if anyone can point me some direction on this problem. > I installed pythonxy and used matplotlib through ipython. I used matshow to > draw a matrix and then set ticklables. This lead to the shown rows having > uneven height. The following shows my problem: >  > import numpy > M=randn(4,6) > matshow(M) >  > This works fine and is shown in fig1.png. However, after I set the yticks: >  > yticks(arange(4), ('1','2','3','4')) >  > The rows of the matrix drawn have uneven height. Please see fig2.png. Hi Denzel, what version of matplotlib are you using? I am unable to reproduce on fairly recent checkout of svn trunk, so it may be an issue that was recently fixed. one workaround would be to set the ylim after the call to yticks, like this: plt.ylim(3.5, 0.5) best,  Paul Ivanov 314 address only used for lists, offlist direct email at: http://pirsquared.org  GPG/PGP key id: 0x0F3E28F7 
From: Denzel Li <denzel.dz.li@gm...>  20110201 20:34:59

From: Jeremy Conlin <jlconlin@gm...>  20110201 20:23:40

On Tue, Feb 1, 2011 at 1:11 PM, Benjamin Root <ben.root@...> wrote: > > > On Tue, Feb 1, 2011 at 1:48 PM, Jeremy Conlin <jlconlin@...> wrote: >> >> On Tue, Feb 1, 2011 at 11:22 AM, Benjamin Root <ben.root@...> wrote: >> > >> > >> > On Tue, Feb 1, 2011 at 11:58 AM, Jeremy Conlin <jlconlin@...> >> > wrote: >> >> >> >> I have two arrays and I want to plot the ratio of A/B when A>=B or B/A >> >> when A<B. I can create numpy masked arrays to find the result in >> >> these two instances, but I'm having trouble plotting them. Below I >> >> have a minimal example. I get a plot, but only from the second time I >> >> issue the pcolormesh command. Is there a way to combine the two >> >> arrays for plotting or to plot without overlapping? >> >> >> >> Thanks, >> >> Jeremy >> >> >> >> >> > >> > Try this: >> > >> > ratio = numpy.where(A >= B, A/B, B/A) >> > Figure = pyplot.figure() >> > pyplot.pcolormesh(ratio) >> > >> > I hope that helps! >> >> numpy.where helps a lot. To further complicate things, some elements >> of A or B are zero which causes A/B or B/A to be infinite in some >> places. I can use numpy.where or create a masked array to elimnate >> those elements that are infinite, but then my plotted values are >> either 0 or 1 (False or True); I lose all the interesting data. The >> documents of pcolormesh show that I can pass a masked_array, but I'm >> successful in doing that. Do you have another trick you can show to >> help me get around this problem? >> >> Thanks again, >> Jeremy > > > I think you are using the masked array and/or the np.where incorrectly. > > ratio = np.where(A >= B, A/B, B/A) > ratio = np.ma.masked_array(ratio, mask=(~np.isfinite(ratio))) > > And then do a contourf on ratio. Yeah, that seems to work. Thanks for the help. Jeremy 
From: Benjamin Root <ben.root@ou...>  20110201 20:11:39

On Tue, Feb 1, 2011 at 1:48 PM, Jeremy Conlin <jlconlin@...> wrote: > On Tue, Feb 1, 2011 at 11:22 AM, Benjamin Root <ben.root@...> wrote: > > > > > > On Tue, Feb 1, 2011 at 11:58 AM, Jeremy Conlin <jlconlin@...> > wrote: > >> > >> I have two arrays and I want to plot the ratio of A/B when A>=B or B/A > >> when A<B. I can create numpy masked arrays to find the result in > >> these two instances, but I'm having trouble plotting them. Below I > >> have a minimal example. I get a plot, but only from the second time I > >> issue the pcolormesh command. Is there a way to combine the two > >> arrays for plotting or to plot without overlapping? > >> > >> Thanks, > >> Jeremy > >> > >> > > > > Try this: > > > > ratio = numpy.where(A >= B, A/B, B/A) > > Figure = pyplot.figure() > > pyplot.pcolormesh(ratio) > > > > I hope that helps! > > numpy.where helps a lot. To further complicate things, some elements > of A or B are zero which causes A/B or B/A to be infinite in some > places. I can use numpy.where or create a masked array to elimnate > those elements that are infinite, but then my plotted values are > either 0 or 1 (False or True); I lose all the interesting data. The > documents of pcolormesh show that I can pass a masked_array, but I'm > successful in doing that. Do you have another trick you can show to > help me get around this problem? > > Thanks again, > Jeremy > I think you are using the masked array and/or the np.where incorrectly. ratio = np.where(A >= B, A/B, B/A) ratio = np.ma.masked_array(ratio, mask=(~np.isfinite(ratio))) And then do a contourf on ratio. Ben Root 
From: Darren Dale <dsdale24@gm...>  20110201 18:29:50

On Tue, Feb 1, 2011 at 12:50 PM, Andraz Omahen <zazmaister@...> wrote: > I just want you to stop sending massages to me form matplotlib. Unsubscribe here: https://lists.sourceforge.net/lists/listinfo/matplotlibusers 
From: Michael Droettboom <mdroe@st...>  20110201 18:27:48

You can unsubscribe here: https://sourceforge.net/mail/?group_id=80706 On 02/01/2011 12:50 PM, Andraz Omahen wrote: > I just want you to stop sending massages to me form matplotlib. > > Thank you > > >  > Special Offer Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a worldclass log management solution at an even better pricefree! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsightsfd2d > > > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers 
From: Benjamin Root <ben.root@ou...>  20110201 18:23:27

On Tue, Feb 1, 2011 at 11:58 AM, Jeremy Conlin <jlconlin@...> wrote: > I have two arrays and I want to plot the ratio of A/B when A>=B or B/A > when A<B. I can create numpy masked arrays to find the result in > these two instances, but I'm having trouble plotting them. Below I > have a minimal example. I get a plot, but only from the second time I > issue the pcolormesh command. Is there a way to combine the two > arrays for plotting or to plot without overlapping? > > Thanks, > Jeremy > > > Try this: ratio = numpy.where(A >= B, A/B, B/A) Figure = pyplot.figure() pyplot.pcolormesh(ratio) I hope that helps! Ben Root 
From: Benjamin Root <ben.root@ou...>  20110201 18:18:51

On Tue, Feb 1, 2011 at 11:09 AM, Francesco Benincasa < francesco.benincasa@...> wrote: > Hi all, > > I'm using pygrads for plotting maps from netcdf files. > > I use the contourf method, but I'm not able to fill the region where there > are > no value (there is the missing value 999) with a color. It seems to ignore > the set_bad method that I used to make the colormap. > > Any suggestions? > > Thank you very much in advance. > >  >  Francesco Benincasa > > Most likely, the issue is that set_bad is more for setting the color when encountering masked values (through masked arrays). As a quick and dirty way to deal with it, try setting that color through the set_under() method. The correct way to do this is to use set_bad, but convert your numpy array that you are displaying into a masked array like so: z_ma = np.ma.masked_array(z, mask=(z == 999)) and use contourf on z_ma. Let us know how that works for you. Ben Root 
From: Jeremy Conlin <jlconlin@gm...>  20110201 17:58:53

I have two arrays and I want to plot the ratio of A/B when A>=B or B/A when A<B. I can create numpy masked arrays to find the result in these two instances, but I'm having trouble plotting them. Below I have a minimal example. I get a plot, but only from the second time I issue the pcolormesh command. Is there a way to combine the two arrays for plotting or to plot without overlapping? Thanks, Jeremy import numpy import matplotlib.pyplot as pyplot N = 5 A = numpy.array(numpy.random.randint(0, 10, (N,N)), dtype='float64') B = numpy.array(numpy.random.randint(0, 10, (N,N)), dtype='float64') ab = numpy.ma.masked_array(A/B, mask=A>=B, fill_value=0.0) ba = numpy.ma.masked_array(B/A, mask=A<B) Figure = pyplot.figure() pyplot.pcolormesh(ab) pyplot.pcolormesh(ba) 
From: Andraz Omahen <zazmaister@gm...>  20110201 17:50:32

I just want you to stop sending massages to me form matplotlib. Thank you 
From: Jason Grout <jasonsage@cr...>  20110201 17:47:58

On 2/1/11 11:40 AM, Darren Dale wrote: > On Tue, Feb 1, 2011 at 12:29 PM, Jason Grout > <jasonsage@...> wrote: >> Observe the following image: >> >> import pylab >> pylab.plot([0,1],[1,2],label="$\sigma'_0$") >> pylab.legend() >> pylab.savefig('test.png') >> >> >> Notice that the \prime introduced by the single quote in the legend is >> not raised above the \sigma, like it would be in TeX (i.e., in TeX, >> $\sigma'_0$ is equivalent to $\sigma^\prime_0$, IIRC). Is this a design >> decision, or is it easy to fix? > > Did you try: > > pylab.plot([0,1],[1,2],label="$\sigma^\prime_0$") Yes, both that and pylab.plot([0,1],[1,2],label="$\sigma^'_0$") work fine. So we know a (somewhat clumsy) workaround. Jason 
From: Darren Dale <dsdale24@gm...>  20110201 17:40:09

On Tue, Feb 1, 2011 at 12:29 PM, Jason Grout <jasonsage@...> wrote: > Observe the following image: > > import pylab > pylab.plot([0,1],[1,2],label="$\sigma'_0$") > pylab.legend() > pylab.savefig('test.png') > > > Notice that the \prime introduced by the single quote in the legend is > not raised above the \sigma, like it would be in TeX (i.e., in TeX, > $\sigma'_0$ is equivalent to $\sigma^\prime_0$, IIRC). Is this a design > decision, or is it easy to fix? Did you try: pylab.plot([0,1],[1,2],label="$\sigma^\prime_0$") ? 
From: Paul Ivanov <pivanov314@gm...>  20110201 17:30:16

Francesco Montesano, on 20110201 12:07, wrote: > I attach a sample code which does not work. > > import numpy as np > > import matplotlib.pyplot as plt > > > > #create function to plot plus random error > > x = np.linspace(0,3,100) > > y = np.sin(x) > > err = np.random.random(100) > > > > plt.errorbar(x,y, yerr=err, color='g',linestyle='None',xuplims=True) > > plt.show() Hi Francesco, > > plt.errorbar(x,y, yerr=err, color='g',linestyle='None',xuplims=True) I'm not sure what you're hoping to see, but you should either use xerr with xuplims, or yerr with uplims. best,  Paul Ivanov 314 address only used for lists, offlist direct email at: http://pirsquared.org  GPG/PGP key id: 0x0F3E28F7 
From: Jason Grout <jasonsage@cr...>  20110201 17:29:52

Observe the following image: import pylab pylab.plot([0,1],[1,2],label="$\sigma'_0$") pylab.legend() pylab.savefig('test.png') Notice that the \prime introduced by the single quote in the legend is not raised above the \sigma, like it would be in TeX (i.e., in TeX, $\sigma'_0$ is equivalent to $\sigma^\prime_0$, IIRC). Is this a design decision, or is it easy to fix? This is with matplotlib 1.0.0. Thanks, Jason 
From: Francesco Benincasa <francesco.benincasa@bs...>  20110201 17:11:51

Hi all, I'm using pygrads for plotting maps from netcdf files. I use the contourf method, but I'm not able to fill the region where there are no value (there is the missing value 999) with a color. It seems to ignore the set_bad method that I used to make the colormap. Any suggestions? Thank you very much in advance.   Francesco Benincasa 
From: Francesco Montesano <franz.bergesund@go...>  20110201 16:58:39

Dear all, I'm producing a single figure with subplots arrange in a single columns. They all share the same x range but the y variable change from subplot to subplot In order have a nicer figure I hide the first and the last y label of each subplot in the following way > ytl = subpl.get_ymajorticklabels() > ytl[0].set_visible(False) > ytl[1].set_visible(False) > It was well in most cases. But I've noticed that in some plot the first and/or the last label remains. In this cases, if I "print ytl", it writes "<a list of n Text yticklabel objects>", where "n" is larger by 1 or 2 than the number of labels shown before I make them invisible. So I end up having some label (nearly) exactly on the upper and/or bottom range of the plot. Is there a way to force the axis to return exactly the number of labels shown in the plot? Thanks in advance, Francesco 
From: Jason Grout <jason@gr...>  20110201 16:20:18

Observe the following image: import pylab pylab.plot([0,1],[1,2],label="$\sigma'_0$") pylab.legend() pylab.savefig('test.png') Notice that the \prime introduced by the single quote in the legend is not raised above the \sigma, like it would be in TeX (i.e., in TeX, $\sigma'_0$ is equivalent to $\sigma^\prime_0$, IIRC). Is this a design decision, or is it easy to fix? This is with matplotlib 1.0.0. Thanks, Jason 
From: Paul Anton Letnes <paul.anton.letnes@gm...>  20110201 12:06:21

On 10. juni 2009, at 14.53, John Hunter wrote: > On Wed, Jun 10, 2009 at 1:58 AM, Paul Anton > Letnes<paul.anton.letnes@...> wrote: > >>> This _must_ be a bug. Consider the following: >>> ############## >>> import matplotlib > > No it is not a bug  mpl is doing what you tell it to do. Consider > >>>> figure() >>>> subplot(111) >>>> plot([1,2,3]) >>>> xlabel('hi mom', fontsize=100) > > Each command has precise meaning  the fig creates a figure using the > default size, the subplot occupies a fraction of that figure according > to the default ratios in the subplots_adjust parameters, and the > xlabel makes a label at an indicated physical size. You may not be > explicitly setting those sizes, but they are all defined via defaults > in the matplotlibrc. We try and make mpl do what you tell it to do, > not to try and outsmart you and do what we think you are telling it > to do. > > Now I definitely support the idea that we should have a *feature* to > autoadjust the subplots_adjust params and fontsizes so that it "just > works" more often. But this should be an optional feature so the user > who wants to express their intent clearly will not constantly be > stymied by mpl adjusting the sizes. Michael Droettboom has worked on > it and it is a difficult problem to get right. > > JDH I don't mean to bother people with this question again, but has anyone implemented this autoadjust feature that John was talking about? It would be nice not having to adjust matplotlib.rcParams['figure.subplot.left'] (and friends) in every plot script, or alternatively, through a clever hierarchy of matplotlibrc files. By the way: kudos to matplotlib in every other respect! Cheers Paul 
From: Francesco Montesano <franz.bergesund@go...>  20110201 11:08:01

Dear all, I am trying to make a plot with errorbars and upperlimits. I've found the following pylab example http://matplotlib.sourceforge.net/examples/pylab_examples/errorbar_limits.htmland it works fine both on a Mac OSX10.6 with python 2.6.1 and on Kubuntu 10.04 with python 2.6.5. I've tried the to reproduce the example using matplotlib.pyplot but the limits do not show up, regardless of syntax or system (matplotlib 1.0.0 on Mac and 1.0.1 on Kubuntu) I attach a sample code which does not work. import numpy as np > import matplotlib.pyplot as plt > > #create function to plot plus random error > x = np.linspace(0,3,100) > y = np.sin(x) > err = np.random.random(100) > > plt.errorbar(x,y, yerr=err, color='g',linestyle='None',xuplims=True) > plt.show() > Does anyone know how to solve this problem? Thanks in advance, Francesco 