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) 

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) 
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) 
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) 
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) 
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) 
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) 
2012 
_{Jan}
(322) 
_{Feb}
(414) 
_{Mar}
(377) 
_{Apr}
(179) 
_{May}
(173) 
_{Jun}
(234) 
_{Jul}
(151) 
_{Aug}

_{Sep}

_{Oct}

_{Nov}

_{Dec}

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) 
S  M  T  W  T  F  S 






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

25
(8) 
26
(4) 
27
(2) 
28
(5) 
29
(3) 
30
(5) 
From: Daπid <davidmenhur@gm...>  20120613 22:49:20

If all your values are positive (and you are sure of it), you could use the SymmetricalLogScale It uses log scale for large values (both positive and negative), and linear for small ones. http://matplotlib.sourceforge.net/devel/add_new_projection.html I believe there is a way to do it without going symetrical (ie, only defined for positive values), but I am unable to find it. On Wed, Jun 13, 2012 at 7:31 PM, jonasr <jonas.ruebsam@...> wrote: > > Hi, > > im actually trying to make a countour plot Z=f(X,Y) from two variables X,Y . > My Problem is that i have to use a logarithmic scale for the Z values. > If i plot the data with the logarithmic scale it gets pretty ugly, because i > have a lot of values which are zero, > which means on the log scale the value goes to inf. > Here is an example what i mean > > http://www.imagebanana.com/view/qh1khpxp/example.png > > I acutally have no idea how to make the plot look better, > maybe somebody has an idea ? > > thank you >  > View this message in context: http://old.nabble.com/logairthmiccontourplottp34007155p34007155.html > Sent from the matplotlib  users mailing list archive at Nabble.com. > > >  > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers 
From: Benjamin Root <ben.root@ou...>  20120613 21:06:57

On Wed, Jun 13, 2012 at 4:00 PM, Timothy Duly <timduly4@...> wrote: > Hello, > > I am trying to make a simple pcolor plot with a datetime on the xaxis. I > am able to get a time label on the xaxis fine with a regular plot command, > but it doesn't appear to work if you use pcolor. This simple example below > shows that it does not work. Does anyone have any idea as to why a > datetime can't go on a pcolor plot? What is the best approach is to solve > the problem? > > Thanks, > Tim > > It doesn't work because we probably never had a request for it and therefore never tested that case. Testing it out with v1.1.1rc2 shows that for pcolor(), first of all, it expects a numpy array for the input arrays (that should definitely be fixed) as opposed to a python array. Second, fixing that, there is an issue where the Path object in the pcolor object is expecting floating points for its vertices. If one uses pcolormesh instead, right off the bat, there is a problem where it attempts to make a 2D version of the 1D input array, but because the 2D array was created with default dtype, it is expecting something compatible with a float type. Personally, I am not liking how pcolormesh is being inefficient with my input arrays and it should really be taking advantage of numpy broadcasting. Could you please file a bug report on github for this issue with your code example? Thanks! Ben Root 
From: Steven Boada <boada@ph...>  20120613 20:32:19

The gca().collections.set_label('label') works great. Admittedly, I'm not sure why it works. I'm not that great with the collections stuff. But thanks! S On 06/13/2012 03:22 PM, Mike Kaufman wrote: > On 6/13/12 4:06 PM, Steven Boada wrote: >> Well I am doing a lot more than this simple example shows. Point is that >> there are nine different points each with their own legend entry. >> >> I could put it all out of the for loops, but it is all already written, >> and I'd rather just fix the legend at the end than move sections of the >> code around. I'm willing to do it, if that is the only choice, but I >> wanted to ask before I commit my time. >> >> Wouldn't it be a good (smart) thing for the code to lump all the points >> with the same label together? This would be a great feature to be added IMO. > Assuming that you already have ten scatter plots, change the labels on > the ones you don't want in the legend to '_nolegend_' (see help(legend)) > > for i in range(10): > gca().collections[i].set_label('_nolegend_') > gca().collections[0].set_label('the one label I want') > legend() > draw() > > M > >  > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers >  Steven Boada Dept. Physics and Astronomy Texas A&M University boada@... 
From: Mike Kaufman <mckauf@gm...>  20120613 20:22:54

On 6/13/12 4:06 PM, Steven Boada wrote: > > Well I am doing a lot more than this simple example shows. Point is that > there are nine different points each with their own legend entry. > > I could put it all out of the for loops, but it is all already written, > and I'd rather just fix the legend at the end than move sections of the > code around. I'm willing to do it, if that is the only choice, but I > wanted to ask before I commit my time. > > Wouldn't it be a good (smart) thing for the code to lump all the points > with the same label together? This would be a great feature to be added IMO. Assuming that you already have ten scatter plots, change the labels on the ones you don't want in the legend to '_nolegend_' (see help(legend)) for i in range(10): gca().collections[i].set_label('_nolegend_') gca().collections[0].set_label('the one label I want') legend() draw() M 
From: Goyo <goyodiaz@gm...>  20120613 20:17:57

2012/6/13 Mike Kaufman <mckauf@...>: > On 6/13/12 3:23 PM, Steven Boada wrote: >> Whoops, I forgot to change the subject. Sorry list. >> >> List, >> >> I'm making a scatter plot using a for loop. Here's a simple example.. >> >> for i in range(10): >> x=rand() >> y=rand() >> scatter(x,y,label='point') >> >> legend() >> show() >> >> >> When you do this, you get a legend entry for every single point. In this >> case, I get 9 entries in my legend. >> >> Is there a way to only get a single entry? Maybe you can adapt this to your use case: for i in range(10): x=rand() y=rand() collection = scatter(x,y,label='point') legend((collection,), ('Label',)) show() Goyo 
From: Paul Kuin <npkuin@gm...>  20120613 20:11:10

I have a routine where I start outside the loop with and empty sequence > leg = [] then add at each iteration the label > leg.append('mylabel') then call legend with the sequence at the end > legend(leg) I think I once truncated the list and got part only > legend(leg[:2]) It depends on what you want to do. Paul On Wed, Jun 13, 2012 at 8:56 PM, Mike Kaufman <mckauf@...> wrote: > On 6/13/12 3:23 PM, Steven Boada wrote: >> Whoops, I forgot to change the subject. Sorry list. >> >> List, >> >> I'm making a scatter plot using a for loop. Here's a simple example.. >> >> for i in range(10): >> x=rand() >> y=rand() >> scatter(x,y,label='point') >> >> legend() >> show() >> >> >> When you do this, you get a legend entry for every single point. In this >> case, I get 9 entries in my legend. >> >> Is there a way to only get a single entry? I have looked into creating >> the legends by hand, but I'm not having much luck. Googling, only turned >> up a single example of someone else with the same problem. >> >> Help me list, you're my only hope. > > Perhaps not exactly what you want, but an answer is don't use a loop: > > x = rand(10) > y = rand(10) > scatter(x,y, label='points') > legend() > draw() > show() > > Of course if you want to color each point differently, then this won't work. > > M > > >  > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers  * * * * * * * * http://www.mssl.ucl.ac.uk/~npmk/ * * * * Dr. N.P.M. Kuin (npmk@...) phone +44(0)1483 (prefix) 204256 (work) 276110 (home) mobile +44(0)7806985366 skype ID: npkuin Mullard Space Science Laboratory – University College London – Holmbury St Mary – Dorking – Surrey RH5 6NT– U.K. 
From: Steven Boada <boada@ph...>  20120613 20:06:32

Well I am doing a lot more than this simple example shows. Point is that there are nine different points each with their own legend entry. I could put it all out of the for loops, but it is all already written, and I'd rather just fix the legend at the end than move sections of the code around. I'm willing to do it, if that is the only choice, but I wanted to ask before I commit my time. Wouldn't it be a good (smart) thing for the code to lump all the points with the same label together? This would be a great feature to be added IMO. S On 06/13/2012 03:01 PM, pybokeh wrote: > > Are you trying to make 9 scatter plots? In your for loop, if you are > trying to make a set of x values and a set of y values, then I think > this is wrong. Since you didn't provide import statements I don't > know which rand() function you are using. Assuming it is > scipy.rand(), you will only have one x value and one y value, not much > of scatter chart with just one point :) > > Otherwise, Mike's suggestion is valid. > > Regards, > Daniel > > On Jun 13, 2012 3:35 PM, "Steven Boada" <boada@... > <mailto:boada@...>> wrote: > > Whoops, I forgot to change the subject. Sorry list. > > List, > > I'm making a scatter plot using a for loop. Here's a simple example.. > > for i in range(10): > x=rand() > y=rand() > scatter(x,y,label='point') > > legend() > show() > > > When you do this, you get a legend entry for every single point. > In this > case, I get 9 entries in my legend. > > Is there a way to only get a single entry? I have looked into creating > the legends by hand, but I'm not having much luck. Googling, only > turned > up a single example of someone else with the same problem. > > Help me list, you're my only hope. > > Steven > > On 06/13/2012 01:33 PM, Eric Firing wrote: > > On 06/13/2012 07:31 AM, jonasr wrote: > >> Hi, > >> > >> im actually trying to make a countour plot Z=f(X,Y) from two > variables X,Y . > >> My Problem is that i have to use a logarithmic scale for the Z > values. > >> If i plot the data with the logarithmic scale it gets pretty > ugly, because i > >> have a lot of values which are zero, > >> which means on the log scale the value goes to inf. > >> Here is an example what i mean > >> > >> http://www.imagebanana.com/view/qh1khpxp/example.png > >> > >> I acutally have no idea how to make the plot look better, > >> maybe somebody has an idea ? > > Use np.ma.masked_less to mask out values below some threshold before > > taking the log. > > > > e.g., > > > > import matplotlib.pyplot as plt > > import numpy as np > > x = np.arange(0, 1, 0.01) > > y = np.arange(0, 8, 0.05) > > X, Y = np.meshgrid(x, y) > > Z = 10 ** (5 + 11 * X * np.sin(Y)) > > Z = np.ma.masked_less(Z, 1e4) > > Zlog = np.ma.log10(Z) > > CS = plt.contourf(X, Y, Zlog, levels=np.arange(3, 5.01, 1.0), > > extend='both') > > plt.colorbar() > > > > > > > > Eric > > > >> thank you > > > > >  > > Live Security Virtual Conference > > Exclusive live event will cover all the ways today's security and > > threat landscape has changed and how IT managers can respond. > Discussions > > will include endpoint security, mobile security and the latest > in malware > > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > _______________________________________________ > > Matplotlibusers mailing list > > Matplotlibusers@... > <mailto:Matplotlibusers@...> > > https://lists.sourceforge.net/lists/listinfo/matplotlibusers > > > >  > Steven Boada > Dept. Physics and Astronomy > Texas A&M University > boada@... <mailto:boada@...> > > >  > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. > Discussions > will include endpoint security, mobile security and the latest in > malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > <mailto:Matplotlibusers@...> > https://lists.sourceforge.net/lists/listinfo/matplotlibusers >  Steven Boada Dept. Physics and Astronomy Texas A&M University boada@... 
From: pybokeh <pybokeh@gm...>  20120613 20:01:33

Are you trying to make 9 scatter plots? In your for loop, if you are trying to make a set of x values and a set of y values, then I think this is wrong. Since you didn't provide import statements I don't know which rand() function you are using. Assuming it is scipy.rand(), you will only have one x value and one y value, not much of scatter chart with just one point :) Otherwise, Mike's suggestion is valid. Regards, Daniel On Jun 13, 2012 3:35 PM, "Steven Boada" <boada@...> wrote: > Whoops, I forgot to change the subject. Sorry list. > > List, > > I'm making a scatter plot using a for loop. Here's a simple example.. > > for i in range(10): > x=rand() > y=rand() > scatter(x,y,label='point') > > legend() > show() > > > When you do this, you get a legend entry for every single point. In this > case, I get 9 entries in my legend. > > Is there a way to only get a single entry? I have looked into creating > the legends by hand, but I'm not having much luck. Googling, only turned > up a single example of someone else with the same problem. > > Help me list, you're my only hope. > > Steven > > On 06/13/2012 01:33 PM, Eric Firing wrote: > > On 06/13/2012 07:31 AM, jonasr wrote: > >> Hi, > >> > >> im actually trying to make a countour plot Z=f(X,Y) from two variables > X,Y . > >> My Problem is that i have to use a logarithmic scale for the Z values. > >> If i plot the data with the logarithmic scale it gets pretty ugly, > because i > >> have a lot of values which are zero, > >> which means on the log scale the value goes to inf. > >> Here is an example what i mean > >> > >> http://www.imagebanana.com/view/qh1khpxp/example.png > >> > >> I acutally have no idea how to make the plot look better, > >> maybe somebody has an idea ? > > Use np.ma.masked_less to mask out values below some threshold before > > taking the log. > > > > e.g., > > > > import matplotlib.pyplot as plt > > import numpy as np > > x = np.arange(0, 1, 0.01) > > y = np.arange(0, 8, 0.05) > > X, Y = np.meshgrid(x, y) > > Z = 10 ** (5 + 11 * X * np.sin(Y)) > > Z = np.ma.masked_less(Z, 1e4) > > Zlog = np.ma.log10(Z) > > CS = plt.contourf(X, Y, Zlog, levels=np.arange(3, 5.01, 1.0), > > extend='both') > > plt.colorbar() > > > > > > > > Eric > > > >> thank you > > > > >  > > Live Security Virtual Conference > > Exclusive live event will cover all the ways today's security and > > threat landscape has changed and how IT managers can respond. Discussions > > will include endpoint security, mobile security and the latest in malware > > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > _______________________________________________ > > Matplotlibusers mailing list > > Matplotlibusers@... > > https://lists.sourceforge.net/lists/listinfo/matplotlibusers > > > >  > Steven Boada > Dept. Physics and Astronomy > Texas A&M University > boada@... > > > >  > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers > 
From: Timothy Duly <timduly4@gm...>  20120613 20:01:04

Hello, I am trying to make a simple pcolor plot with a datetime on the xaxis. I am able to get a time label on the xaxis fine with a regular plot command, but it doesn't appear to work if you use pcolor. This simple example below shows that it does not work. Does anyone have any idea as to why a datetime can't go on a pcolor plot? What is the best approach is to solve the problem? Thanks, Tim import numpy as np import datetime import random import matplotlib import matplotlib.pyplot as plt # create some random data, one for a line plot, and another for pcolor: data1 = np.array ([random.random() for k in range(10)]) data2 = np.zeros((10,10)) for i in range(10): for j in range(10): data2[i,j] = random.random() # build datetimes (dts): dts = [] for k in range(10): dts.append(datetime.datetime(2012,1,1+k)) # First example, showing a regular plot with datetimes in the xaxis. fig = plt.figure(1) fig.clf() ax = fig.add_subplot(111) ax.plot(dts,data1) plt.show() # Second example, showing a pcolor with datetimes in the xaxis. # This plot does not work. fig = plt.figure(2) fig.clf() ax = fig.add_subplot(111) ax.pcolor(dts,np.arange(10),data2) plt.show() 
From: Mike Kaufman <mckauf@gm...>  20120613 19:56:59

On 6/13/12 3:23 PM, Steven Boada wrote: > Whoops, I forgot to change the subject. Sorry list. > > List, > > I'm making a scatter plot using a for loop. Here's a simple example.. > > for i in range(10): > x=rand() > y=rand() > scatter(x,y,label='point') > > legend() > show() > > > When you do this, you get a legend entry for every single point. In this > case, I get 9 entries in my legend. > > Is there a way to only get a single entry? I have looked into creating > the legends by hand, but I'm not having much luck. Googling, only turned > up a single example of someone else with the same problem. > > Help me list, you're my only hope. Perhaps not exactly what you want, but an answer is don't use a loop: x = rand(10) y = rand(10) scatter(x,y, label='points') legend() draw() show() Of course if you want to color each point differently, then this won't work. M 
From: Steven Boada <boada@ph...>  20120613 19:56:14

List, I'm making a scatter plot using a for loop. Here's a simple example.. for i in range(10): x=rand() y=rand() scatter(x,y,label='point') legend() show() When you do this, you get a legend entry for every single point. In this case, I get 9 entries in my legend. Is there a way to only get a single entry? I have looked into creating the legends by hand, but I'm not having much luck. Googling, only turned up a single example of someone else with the same problem. Help me list, you're my only hope. Steven 
From: Steven Boada <boada@ph...>  20120613 19:34:44

Whoops, I forgot to change the subject. Sorry list. List, I'm making a scatter plot using a for loop. Here's a simple example.. for i in range(10): x=rand() y=rand() scatter(x,y,label='point') legend() show() When you do this, you get a legend entry for every single point. In this case, I get 9 entries in my legend. Is there a way to only get a single entry? I have looked into creating the legends by hand, but I'm not having much luck. Googling, only turned up a single example of someone else with the same problem. Help me list, you're my only hope. Steven On 06/13/2012 01:33 PM, Eric Firing wrote: > On 06/13/2012 07:31 AM, jonasr wrote: >> Hi, >> >> im actually trying to make a countour plot Z=f(X,Y) from two variables X,Y . >> My Problem is that i have to use a logarithmic scale for the Z values. >> If i plot the data with the logarithmic scale it gets pretty ugly, because i >> have a lot of values which are zero, >> which means on the log scale the value goes to inf. >> Here is an example what i mean >> >> http://www.imagebanana.com/view/qh1khpxp/example.png >> >> I acutally have no idea how to make the plot look better, >> maybe somebody has an idea ? > Use np.ma.masked_less to mask out values below some threshold before > taking the log. > > e.g., > > import matplotlib.pyplot as plt > import numpy as np > x = np.arange(0, 1, 0.01) > y = np.arange(0, 8, 0.05) > X, Y = np.meshgrid(x, y) > Z = 10 ** (5 + 11 * X * np.sin(Y)) > Z = np.ma.masked_less(Z, 1e4) > Zlog = np.ma.log10(Z) > CS = plt.contourf(X, Y, Zlog, levels=np.arange(3, 5.01, 1.0), > extend='both') > plt.colorbar() > > > > Eric > >> thank you > >  > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers >  Steven Boada Dept. Physics and Astronomy Texas A&M University boada@... 
From: Benjamin Root <ben.root@ou...>  20120613 19:22:45

On Wed, Jun 13, 2012 at 10:46 AM, Peter Würtz <pwuertz@...>wrote: > > I'm sorry, there seems to be a mess. Nabble told me that this mail to the > list was not accepted for unknown reasons so I deleted it. Here is the > example I was talking about in the previous mail: > > import matplotlib > import pylab as p > > p.plot([1,2,3]) > p.xticks([1],["tick"]) > ax = p.gca() > fig = p.gcf() > > p.draw() > def print_texts(artist): > for t in artist.findobj(matplotlib.text.Text): > if t.get_visible() and t.get_text(): > print " %s @ %s" % (t.get_text(), t.get_position()) > > print "XAxis" > print_texts(ax.xaxis) > print "YAxis" > print_texts(ax.yaxis) > This is my output using v1.1.1rc2 XAxis tick @ (1.0, 0.0) tick @ (0.0, 1.0) YAxis 1.0 @ (0.0, 1.0) 1.0 @ (1.0, 0.0) 1.5 @ (0.0, 1.5) 1.5 @ (1.0, 0.0) 2.0 @ (0.0, 2.0) 2.0 @ (1.0, 0.0) 2.5 @ (0.0, 2.5) 2.5 @ (1.0, 0.0) 3.0 @ (0.0, 3.0) 3.0 @ (1.0, 0.0) Strange indeed. Ben Root 
From: Goyo <goyodiaz@gm...>  20120613 19:01:39

2012/6/12 Paul Hobson <pmhobson@...>: > On Mon, Jun 11, 2012 at 11:03 PM, Justin R <justinbrowe@...> wrote: > Justin, could you post a selfcontained script that demonstrates the > issue? Where does this PCA function come from? It comes from matplotlib.mlab. Just add these imports before the OP's code: import numpy as np from matplotlib.mlab import PCA But I don't know much about PCA and can't comment on this. Goyo 
From: Eric Firing <efiring@ha...>  20120613 18:33:38

On 06/13/2012 07:31 AM, jonasr wrote: > > Hi, > > im actually trying to make a countour plot Z=f(X,Y) from two variables X,Y . > My Problem is that i have to use a logarithmic scale for the Z values. > If i plot the data with the logarithmic scale it gets pretty ugly, because i > have a lot of values which are zero, > which means on the log scale the value goes to inf. > Here is an example what i mean > > http://www.imagebanana.com/view/qh1khpxp/example.png > > I acutally have no idea how to make the plot look better, > maybe somebody has an idea ? Use np.ma.masked_less to mask out values below some threshold before taking the log. e.g., import matplotlib.pyplot as plt import numpy as np x = np.arange(0, 1, 0.01) y = np.arange(0, 8, 0.05) X, Y = np.meshgrid(x, y) Z = 10 ** (5 + 11 * X * np.sin(Y)) Z = np.ma.masked_less(Z, 1e4) Zlog = np.ma.log10(Z) CS = plt.contourf(X, Y, Zlog, levels=np.arange(3, 5.01, 1.0), extend='both') plt.colorbar() Eric > > thank you 
From: jonasr <jonas.ruebsam@we...>  20120613 17:31:28

Hi, im actually trying to make a countour plot Z=f(X,Y) from two variables X,Y . My Problem is that i have to use a logarithmic scale for the Z values. If i plot the data with the logarithmic scale it gets pretty ugly, because i have a lot of values which are zero, which means on the log scale the value goes to inf. Here is an example what i mean http://www.imagebanana.com/view/qh1khpxp/example.png I acutally have no idea how to make the plot look better, maybe somebody has an idea ? thank you  View this message in context: http://old.nabble.com/logairthmiccontourplottp34007155p34007155.html Sent from the matplotlib  users mailing list archive at Nabble.com. 
From: R. O'Gara <ronogara@ya...>  20120613 17:25:13

http://www.extrarico.com/wpcontent/themes/cupcakes_for_dessert_hoe34/googlemail.html 
From: pybokeh <pybokeh@gm...>  20120613 17:21:14

Sorry looks like my smartphone's copy/paste removed carriage return in certain places in the script :( On Jun 13, 2012 12:32 PM, "Chris Withers" <chris@...> wrote: > Hi all, > > I have some time series of disk usage that I'd like to do a linear > regression on an plot on a nice graph with Mb used on the yaxis and > date on the x axis. > > I tried to use pylab.polyfit(dates, usage) where: > > dates = [datetime(x, y, z), datetime(a, b, c), ...] > usage = [12123234, 2234235235, ...] > > ...but polyfit doesn't like the dates. > > How should I do this? > > Any example of a nice plot and linear regression using matplotlib? > > cheers, > > Chris > >  > Simplistix  Content Management, Batch Processing & Python Consulting >  http://www.simplistix.co.uk > > >  > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers > 
From: pybokeh <pybokeh@gm...>  20120613 17:14:24

Check out linregress from scipy.stats module. Not sure if it will handle dates. Sample script below: from scipy.stats import pearsonr from scipy.stats import linregress from matplotlib import pyplot as plt import numpy as np sat = np.array([595,520,715,405,680,490,565]) gpa = np.array([3.4,3.2,3.9,2.3,3.9,2.5,3.5]) fig1 = plt.figure(1) ax = plt.subplot(1,1,1) pearson = pearsonr(sat, gpa) plt.scatter(sat,gpa, label="data") # Get linear regression parameters slope, intercept, r_value, p_value, std_err = linregress(sat, gpa) # Format the chart plt.xlabel("SAT Scores") plt.ylabel("GPA") plt.title("Scatter Plot with Linear Regression Fit\nY=a*X + b\na=%0.4f, b=%0.4f" % (slope, intercept)) plt.grid() # Create linear regression x values x_lr = sat # Create linear regression y values: Y = slope*X + intercept y_lr = slope * x_lr + intercept print "Pearson correlation coefficient: ", pearson[0] print "Fit xvalues: ", str(x_lr) print "Fit yvalues: ", str(y_lr) print "Fit slope: ",slope print "Fit intercept: ", intercept plt.plot(x_lr, y_lr, label="fit") plt.legend() plt.show() Regards, Daniel On Jun 13, 2012 12:32 PM, "Chris Withers" <chris@...> wrote: > Hi all, > > I have some time series of disk usage that I'd like to do a linear > regression on an plot on a nice graph with Mb used on the yaxis and > date on the x axis. > > I tried to use pylab.polyfit(dates, usage) where: > > dates = [datetime(x, y, z), datetime(a, b, c), ...] > usage = [12123234, 2234235235, ...] > > ...but polyfit doesn't like the dates. > > How should I do this? > > Any example of a nice plot and linear regression using matplotlib? > > cheers, > > Chris > >  > Simplistix  Content Management, Batch Processing & Python Consulting >  http://www.simplistix.co.uk > > >  > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers > 
From: Chao YUE <chaoyuejoy@gm...>  20120613 16:41:13

Dear all, asking question in a good way is art and I am trying to do that :). I spent whole day trying to put an inset axes within another hosting axes the exact position I want. and from here http://old.nabble.com/Addingcustomaxeswithinasubplottd22159536.html JaeJoon Lee <http://old.nabble.com/user/UserProfile.jtp?user=1141641>; gave a good answer using only four lines: Bbox = matplotlib.transforms.Bbox.from_bounds(.4, .1, .5, .3) #numbers in fraction of hosting axes trans = ax.transAxes + fig.transFigure.inverted() l, b, w, h = matplotlib.transforms.TransformedBbox(Bbox, trans).bounds axins = fig.add_axes([l, b, w, h]) It works fine. Now my question is I want inset axes to have 'equal' aspect because I want 1:1 ratio plot. and I found that using axins.set_aspect('equal') will change the position of the inset axes. Then I tried to adjust the width and height of inset axes with the hosting axes aspect ratio before I draw it so that I would expect they look already "aspectequal" before I feed data to it. So my first question is, How can I get the axes aspect ratio, axes.get_aspect() and axes._aspect both give only 'auto' but not numerical value. (I assume it's height/width ratio in terms of figure fraction or it's inverse?, I tried this but it doesn't work.) another sidequestion, I have a feeling that understanding transform is of great value working with matplotlib. But I don't understand the four lines above, and I can not find further information either in the matplotlib document or online. Is there any source except having dig into source code? thanks!!!!!!!! I make an example script below to show the problem (long but easy). I hope someone could offer some help. :) ###script showing the problem fig=plt.figure() #plot two subplot to have ax aspect far from 'equal' ax=fig.add_subplot(211) a=np.arange(0,2*np.pi,0.1) ax.plot(a,np.sin(a)) def create_inset_axes(x0,y0,width,height): #the four numbers are x0,y0,width,height Bbox = matplotlib.transforms.Bbox.from_bounds(x0,y0,width,height) trans = ax.transAxes + fig.transFigure.inverted() l, b, w, h = matplotlib.transforms.TransformedBbox(Bbox, trans).bounds return fig.add_axes([l, b, w, h]) def get_axes_aspect_ratio(ax): box=ax.get_position() ratio=(box.x1box.x0)/(box.y1box.y0) return ratio axins=create_inset_axes(0.1,0.05,0.2,0.2) axins.plot(np.arange(10),'ro') ax.text(0.35,0.15,'no any adjustment',transform=ax.transAxes) axins=create_inset_axes(0.1, 0.3, 0.2, 0.2) axins.plot(np.arange(10),'ro') axins.set_aspect('equal') ax.text(0.35,0.4,'explicitly set aspect as equal',transform=ax.transAxes) axins=create_inset_axes(0.1, 0.55, 0.2, 0.2*ratio) #adjust the height by ax axes width/height ratio axins.plot(np.arange(10),'ro') ax.text(0.35,0.7,'adjust with hosting axes width/length ratio',transform=ax.transAxes) cheers, Chao  *********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCEIPSL) UMR 1572 CEACNRSUVSQ Batiment 712  Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 ************************************************************************************ 
From: Chris Withers <chris@si...>  20120613 16:30:57

Hi all, I have some time series of disk usage that I'd like to do a linear regression on an plot on a nice graph with Mb used on the yaxis and date on the x axis. I tried to use pylab.polyfit(dates, usage) where: dates = [datetime(x, y, z), datetime(a, b, c), ...] usage = [12123234, 2234235235, ...] ...but polyfit doesn't like the dates. How should I do this? Any example of a nice plot and linear regression using matplotlib? cheers, Chris  Simplistix  Content Management, Batch Processing & Python Consulting  http://www.simplistix.co.uk 
From: Peter Würtz <pwuertz@go...>  20120613 14:46:22

I'm sorry, there seems to be a mess. Nabble told me that this mail to the list was not accepted for unknown reasons so I deleted it. Here is the example I was talking about in the previous mail: import matplotlib import pylab as p p.plot([1,2,3]) p.xticks([1],["tick"]) ax = p.gca() fig = p.gcf() p.draw() def print_texts(artist): for t in artist.findobj(matplotlib.text.Text): if t.get_visible() and t.get_text(): print " %s @ %s" % (t.get_text(), t.get_position()) print "XAxis" print_texts(ax.xaxis) print "YAxis" print_texts(ax.yaxis)  View this message in context: http://old.nabble.com/DuplicateTickstp34005378p34005490.html Sent from the matplotlib  users mailing list archive at Nabble.com. 
From: Mike Kaufman <mckauf@gm...>  20120613 12:47:47

I believe that the only way to add a patch is through ax.add_patch() Should there be an associated pyplot patch() command? M 
From: Peter Würtz <pwuertz@go...>  20120613 12:34:56

Hello, I'm searching for a way to extract all text elements from a matplotlib figure including their positions, styles, alignments etc. I first tried to write a custom backend and to fetch all the texts from the "draw_text()" method of the renderer. In contrast to the documentation "draw_text()" does not receive a matplotlib.text.Text instance with all the necessary information but only a simple string and a prelayouted position. So I found this "findobj" method to get all Text elements from a figure in a list, which is exactly what I was looking for. However, I get some weird duplicates for all the tick labels and I don't know how to handle them. This is a small example that uses findobj on the axis objects and prints the texts. import matplotlib import pylab as p p.plot([1,2,3]) p.xticks([1],["tick"]) ax = p.gca() fig = p.gcf() p.draw() def print_texts(artist): for t in artist.findobj(matplotlib.text.Text): if t.get_visible() and t.get_text(): print " %s @ %s" % (t.get_text(), t.get_position()) print "XAxis" print_texts(ax.xaxis) print "YAxis" print_texts(ax.yaxis) On all my matplotlib installations, all tick labels have duplicates positioned at the end of the axis. Why? How to filter them out from a list of Text elements? Their get_visible() attribute is True. Another thing is that I first had to do a "draw()" call in order to have the ticks generated/updated at all. How do I force an update of the tick labels. Colorbar seems to have a "update_ticks()" method, but I can't find something similar for the axis ticks. 
From: Peter Würtz <pwuertz@go...>  20120613 12:28:15

Hello, I'm searching for a way to extract all text elements from a matplotlib figure including their positions, styles, alignments etc. I first tried to write a custom backend and to fetch all the texts from the "draw_text()" method of the renderer. In contrast to the documentation "draw_text()" does not receive a matplotlib.text.Text instance with all the necessary information but only a simple string and a prelayouted position. So I found this "findobj" method to get all Text elements from a figure in a list, which is exactly what I was looking for. However, I get some weird duplicates for all the tick labels and I don't know how to handle them. This is a small example that uses findobj on the axis objects and prints the texts. http://old.nabble.com/file/p34004789/duplicate_ticks.py On all my matplotlib installations, all tick labels have duplicates positioned at the end of the axis. Why? How to filter them out from a list of Text elements? Their get_visible() attribute is True. Another thing is that I first had to do a "draw()" call in order to have the ticks generated/updated at all. How do I force an update of the tick labels. Colorbar seems to have a "update_ticks()" method, but I can't find something similar for the axis ticks.  View this message in context: http://old.nabble.com/DuplicateTickstp34004789p34004789.html Sent from the matplotlib  users mailing list archive at Nabble.com. 