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
(7) |
2
(12) |
3
(7) |
4
(23) |
5
(5) |
6
(7) |
7
(4) |
|
8
(7) |
9
(25) |
10
(17) |
11
(25) |
12
(11) |
13
(8) |
14
(6) |
|
15
(1) |
16
(22) |
17
(11) |
18
(12) |
19
(22) |
20
(32) |
21
(9) |
|
22
(4) |
23
(16) |
24
(5) |
25
(9) |
26
(26) |
27
(21) |
28
(14) |
|
29
(6) |
30
(8) |
31
(4) |
|
|
|
|
|
From: Adam G. <am...@st...> - 2010-08-28 05:13:54
|
I found a web page in which someone has done the horrible task of figuring out how the hell you compile in Cygwin. Details below: http://innuendopoly.org/arch/matplotlib-cygwin In short, the Cygwin compile runs into TONS of errors as is, and it seems the matplotlib developers aren't really supporting it. Trying their techniques to see if it works, but so far looking good.... |
|
From: Eric F. <ef...@ha...> - 2010-08-28 04:28:36
|
On 08/27/2010 05:43 PM, Benjamin Root wrote: > On Fri, Aug 27, 2010 at 10:17 PM, Chiara Caronna > <chi...@ho... <mailto:chi...@ho...>> wrote: > > Ok, it is a backend issue: > I checked and I was using Qt4Agg > as soon as I changed to TkAgg the script worked fine... > still is this normal or is it a bug? > thanks for your suggestion and help! > Chiara > > > I suspect that it might have been fixed since 1.0 was released, but I am > unable to confirm that using the machine I have with me. Can someone > using the svn build of mpl check to see if the script works with the > Qt4Agg backend? No, it does not work on qt4agg, but it does work on qtagg and wxagg as well as gtkagg and tkagg. Eric > > Ben Root > > > > ------------------------------------------------------------------------------ > Sell apps to millions through the Intel(R) Atom(Tm) Developer Program > Be part of this innovative community and reach millions of netbook users > worldwide. Take advantage of special opportunities to increase revenue and > speed time-to-market. Join now, and jumpstart your future. > http://p.sf.net/sfu/intel-atom-d2d > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Benjamin R. <ben...@ou...> - 2010-08-28 03:43:49
|
On Fri, Aug 27, 2010 at 10:17 PM, Chiara Caronna <chi...@ho...>wrote: > Ok, it is a backend issue: > I checked and I was using Qt4Agg > as soon as I changed to TkAgg the script worked fine... > still is this normal or is it a bug? > thanks for your suggestion and help! > Chiara > > I suspect that it might have been fixed since 1.0 was released, but I am unable to confirm that using the machine I have with me. Can someone using the svn build of mpl check to see if the script works with the Qt4Agg backend? Ben Root |
|
From: Chiara C. <chi...@ho...> - 2010-08-28 03:17:57
|
Ok, it is a backend issue:
I checked and I was using Qt4Agg
as soon as I changed to TkAgg the script worked fine...
still is this normal or is it a bug?
thanks for your suggestion and help!
Chiara
From: chi...@ho...
To: ben...@ou...
Date: Sat, 28 Aug 2010 03:01:54 +0000
CC: mat...@li...
Subject: Re: [Matplotlib-users] realtime plotting was working with matplotlib 0.99.1.1 and it doesn't with matplotlib 1.0.0
I think I am using TkAgg but I am not sure, how can I check it?
From: ben...@ou...
Date: Fri, 27 Aug 2010 21:50:19 -0500
Subject: Re: [Matplotlib-users] realtime plotting was working with matplotlib 0.99.1.1 and it doesn't with matplotlib 1.0.0
To: chi...@ho...
CC: mat...@li...
On Fri, Aug 27, 2010 at 9:26 PM, Chiara Caronna <chi...@ho...> wrote:
Hi all,
I have a script to update a plot in real time. It was working fine with matplotlib 0.99.1.1 but it doesn't work anymore with the new version.
Here is the script:
import numpy as n
import pylab as p
x=n.arange(10)
y=n.random.randn(10)
p.ion()
fig=p.figure(1)
ax=fig.add_subplot(111)
line,=ax.plot(x,y,'ko-')
for i in range(10):
y=n.random.randn(10)
line.set_data(x,y)
p.draw()
it is updating the plot correctly with matplotlib 0.99.1.1
when I run it with matplotlib 1.0.0
it doesn't show any picture at all
Interestingly, if I add a line raw_input('ok') then it shows the plot and it updates it inside the loop....
x=n.arange(10)
y=n.random.randn(10)
p.ion()
fig=p.figure(1)
ax=fig.add_subplot(111)
line,=ax.plot(x,y,'ko-')
raw_input('ok?')
for i in range(10):
y=n.random.randn(10)
line.set_data(x,y)
p.draw()
raw_input('ok?')
Any idea why it is doing this? Is it a bug or am I missing something?
Thanks for your help,
Chiara
It seems to work fine for me using the GTKAgg backend. Which backend are you using? Also, admittedly, this is the trunk build, so it might have some fixes that weren't in the release.
Ben Root
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Matplotlib-users mailing list
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Chiara C. <chi...@ho...> - 2010-08-28 03:02:00
|
I think I am using TkAgg but I am not sure, how can I check it?
From: ben...@ou...
Date: Fri, 27 Aug 2010 21:50:19 -0500
Subject: Re: [Matplotlib-users] realtime plotting was working with matplotlib 0.99.1.1 and it doesn't with matplotlib 1.0.0
To: chi...@ho...
CC: mat...@li...
On Fri, Aug 27, 2010 at 9:26 PM, Chiara Caronna <chi...@ho...> wrote:
Hi all,
I have a script to update a plot in real time. It was working fine with matplotlib 0.99.1.1 but it doesn't work anymore with the new version.
Here is the script:
import numpy as n
import pylab as p
x=n.arange(10)
y=n.random.randn(10)
p.ion()
fig=p.figure(1)
ax=fig.add_subplot(111)
line,=ax.plot(x,y,'ko-')
for i in range(10):
y=n.random.randn(10)
line.set_data(x,y)
p.draw()
it is updating the plot correctly with matplotlib 0.99.1.1
when I run it with matplotlib 1.0.0
it doesn't show any picture at all
Interestingly, if I add a line raw_input('ok') then it shows the plot and it updates it inside the loop....
x=n.arange(10)
y=n.random.randn(10)
p.ion()
fig=p.figure(1)
ax=fig.add_subplot(111)
line,=ax.plot(x,y,'ko-')
raw_input('ok?')
for i in range(10):
y=n.random.randn(10)
line.set_data(x,y)
p.draw()
raw_input('ok?')
Any idea why it is doing this? Is it a bug or am I missing something?
Thanks for your help,
Chiara
It seems to work fine for me using the GTKAgg backend. Which backend are you using? Also, admittedly, this is the trunk build, so it might have some fixes that weren't in the release.
Ben Root
|
|
From: Benjamin R. <ben...@ou...> - 2010-08-28 02:50:55
|
On Fri, Aug 27, 2010 at 9:26 PM, Chiara Caronna
<chi...@ho...>wrote:
> Hi all,
> I have a script to update a plot in real time. It was working fine with
> matplotlib 0.99.1.1 but it doesn't work anymore with the new version.
>
> Here is the script:
>
> import numpy as n
> import pylab as p
>
> x=n.arange(10)
> y=n.random.randn(10)
> p.ion()
> fig=p.figure(1)
> ax=fig.add_subplot(111)
> line,=ax.plot(x,y,'ko-')
> for i in range(10):
> y=n.random.randn(10)
> line.set_data(x,y)
> p.draw()
>
>
> it is updating the plot correctly with matplotlib 0.99.1.1
> when I run it with matplotlib 1.0.0
> it doesn't show any picture at all
>
> Interestingly, if I add a line raw_input('ok') then it shows the plot and
> it updates it inside the loop....
>
>
> x=n.arange(10)
> y=n.random.randn(10)
> p.ion()
> fig=p.figure(1)
> ax=fig.add_subplot(111)
> line,=ax.plot(x,y,'ko-')
> raw_input('ok?')
> for i in range(10):
> y=n.random.randn(10)
> line.set_data(x,y)
> p.draw()
> raw_input('ok?')
>
> Any idea why it is doing this? Is it a bug or am I missing something?
>
> Thanks for your help,
> Chiara
>
>
It seems to work fine for me using the GTKAgg backend. Which backend are
you using? Also, admittedly, this is the trunk build, so it might have some
fixes that weren't in the release.
Ben Root
|
|
From: Chiara C. <chi...@ho...> - 2010-08-28 02:26:20
|
Hi all,
I have a script to update a plot in real time. It was working fine with matplotlib 0.99.1.1 but it doesn't work anymore with the new version.
Here is the script:
import numpy as n
import pylab as p
x=n.arange(10)
y=n.random.randn(10)
p.ion()
fig=p.figure(1)
ax=fig.add_subplot(111)
line,=ax.plot(x,y,'ko-')
for i in range(10):
y=n.random.randn(10)
line.set_data(x,y)
p.draw()
it is updating the plot correctly with matplotlib 0.99.1.1
when I run it with matplotlib 1.0.0
it doesn't show any picture at all
Interestingly, if I add a line raw_input('ok') then it shows the plot and it updates it inside the loop....
x=n.arange(10)
y=n.random.randn(10)
p.ion()
fig=p.figure(1)
ax=fig.add_subplot(111)
line,=ax.plot(x,y,'ko-')
raw_input('ok?')
for i in range(10):
y=n.random.randn(10)
line.set_data(x,y)
p.draw()
raw_input('ok?')
Any idea why it is doing this? Is it a bug or am I missing something?
Thanks for your help,
Chiara
|
|
From: Yi S. <mir...@gm...> - 2010-08-27 21:33:11
|
Hi Ben,
Thanks for the reply. I did try to match font.family and font.$family and I
am using matplotlib 0.99.0.
I did find something interesting...
For testing, I tried only using font.family line, (deleting font.$family
line). I got reasonable font for "monospace", "fantasy" "sans-serif" and
"serif" family, but "cursive" looked exactly the same as "sans-serif", which
is the default font.family value.
Then, I added font.$family line. When font.family and font.$family match,
as you suggested, I always get the default font as if I only specified
font.family as sans-serif. {''font.family' : 'fantasy', 'font.fantasy' :
'Chicago'} gives me the default font, {''font.family' : 'fantasy',
'font.fantasy' : 'foo'} also gives me the default font ('Chicago is
actually in 'fantasy' family, 'foo' is not).
Then I tried to mismatch font.family and font.$family, since they are not
matching, font.$family is not taking effect, I am getting whatever
font.family line is giving me.
I think the syntax I used may be wrong. Anyone has any idea how to specify a
specific font name within a font family?
On Fri, Aug 27, 2010 at 4:13 PM, Benjamin Root <ben...@ou...> wrote:
> On Fri, Aug 27, 2010 at 2:33 PM, Yi Shang <mir...@gm...>wrote:
>
>> Dear all,
>> I was trying to change all figure fonts to Arial, or Times, but without
>> any luck.
>> below is the section I modify the property.
>>
>> ***************************************************************************************
>> from numpy import *
>> from matplotlib import pyplot as plt
>> import pylab
>> params = {'font.size' : 16,
>> 'axes.labelsize' : 16,
>> 'font.style' : 'normal',
>> 'font.family' : 'sans-serif',
>> 'font.sans-serif' : 'Arial'
>> }
>> pylab.rcParams.update(params)
>>
>> ****************************************************************************************
>> The font.family line seems to be working ( I get different fonts when I
>> specify 'sans-serif' or 'monospace'), but changing font.sans-serif has no
>> effect at all. If the resulting figure is not changing, does it mean the
>> font used is always the default in sans-serif family(Bitstream Vera Sans)? I
>> wonder why matplotlib doesn't use more common fonts as default, like Arial
>> or Times which are accepted by most journals..
>>
>>
>> Thank you!
>>
>
> Yi,
>
> This is just a guess, but I wonder if there might be a slight mistake on
> how you are specifying the font. If 'font.family' is set to 'monospace',
> then the font name has to be assigned to 'font.monospace', not
> 'font.sans-serif'. Does that make a difference?
>
> Ben Root
>
--
Yi (Miranda) Shang
PhD candidate
Graduate Program in Molecular and Cellular Biology
Stony Brook University
|
|
From: Benjamin R. <ben...@ou...> - 2010-08-27 20:14:05
|
On Fri, Aug 27, 2010 at 2:33 PM, Yi Shang <mir...@gm...> wrote:
> Dear all,
> I was trying to change all figure fonts to Arial, or Times, but without any
> luck.
> below is the section I modify the property.
>
> ***************************************************************************************
> from numpy import *
> from matplotlib import pyplot as plt
> import pylab
> params = {'font.size' : 16,
> 'axes.labelsize' : 16,
> 'font.style' : 'normal',
> 'font.family' : 'sans-serif',
> 'font.sans-serif' : 'Arial'
> }
> pylab.rcParams.update(params)
>
> ****************************************************************************************
> The font.family line seems to be working ( I get different fonts when I
> specify 'sans-serif' or 'monospace'), but changing font.sans-serif has no
> effect at all. If the resulting figure is not changing, does it mean the
> font used is always the default in sans-serif family(Bitstream Vera Sans)? I
> wonder why matplotlib doesn't use more common fonts as default, like Arial
> or Times which are accepted by most journals..
>
>
> Thank you!
>
Yi,
This is just a guess, but I wonder if there might be a slight mistake on how
you are specifying the font. If 'font.family' is set to 'monospace', then
the font name has to be assigned to 'font.monospace', not
'font.sans-serif'. Does that make a difference?
Ben Root
|
|
From: Yi S. <mir...@gm...> - 2010-08-27 19:33:37
|
Dear all,
I was trying to change all figure fonts to Arial, or Times, but without any
luck.
below is the section I modify the property.
***************************************************************************************
from numpy import *
from matplotlib import pyplot as plt
import pylab
params = {'font.size' : 16,
'axes.labelsize' : 16,
'font.style' : 'normal',
'font.family' : 'sans-serif',
'font.sans-serif' : 'Arial'
}
pylab.rcParams.update(params)
****************************************************************************************
The font.family line seems to be working ( I get different fonts when I
specify 'sans-serif' or 'monospace'), but changing font.sans-serif has no
effect at all. If the resulting figure is not changing, does it mean the
font used is always the default in sans-serif family(Bitstream Vera Sans)? I
wonder why matplotlib doesn't use more common fonts as default, like Arial
or Times which are accepted by most journals..
Thank you!
--
Yi (Miranda) Shang
PhD candidate
Graduate Program in Molecular and Cellular Biology
Stony Brook University
|
|
From: Jeff W. <js...@fa...> - 2010-08-27 19:30:39
|
On 8/27/10 12:05 PM, Brian Larsen wrote: > Thanks, that a step, but how do I tell matplotlib where to then put > this map? It needs to be on the current figure with the current axes > but between 0 and 1 in radius. > > Imagine this plot but the black circle instead contains a map of the > earth as seen from space in the right viewing geometry. > http://plasmasphere.nasa.gov/models/gcpm_v22_eq_kp1.jpg > > I can work out the geometry and all but putting the map in that black > region has me baffled. > > Brian Brian: You can make the basemap axes sit inside your other figure by setting the axes limits manually. Even if you could figure out exactly where to put it though - it will cover more than the black region (the basemap axes will be square). Perhaps the axes background can be set to be transparent - I don't know for sure. -Jeff > > > > > On Aug 27, 2010, at 11:52 AM, Aman Thakral wrote: > >> Here is an example of the general usage for an orthographic projection. >> >> def genMap(fig, ax, llcrnrlon,llcrnrlat,urcrnrlon,urcrnrlat): >> fig.sca(ax) >> m = >> Basemap(resolution='i',projection='ortho',lon_0=(urcrnrlon+llcrnrlon)/2,lat_0=(urcrnrlat+llcrnrlat)/2) >> m.drawcoastlines() >> m.drawmapboundary(fill_color='aqua') >> m.drawstates(linewidth=3) >> m.fillcontinents(color='coral',lake_color='aqua') >> m.drawcountries(linewidth=3) >> >> where: >> llcrnlon = lower left corner longitude >> llcrnlat = lower left corner latitude >> urcrnlon =upper right corner longitude >> urcrnlat = upper right corner latitude >> >> >> On Fri, Aug 27, 2010 at 1:39 PM, Brian Larsen <bal...@la... >> <mailto:bal...@la...>> wrote: >> >> Ben, >> >> I have but no where in there do I see (or at least understand) >> how to draw a map on top of a current figure with set bounds in >> data space... >> >> Cheers, >> >> Brian >> >> >> On Aug 27, 2010, at 11:24 AM, Benjamin Root wrote: >> >>> On Fri, Aug 27, 2010 at 12:11 PM, Brian Larsen >>> <bal...@la... <mailto:bal...@la...>> wrote: >>> >>> Hello all, >>> >>> I am plotting satellite orbit files and it looks really nice >>> to plot an Earth in the center with the continents on it to >>> orient people to where the spacecraft is. Does anyway know >>> how to do this? All I seem to be able to do is create a >>> whole globe as the figure. >>> >>> In this simple example: >>> >>> from pylab import * >>> r = ndarray(40) >>> r[:] = 3.3 >>> rad = linspace(0, 2*pi, 40) >>> figure() >>> subplot(111, polar=True) >>> plot(rad, r, lw=3) >>> draw() >>> >>> >>> wouldn't it look great to have the earth plotted in the >>> space up to 1.0 (as measured in earth radii)? >>> >>> Thanks much, >>> >>> Brian >>> >>> >>> >>> Have you checked out the basemap tool? >>> >>> http://matplotlib.sourceforge.net/basemap/doc/html/ >>> >>> Ben Root >>> >> >> >> >> >> >> -- >> >> Brian A. Larsen >> Space Science and Applications >> Group ISR-1 >> Los Alamos National Laboratory >> PO Box 1663, MS-D466 >> Los Alamos, NM 87545 >> USA >> >> (For overnight add: >> SM-30, Bikini Atoll Road) >> >> Phone: 505-665-7691 >> Fax: 505-665-7395 >> email: bal...@la... <mailto:bal...@la...> >> >> Correspondence / >> Technical data or Software Publicly Available >> >> >> >> >> >> ------------------------------------------------------------------------------ >> Sell apps to millions through the Intel(R) Atom(Tm) Developer Program >> Be part of this innovative community and reach millions of >> netbook users >> worldwide. Take advantage of special opportunities to increase >> revenue and >> speed time-to-market. Join now, and jumpstart your future. >> http://p.sf.net/sfu/intel-atom-d2d >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> <mailto:Mat...@li...> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> >> >> -- >> Aman Thakral >> B.Eng & Biosci, M.Eng Design > > > > > > -- > > Brian A. Larsen > Space Science and Applications > Group ISR-1 > Los Alamos National Laboratory > PO Box 1663, MS-D466 > Los Alamos, NM 87545 > USA > > (For overnight add: > SM-30, Bikini Atoll Road) > > Phone: 505-665-7691 > Fax: 505-665-7395 > email: bal...@la... <mailto:bal...@la...> > > Correspondence / > Technical data or Software Publicly Available > > > > > > ------------------------------------------------------------------------------ > Sell apps to millions through the Intel(R) Atom(Tm) Developer Program > Be part of this innovative community and reach millions of netbook users > worldwide. Take advantage of special opportunities to increase revenue and > speed time-to-market. Join now, and jumpstart your future. > http://p.sf.net/sfu/intel-atom-d2d > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
|
From: Ryan M. <rm...@gm...> - 2010-08-27 18:33:08
|
On Fri, Aug 27, 2010 at 1:16 PM, Eric Firing <ef...@ha...> wrote: > On 08/27/2010 07:15 AM, Ryan May wrote: >> You can make the circle this way, specifying everything in axes coordinates: >> >> cp = patches.Circle((.5,.5),.025, transform=ax.transAxes) >> >> However, this puts the circle in the same spot in axes coordinates >> [(0.5,0.5) is the middle of the plot]. I'm not sure if that's what you >> want. I can't see any way to get Circle to use different transforms >> for the center and the size, so from here the only path forward I see >> is subclassing Circle. This way you could add code to the draw method >> to calculate the center in axes coordinates from the center in data >> coords. This needs to be done at draw time since the mapping of data >> coords->axes coords changes as you pan and zoom. > > A simpler alternative is to use a CircleCollection with a single member. > Collections allow separate transforms for the patch and the offset; > the latter determines the location of the center. Why in the world didn't that occur to me? Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
|
From: Eric F. <ef...@ha...> - 2010-08-27 18:16:21
|
On 08/27/2010 07:15 AM, Ryan May wrote:
> On Thu, Aug 26, 2010 at 2:24 PM, Ben Edwards<bed...@cs...> wrote:
>> Hello, I've used matplotlib for a while but never had cause to ask a
>> question until now. I am trying to add a patch to an axis, but would like
>> the patch to remain the same size when, interactively, I resize the
>> resulting figure. I am using TkAgg, and trying the following:
>>>>> import matplotlib.pyplot as plt
>>>>> import matplotlib.patches as patches
>>>>> ax = plt.gca()
>>>>> cp = patches.Circle((.5,.5),.025)
>>>>> ax.add_patch(cp)
>>>>> ax.set_aspect('equal')
>>>>> plt.draw()
>>>>> plt.show()
>> This gives me a nice blue circle in the middle of the plot, and using
>> ax.set_aspect('equal') I know that it will not be distorted into an ellipse.
>> But is there a way to ensure that when I make the Tk window bigger, that the
>> circle appears to be the same size as it was previously? I assume this would
>> entail some sort of transform, but I don't quite understand how they work...
>
> You can make the circle this way, specifying everything in axes coordinates:
>
> cp = patches.Circle((.5,.5),.025, transform=ax.transAxes)
>
> However, this puts the circle in the same spot in axes coordinates
> [(0.5,0.5) is the middle of the plot]. I'm not sure if that's what you
> want. I can't see any way to get Circle to use different transforms
> for the center and the size, so from here the only path forward I see
> is subclassing Circle. This way you could add code to the draw method
> to calculate the center in axes coordinates from the center in data
> coords. This needs to be done at draw time since the mapping of data
> coords->axes coords changes as you pan and zoom.
A simpler alternative is to use a CircleCollection with a single member.
Collections allow separate transforms for the patch and the offset;
the latter determines the location of the center.
Eric
>
> Ryan
>
|
|
From: Brian L. <bal...@la...> - 2010-08-27 18:05:34
|
Thanks, that a step, but how do I tell matplotlib where to then put this map? It needs to be on the current figure with the current axes but between 0 and 1 in radius. Imagine this plot but the black circle instead contains a map of the earth as seen from space in the right viewing geometry. http://plasmasphere.nasa.gov/models/gcpm_v22_eq_kp1.jpg I can work out the geometry and all but putting the map in that black region has me baffled. Brian On Aug 27, 2010, at 11:52 AM, Aman Thakral wrote: > Here is an example of the general usage for an orthographic projection. > > def genMap(fig, ax, llcrnrlon,llcrnrlat,urcrnrlon,urcrnrlat): > fig.sca(ax) > m = Basemap(resolution='i',projection='ortho',lon_0=(urcrnrlon+llcrnrlon)/2,lat_0=(urcrnrlat+llcrnrlat)/2) > m.drawcoastlines() > m.drawmapboundary(fill_color='aqua') > m.drawstates(linewidth=3) > m.fillcontinents(color='coral',lake_color='aqua') > m.drawcountries(linewidth=3) > > where: > llcrnlon = lower left corner longitude > llcrnlat = lower left corner latitude > urcrnlon =upper right corner longitude > urcrnlat = upper right corner latitude > > > On Fri, Aug 27, 2010 at 1:39 PM, Brian Larsen <bal...@la...> wrote: > Ben, > > I have but no where in there do I see (or at least understand) how to draw a map on top of a current figure with set bounds in data space... > > Cheers, > > Brian > > > On Aug 27, 2010, at 11:24 AM, Benjamin Root wrote: > >> On Fri, Aug 27, 2010 at 12:11 PM, Brian Larsen <bal...@la...> wrote: >> Hello all, >> >> I am plotting satellite orbit files and it looks really nice to plot an Earth in the center with the continents on it to orient people to where the spacecraft is. Does anyway know how to do this? All I seem to be able to do is create a whole globe as the figure. >> >> In this simple example: >> >> from pylab import * >> r = ndarray(40) >> r[:] = 3.3 >> rad = linspace(0, 2*pi, 40) >> figure() >> subplot(111, polar=True) >> plot(rad, r, lw=3) >> draw() >> >> >> wouldn't it look great to have the earth plotted in the space up to 1.0 (as measured in earth radii)? >> >> Thanks much, >> >> Brian >> >> >> >> Have you checked out the basemap tool? >> >> http://matplotlib.sourceforge.net/basemap/doc/html/ >> >> Ben Root >> > > > > > > -- > > Brian A. Larsen > Space Science and Applications > Group ISR-1 > Los Alamos National Laboratory > PO Box 1663, MS-D466 > Los Alamos, NM 87545 > USA > > (For overnight add: > SM-30, Bikini Atoll Road) > > Phone: 505-665-7691 > Fax: 505-665-7395 > email: bal...@la... > > Correspondence / > Technical data or Software Publicly Available > > > > > > ------------------------------------------------------------------------------ > Sell apps to millions through the Intel(R) Atom(Tm) Developer Program > Be part of this innovative community and reach millions of netbook users > worldwide. Take advantage of special opportunities to increase revenue and > speed time-to-market. Join now, and jumpstart your future. > http://p.sf.net/sfu/intel-atom-d2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > -- > Aman Thakral > B.Eng & Biosci, M.Eng Design -- Brian A. Larsen Space Science and Applications Group ISR-1 Los Alamos National Laboratory PO Box 1663, MS-D466 Los Alamos, NM 87545 USA (For overnight add: SM-30, Bikini Atoll Road) Phone: 505-665-7691 Fax: 505-665-7395 email: bal...@la... Correspondence / Technical data or Software Publicly Available |
|
From: Jeff W. <js...@fa...> - 2010-08-27 17:55:35
|
On 8/27/10 11:39 AM, Brian Larsen wrote: > Ben, > > I have but no where in there do I see (or at least understand) how to > draw a map on top of a current figure with set bounds in data space... > > Cheers, > > Brian > Brian: Something like this perhaps? from pylab import * from mpl_toolkits.basemap import Basemap lons = linspace(0, 360, 361) lats = 40.*ones(len(lons)) map = Basemap(projection='ortho',lon_0=270,lat_0=90.) x,y = map(lons,lats) map.plot(x,y,color='y') map.bluemarble(scale=0.5) show() -Jeff > > On Aug 27, 2010, at 11:24 AM, Benjamin Root wrote: > >> On Fri, Aug 27, 2010 at 12:11 PM, Brian Larsen <bal...@la... >> <mailto:bal...@la...>> wrote: >> >> Hello all, >> >> I am plotting satellite orbit files and it looks really nice to >> plot an Earth in the center with the continents on it to orient >> people to where the spacecraft is. Does anyway know how to do >> this? All I seem to be able to do is create a whole globe as the >> figure. >> >> In this simple example: >> >> from pylab import * >> r = ndarray(40) >> r[:] = 3.3 >> rad = linspace(0, 2*pi, 40) >> figure() >> subplot(111, polar=True) >> plot(rad, r, lw=3) >> draw() >> >> >> wouldn't it look great to have the earth plotted in the space up >> to 1.0 (as measured in earth radii)? >> >> Thanks much, >> >> Brian >> >> >> >> Have you checked out the basemap tool? >> >> http://matplotlib.sourceforge.net/basemap/doc/html/ >> >> Ben Root >> > > > > > > -- > > Brian A. Larsen > Space Science and Applications > Group ISR-1 > Los Alamos National Laboratory > PO Box 1663, MS-D466 > Los Alamos, NM 87545 > USA > > (For overnight add: > SM-30, Bikini Atoll Road) > > Phone: 505-665-7691 > Fax: 505-665-7395 > email: bal...@la... <mailto:bal...@la...> > > Correspondence / > Technical data or Software Publicly Available > > > > > > ------------------------------------------------------------------------------ > Sell apps to millions through the Intel(R) Atom(Tm) Developer Program > Be part of this innovative community and reach millions of netbook users > worldwide. Take advantage of special opportunities to increase revenue and > speed time-to-market. Join now, and jumpstart your future. > http://p.sf.net/sfu/intel-atom-d2d > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
|
From: Aman T. <ama...@gm...> - 2010-08-27 17:53:16
|
Here is an example of the general usage for an orthographic projection.
def genMap(fig, ax, llcrnrlon,llcrnrlat,urcrnrlon,urcrnrlat):
fig.sca(ax)
m =
Basemap(resolution='i',projection='ortho',lon_0=(urcrnrlon+llcrnrlon)/2,lat_0=(urcrnrlat+llcrnrlat)/2)
m.drawcoastlines()
m.drawmapboundary(fill_color='aqua')
m.drawstates(linewidth=3)
m.fillcontinents(color='coral',lake_color='aqua')
m.drawcountries(linewidth=3)
where:
llcrnlon = lower left corner longitude
llcrnlat = lower left corner latitude
urcrnlon =upper right corner longitude
urcrnlat = upper right corner latitude
On Fri, Aug 27, 2010 at 1:39 PM, Brian Larsen <bal...@la...> wrote:
> Ben,
>
> I have but no where in there do I see (or at least understand) how to draw
> a map on top of a current figure with set bounds in data space...
>
> Cheers,
>
> Brian
>
>
> On Aug 27, 2010, at 11:24 AM, Benjamin Root wrote:
>
> On Fri, Aug 27, 2010 at 12:11 PM, Brian Larsen <bal...@la...> wrote:
>
>> Hello all,
>>
>> I am plotting satellite orbit files and it looks really nice to plot an
>> Earth in the center with the continents on it to orient people to where the
>> spacecraft is. Does anyway know how to do this? All I seem to be able to
>> do is create a whole globe as the figure.
>>
>> In this simple example:
>>
>> from pylab import *
>> r = ndarray(40)
>> r[:] = 3.3
>> rad = linspace(0, 2*pi, 40)
>> figure()
>> subplot(111, polar=True)
>> plot(rad, r, lw=3)
>> draw()
>>
>>
>> wouldn't it look great to have the earth plotted in the space up to 1.0
>> (as measured in earth radii)?
>>
>> Thanks much,
>>
>> Brian
>>
>>
>>
> Have you checked out the basemap tool?
>
> http://matplotlib.sourceforge.net/basemap/doc/html/
>
> Ben Root
>
>
>
>
>
>
> --
>
> Brian A. Larsen
> Space Science and Applications
> Group ISR-1
> Los Alamos National Laboratory
> PO Box 1663, MS-D466
> Los Alamos, NM 87545
> USA
>
> (For overnight add:
> SM-30, Bikini Atoll Road)
>
> Phone: 505-665-7691
> Fax: 505-665-7395
> email: bal...@la...
>
> Correspondence /
> Technical data or Software Publicly Available
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
> Be part of this innovative community and reach millions of netbook users
> worldwide. Take advantage of special opportunities to increase revenue and
> speed time-to-market. Join now, and jumpstart your future.
> http://p.sf.net/sfu/intel-atom-d2d
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
Aman Thakral
B.Eng & Biosci, M.Eng Design
|
|
From: Brian L. <bal...@la...> - 2010-08-27 17:39:44
|
Ben, I have but no where in there do I see (or at least understand) how to draw a map on top of a current figure with set bounds in data space... Cheers, Brian On Aug 27, 2010, at 11:24 AM, Benjamin Root wrote: > On Fri, Aug 27, 2010 at 12:11 PM, Brian Larsen <bal...@la...> wrote: > Hello all, > > I am plotting satellite orbit files and it looks really nice to plot an Earth in the center with the continents on it to orient people to where the spacecraft is. Does anyway know how to do this? All I seem to be able to do is create a whole globe as the figure. > > In this simple example: > > from pylab import * > r = ndarray(40) > r[:] = 3.3 > rad = linspace(0, 2*pi, 40) > figure() > subplot(111, polar=True) > plot(rad, r, lw=3) > draw() > > > wouldn't it look great to have the earth plotted in the space up to 1.0 (as measured in earth radii)? > > Thanks much, > > Brian > > > > Have you checked out the basemap tool? > > http://matplotlib.sourceforge.net/basemap/doc/html/ > > Ben Root > -- Brian A. Larsen Space Science and Applications Group ISR-1 Los Alamos National Laboratory PO Box 1663, MS-D466 Los Alamos, NM 87545 USA (For overnight add: SM-30, Bikini Atoll Road) Phone: 505-665-7691 Fax: 505-665-7395 email: bal...@la... Correspondence / Technical data or Software Publicly Available |
|
From: Jeff W. <js...@fa...> - 2010-08-27 17:36:13
|
On 8/27/10 11:24 AM, Benjamin Root wrote: > On Fri, Aug 27, 2010 at 12:11 PM, Brian Larsen <bal...@la... > <mailto:bal...@la...>> wrote: > > Hello all, > > I am plotting satellite orbit files and it looks really nice to > plot an Earth in the center with the continents on it to orient > people to where the spacecraft is. Does anyway know how to do > this? All I seem to be able to do is create a whole globe as the > figure. > > In this simple example: > > from pylab import * > r = ndarray(40) > r[:] = 3.3 > rad = linspace(0, 2*pi, 40) > figure() > subplot(111, polar=True) > plot(rad, r, lw=3) > draw() > > > wouldn't it look great to have the earth plotted in the space up > to 1.0 (as measured in earth radii)? > > Thanks much, > > Brian > > > > Have you checked out the basemap tool? > > http://matplotlib.sourceforge.net/basemap/doc/html/ > > Ben Root Sounds like you want the orthographic projection http://matplotlib.sourceforge.net/basemap/doc/html/users/ortho.html http://www.scipy.org/Cookbook/Matplotlib/Maps or the 'near-sided perspective' projection http://matplotlib.sourceforge.net/basemap/doc/html/users/nsper.html -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
|
From: Benjamin R. <ben...@ou...> - 2010-08-27 17:25:24
|
On Fri, Aug 27, 2010 at 12:11 PM, Brian Larsen <bal...@la...> wrote: > Hello all, > > I am plotting satellite orbit files and it looks really nice to plot an > Earth in the center with the continents on it to orient people to where the > spacecraft is. Does anyway know how to do this? All I seem to be able to > do is create a whole globe as the figure. > > In this simple example: > > from pylab import * > r = ndarray(40) > r[:] = 3.3 > rad = linspace(0, 2*pi, 40) > figure() > subplot(111, polar=True) > plot(rad, r, lw=3) > draw() > > > wouldn't it look great to have the earth plotted in the space up to 1.0 (as > measured in earth radii)? > > Thanks much, > > Brian > > > Have you checked out the basemap tool? http://matplotlib.sourceforge.net/basemap/doc/html/ Ben Root |
|
From: Ryan M. <rm...@gm...> - 2010-08-27 17:16:13
|
On Thu, Aug 26, 2010 at 2:24 PM, Ben Edwards <bed...@cs...> wrote:
> Hello, I've used matplotlib for a while but never had cause to ask a
> question until now. I am trying to add a patch to an axis, but would like
> the patch to remain the same size when, interactively, I resize the
> resulting figure. I am using TkAgg, and trying the following:
>>>> import matplotlib.pyplot as plt
>>>> import matplotlib.patches as patches
>>>> ax = plt.gca()
>>>> cp = patches.Circle((.5,.5),.025)
>>>> ax.add_patch(cp)
>>>> ax.set_aspect('equal')
>>>> plt.draw()
>>>> plt.show()
> This gives me a nice blue circle in the middle of the plot, and using
> ax.set_aspect('equal') I know that it will not be distorted into an ellipse.
> But is there a way to ensure that when I make the Tk window bigger, that the
> circle appears to be the same size as it was previously? I assume this would
> entail some sort of transform, but I don't quite understand how they work...
You can make the circle this way, specifying everything in axes coordinates:
cp = patches.Circle((.5,.5),.025, transform=ax.transAxes)
However, this puts the circle in the same spot in axes coordinates
[(0.5,0.5) is the middle of the plot]. I'm not sure if that's what you
want. I can't see any way to get Circle to use different transforms
for the center and the size, so from here the only path forward I see
is subclassing Circle. This way you could add code to the draw method
to calculate the center in axes coordinates from the center in data
coords. This needs to be done at draw time since the mapping of data
coords->axes coords changes as you pan and zoom.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
|
|
From: Brian L. <bal...@la...> - 2010-08-27 17:11:41
|
Hello all, I am plotting satellite orbit files and it looks really nice to plot an Earth in the center with the continents on it to orient people to where the spacecraft is. Does anyway know how to do this? All I seem to be able to do is create a whole globe as the figure. In this simple example: from pylab import * r = ndarray(40) r[:] = 3.3 rad = linspace(0, 2*pi, 40) figure() subplot(111, polar=True) plot(rad, r, lw=3) draw() wouldn't it look great to have the earth plotted in the space up to 1.0 (as measured in earth radii)? Thanks much, Brian -- Brian A. Larsen Space Science and Applications Group ISR-1 Los Alamos National Laboratory PO Box 1663, MS-D466 Los Alamos, NM 87545 USA (For overnight add: SM-30, Bikini Atoll Road) Phone: 505-665-7691 Fax: 505-665-7395 email: bal...@la... Correspondence / Technical data or Software Publicly Available |
|
From: Ben E. <bed...@cs...> - 2010-08-27 16:19:57
|
That doesn't quite work the way I want. I guess a good example of the
behavior I am looking for is what 'scatter' does. It seems that regardless
of the size of the figure the points stay the same size. I would use scatter
but would like to have access to the individual patches later to modify
them. Is there a way to access individual patches in scatter, or how does
scatter manage to scale its Collection correctly?
I've dug around in the source code a bit, but can't find an obvious
solution...
Ben
On Fri, Aug 27, 2010 at 9:04 AM, Benjamin Root <ben...@ou...> wrote:
> On Thu, Aug 26, 2010 at 2:24 PM, Ben Edwards <bed...@cs...> wrote:
>
>> Hello, I've used matplotlib for a while but never had cause to ask a
>> question until now. I am trying to add a patch to an axis, but would like
>> the patch to remain the same size when, interactively, I resize the
>> resulting figure. I am using TkAgg, and trying the following:
>>
>> >>> import matplotlib.pyplot as plt
>> >>> import matplotlib.patches as patches
>> >>> ax = plt.gca()
>> >>> cp = patches.Circle((.5,.5),.025)
>> >>> ax.add_patch(cp)
>> >>> ax.set_aspect('equal')
>> >>> plt.draw()
>> >>> plt.show()
>>
>> This gives me a nice blue circle in the middle of the plot, and using
>> ax.set_aspect('equal') I know that it will not be distorted into an ellipse.
>> But is there a way to ensure that when I make the Tk window bigger, that the
>> circle appears to be the same size as it was previously? I assume this would
>> entail some sort of transform, but I don't quite understand how they work...
>>
>> Ben
>>
>>
> I haven't tried using this tool myself, and it might not be what you want,
> but there is an AnchoredArtist tool that might interest you:
>
>
> http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#anchoredartists
>
> I think this means that it wouldn't move at all, and I don't know if that
> is what you want. I hope this helps!
>
> Ben Root
>
>
|
|
From: Benjamin R. <ben...@ou...> - 2010-08-27 15:04:38
|
On Thu, Aug 26, 2010 at 2:24 PM, Ben Edwards <bed...@cs...> wrote:
> Hello, I've used matplotlib for a while but never had cause to ask a
> question until now. I am trying to add a patch to an axis, but would like
> the patch to remain the same size when, interactively, I resize the
> resulting figure. I am using TkAgg, and trying the following:
>
> >>> import matplotlib.pyplot as plt
> >>> import matplotlib.patches as patches
> >>> ax = plt.gca()
> >>> cp = patches.Circle((.5,.5),.025)
> >>> ax.add_patch(cp)
> >>> ax.set_aspect('equal')
> >>> plt.draw()
> >>> plt.show()
>
> This gives me a nice blue circle in the middle of the plot, and using
> ax.set_aspect('equal') I know that it will not be distorted into an ellipse.
> But is there a way to ensure that when I make the Tk window bigger, that the
> circle appears to be the same size as it was previously? I assume this would
> entail some sort of transform, but I don't quite understand how they work...
>
> Ben
>
>
I haven't tried using this tool myself, and it might not be what you want,
but there is an AnchoredArtist tool that might interest you:
http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#anchoredartists
I think this means that it wouldn't move at all, and I don't know if that is
what you want. I hope this helps!
Ben Root
|
|
From: Angus M. <am...@gm...> - 2010-08-27 13:57:54
|
On 27 August 2010 09:35, xyz <mi...@op...> wrote: > Hello, > I would like to draw the following triangle: > > A > / \ > 5 / \ 5 > / \ > / \ > B--------C > 4 > > How is it possible to draw the above triangle with Matplotlib and are > there any examples? > How about: import matplotlib.pyplot as plt from matplotlib.patches import Polygon pts = np.array([[0,0], [4,0], [2,np.sqrt(5**2 - 2**2)]]) p = Polygon(pts, closed=True) ax = plt.gca() ax.add_patch(p) ax.set_xlim(0,4) ax.set_ylim(0,5) plt.show() I looked at the example here: http://matplotlib.sourceforge.net/examples/api/bbox_intersect.html, found through the gallery here: http://matplotlib.sourceforge.net/gallery.html for inspiration. Angus. -- AJC McMorland Post-doctoral research fellow Neurobiology, University of Pittsburgh |
|
From: xyz <mi...@op...> - 2010-08-27 13:36:18
|
Hello,
I would like to draw the following triangle:
A
/ \
5 / \ 5
/ \
/ \
B--------C
4
How is it possible to draw the above triangle with Matplotlib and are
there any examples?
Than you in advance.
|