SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

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
(10)
2
(30)
3
(11)
4
(5)
5
(14)
6
(21)
7
(19)
8
(29)
9
(23)
10
(5)
11
(3)
12
(9)
13
(6)
14
(12)
15
(10)
16
(15)
17
(5)
18
(6)
19
(4)
20
(28)
21
(8)
22
(5)
23
(10)
24
(4)
25
(1)
26
(6)
27
(13)
28
(11)
29
(9)
30
(23)

Showing results of 352

<< < 1 .. 4 5 6 7 8 .. 15 > >> (Page 6 of 15)
From: Eric F. <ef...@ha...> - 2005年09月18日 07:53:35
Attachments: colored_line.py
Mark, Petr,
> 
> I would like to plot the line which interconnects the GPS track points
> (latitude and longitude coordinates) recorded by GPS receiver. It is
> not so difficult. What I am not able to do is to change the color of
> the line according to the speed reached on the way from point to
> point. I would like to use the color of the line to differentiate the
> speed as following:
> 
> speed <=50km/h
> speed >50 and <=90km/h
> speed >90 and <=130km/h
> speed >130km/h
It can be done, but not with a simple plot command. See the attached 
demo; I think it is similar to what you want to do.
Eric
From: Petr J. <pe...@tp...> - 2005年09月17日 22:29:43
Hi all,
using the basemap module, I would like to import my own image (scanned
paper map) as a background layer and than plot my GPS data on it. I
would like to know:
1) if it is possible in general?
if yes:
2) are there any good examples or suggestion which way to go and how
 to do it?
Thanks for your postings
Petr Jakes
From: Mark B. <ma...@gm...> - 2005年09月17日 20:36:22
Petr -
This question was asked by me and others a month or so ago, and nobody=20
replied with a way to do this (besides given the plot command multiple=20
times, of course). So for now I am afraid that that is your only option. If=
=20
anybody knows a better way, let us know please!
Mark
>=20
> Message: 1
> Date: 2005年9月17日 02:16:25 +0200
> From: Petr <pe...@tp...>
> Reply-To: Petr <pe...@tp...>
> To: mat...@li...
> Subject: [Matplotlib-users] one line - multiple colors
>=20
> Hi all,
>=20
> I was investigating archives, but I didn't find answer to my question.
>=20
> I would like to plot the line which interconnects the GPS track points
> (latitude and longitude coordinates) recorded by GPS receiver. It is
> not so difficult. What I am not able to do is to change the color of
> the line according to the speed reached on the way from point to
> point. I would like to use the color of the line to differentiate the
> speed as following:
>=20
> speed <=3D50km/h
> speed >50 and <=3D90km/h
> speed >90 and <=3D130km/h
> speed >130km/h
>=20
> According to the matplotlib web: "If you make multiple lines with one
> plot command, the kwargs apply to all those lines". So I am able to
> set the different color arguments while plotting the tuple of the x and y=
=20
> points.
>=20
> I would like to get something like following code:
> (data is not real of course, it is for demonstration purposes only)
>=20
> longitudes=3D[53.26,53.54,53.75,53.22]
> latitudes=3D[18.56,18.72,18.93,18.12]
> speeds=3D['r','g','y','r']
> plot(latitudes,longitudes, speeds)
> show()
>=20
> Many thks for your suggestions.
>=20
> Petr Jakes
>=20
>
From: Yaroslav B. <yar...@gm...> - 2005年09月17日 03:46:22
On 9/16/05, Yaroslav Bulatov <yar...@gm...> wrote:
> In the picture below I'd like to have axes labelling the x,y
> parameters that change when moving from one subplot to another, so it
> would be like having subplots contained inside of another plot axes
>=20
> http://web.engr.oregonstate.edu/~bulatov/subplots.png
>=20
> What is the easiest way of doing that in matplotlib?
For future reference, below is one way I found to do that. It looks
like http://web.engr.oregonstate.edu/~bulatov/normal_grid.png
I could make this self-contained for the examples.zip if needed
The only unresolved issue is how to make a large image without also
make all the lines thick. IE, if I do savefig(dpi=3D400), I get a large
image, but all the lines are extremely thick.
---
 rows =3D 5
 cols =3D 5
 subplots_adjust(wspace=3D0,hspace=3D0)
 mastera =3D axes([0.125,0.1,0.775,0.8])
 axis([0,5,0,5])
 ylabel('approximation order')
 xlabel('# of datapoints')
 mastera.xaxis.set_major_formatter(MyFormatter(datasizes))
 mastera.yaxis.set_major_formatter(MyFormatter(orders))
 xticks([0.5,1.5,2.5,3.5,4.5])
 yticks([0.5,1.5,2.5,3.5,4.5])
 =20
 for r in range(rows):
 for c in range(cols):
 masterf.add_subplot(rows, cols, r*cols+c+1)
 banded_plot(vp.xs,
true_means[r,c,dist_num],means[r,c,dist_num],std_devs[r,c,dist_num]*2.5)
 axis(dist_axis)
 # turn off tics
 gca().set_xticks([])
 gca().set_yticks([])
 savefig(filename, dpi=3D200)
class MyFormatter(Formatter):
 =20
 """
 Use a format string to format the tick
 """
 def __init__(self, l):
 self.l =3D l
 def __call__(self, x, pos=3D0):
 'Return the format for tick val x at position pos'
 return str(self.l[int(x)])
>=20
>=20
> --
> Yaroslav Bulatov
> bu...@cs...
> Dearborn 102
> Oregon State University
> Corvallis, OR
>=20
--=20
Yaroslav Bulatov
bu...@cs...
Dearborn 102
Oregon State University
Corvallis, OR
From: John H. <jdh...@ac...> - 2005年09月17日 03:09:26
>>>>> "yi" == yi zhang <zha...@ya...> writes:
 yi> Hi, ALL, I tried to use plot command within a for loop to plot
 yi> multiple set of data. I am surprised to see that the plot for
 yi> the first dataset also appears on the plot for the second
 yi> dataset, the plot for the 1st and 2nd dataset appears on the
 yi> 3rd plot, and so on. Could anyone give me a hand on this issue
 yi> to erase memory?
See help for
 figure - create new / set current figure
 close - close a specific or all figures
 clf - clear current figure
 cla - clear current axes
 hold - set the "hold" state for current axes
 ishold - return the "hold" state for current axes
In particular, the "hold" setting determines whether subsequent plot
commands overplot previous ones.
JDH
From: Petr <pe...@tp...> - 2005年09月17日 00:16:28
Hi all,
I was investigating archives, but I didn't find answer to my question.
I would like to plot the line which interconnects the GPS track points
(latitude and longitude coordinates) recorded by GPS receiver. It is
not so difficult. What I am not able to do is to change the color of
the line according to the speed reached on the way from point to
point. I would like to use the color of the line to differentiate the
speed as following:
speed <=50km/h
speed >50 and <=90km/h
speed >90 and <=130km/h
speed >130km/h
According to the matplotlib web: "If you make multiple lines with one
plot command, the kwargs apply to all those lines". So I am able to
set the different color arguments while plotting the tuple of the x and y points.
I would like to get something like following code:
(data is not real of course, it is for demonstration purposes only)
longitudes=[53.26,53.54,53.75,53.22]
latitudes=[18.56,18.72,18.93,18.12]
speeds=['r','g','y','r']
plot(latitudes,longitudes, speeds)
show()
Many thks for your suggestions.
Petr Jakes
From: Yaroslav B. <yar...@gm...> - 2005年09月16日 21:45:20
In the picture below I'd like to have axes labelling the x,y
parameters that change when moving from one subplot to another, so it
would be like having subplots contained inside of another plot axes
http://web.engr.oregonstate.edu/~bulatov/subplots.png
What is the easiest way of doing that in matplotlib?
--=20
Yaroslav Bulatov
bu...@cs...
Dearborn 102
Oregon State University
Corvallis, OR
From: Jeff W. <js...@fa...> - 2005年09月16日 16:44:28
Rob Hetland wrote:
>
> I would like to know how to create my own colormaps. cm.jet et al. 
> are very nice, but sometimes I need to create my own to highlight 
> certain values in my maps. I have not found any information about 
> this in the manual, and I don't understand how the maps are used 
> under the hood to figure it out myself.
>
> Any advice?
>
Rob: Check this wiki item and the associated mailing list thread:
http://www.scipy.org/wikis/topical_software/LoadingAColormapDynamically
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/CDC R/CDC1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Alan G I. <ai...@am...> - 2005年09月16日 16:38:55
On 2005年9月16日, Zhang apparently wrote: 
> When I try to put 4x3=12 subplots on a figure, I find 
> each sub-figure is very small, and there xlabel/ylabel 
> overlap. It seems subplot uses a fixed size canvas for 
> plotting. 
Once you get this to look nice,
please post an example.
Thank you,
Alan Isaac
From: Rob H. <he...@ta...> - 2005年09月16日 16:22:19
I would like to know how to create my own colormaps. cm.jet et al. 
are very nice, but sometimes I need to create my own to highlight 
certain values in my maps. I have not found any information about 
this in the manual, and I don't understand how the maps are used 
under the hood to figure it out myself.
Any advice?
-----
Rob Hetland, Assistant Professor
Dept of Oceanography, Texas A&M University
p: 979-458-0096, f: 979-845-6331
e: he...@ta..., w: http://pong.tamu.edu
From: Jeff P. <jef...@se...> - 2005年09月16日 16:14:48
#!/usr/bin/env python
#Boa:App:BoaApp
import wx
import Frame1
modules ={'Frame1': [1, 'Main frame of Application', 'Frame1.py']}
class BoaApp(wx.App):
 def OnInit(self):
 wx.InitAllImageHandlers()
 self.main = Frame1.create(None)
 self.main.Show()
 self.SetTopWindow(self.main)
 return True
def main():
 application = BoaApp(0)
 application.MainLoop()
if __name__ == '__main__':
 main()
From: Zhang Le <zha...@gm...> - 2005年09月16日 10:07:30
Many thanks, that's extract what I want
On 9/16/05, Nicolas Dubuit <du...@pe...> wrote:
>=20
> Hi,
>=20
> Since Matplotlib version 0.82, you can adjust subplot vspace, hspace and
> margins.
>=20
> Either use subplots_adjust
> http://matplotlib.sourceforge.net/matplotlib.pylab.html#-subplots_adj=
ust
> or from the figure window, use the new toolbar button (on the left of "sa=
ve")
> to adapt it conveniently.
>=20
> You can also specify the standard behaviour for the session in the rc par=
ams :
> rc('figure.subplot', wspace=3D0.3)
>=20
> Regards
>=20
> Nicolas
>=20
>=20
> Le Vendredi 16 Septembre 2005 11:29, Zhang Le a =E9crit:
> > Hello,
> > I want to print around 100 histograms using A4 paper. Since I do not
> > know how to print on multiple pages, I simply print 6 or 9 subplots on
> > call to savefig(), followed by a call to clf(), then repeat the
> > process.
> > The problem is, when I put more than 9 subplots into a ps file, I
> > found the figures were placed near to each other in the center area,
> > although there is plenty of free space to do a 4x3 placement without
> > overlap.
> > When I try to put 4x3=3D12 subplots on a figure, I find each
> > sub-figure is very small, and there xlabel/ylabel overlap. It seems
> > subplot uses a fixed size canvas for plotting.
> >
> > Is there a way to control the vspace and hspace between figures in a
> > subplot so that in my case all 12 subplots be placed evenly on an A4
> > paper?
> >
> > Many thanks,
> > Zhang Le
> >
> >
> > -------------------------------------------------------
> > SF.Net email is sponsored by:
> > Tame your development challenges with Apache's Geronimo App Server.
> > Download it for free - -and be entered to win a 42" plasma tv or your v=
ery
> > own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.p=
hp
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>=20
>=20
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server. Downl=
oad
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Nicolas D. <du...@pe...> - 2005年09月16日 09:56:40
Hi,
Since Matplotlib version 0.82, you can adjust subplot vspace, hspace and=20
margins.
Either use subplots_adjust=20
 http://matplotlib.sourceforge.net/matplotlib.pylab.html#-subplots_adjust
or from the figure window, use the new toolbar button (on the left of "save=
")=20
to adapt it conveniently.
You can also specify the standard behaviour for the session in the rc param=
s :=20
 rc('figure.subplot', wspace=3D0.3)
Regards
Nicolas
Le Vendredi 16 Septembre 2005 11:29, Zhang Le a =E9crit=A0:
> Hello,
> I want to print around 100 histograms using A4 paper. Since I do not
> know how to print on multiple pages, I simply print 6 or 9 subplots on
> call to savefig(), followed by a call to clf(), then repeat the
> process.
> The problem is, when I put more than 9 subplots into a ps file, I
> found the figures were placed near to each other in the center area,
> although there is plenty of free space to do a 4x3 placement without
> overlap.
> When I try to put 4x3=3D12 subplots on a figure, I find each
> sub-figure is very small, and there xlabel/ylabel overlap. It seems
> subplot uses a fixed size canvas for plotting.
>
> Is there a way to control the vspace and hspace between figures in a
> subplot so that in my case all 12 subplots be placed evenly on an A4
> paper?
>
> Many thanks,
> Zhang Le
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server.
> Download it for free - -and be entered to win a 42" plasma tv or your very
> own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Zhang Le <zha...@gm...> - 2005年09月16日 09:29:18
Hello,
 I want to print around 100 histograms using A4 paper. Since I do not
know how to print on multiple pages, I simply print 6 or 9 subplots on
call to savefig(), followed by a call to clf(), then repeat the
process.
 The problem is, when I put more than 9 subplots into a ps file, I
found the figures were placed near to each other in the center area,
although there is plenty of free space to do a 4x3 placement without
overlap.
 When I try to put 4x3=3D12 subplots on a figure, I find each
sub-figure is very small, and there xlabel/ylabel overlap. It seems
subplot uses a fixed size canvas for plotting.
 Is there a way to control the vspace and hspace between figures in a
subplot so that in my case all 12 subplots be placed evenly on an A4
paper?
Many thanks,
Zhang Le
From: daniele <dad...@ya...> - 2005年09月16日 09:28:30
Hi! I red that plotting multiple dataset would cause matplotlib to 
automatically cycle all available colors.
This seems not to be the case with the bar() function, used to plot bar 
graphs.
If i try, eg:
a=array([1,2,3])
b=array([1,0.8,1.1])
bar(a,b)
bar(a*0.9,b*0.9)
show()
I'll get the two plots superimposed but all of the same color (blue).
I have also another problem: whichever color I set for the bars, the 
bars' border is always black. So it is impossible to have a global idea 
of the plotted data because at a little magnifing ratio every bar is 
black! How can I set the border of the bars to another color (best white)?
Thanks!
From: Alan G I. <ai...@am...> - 2005年09月16日 03:31:25
On 2005年9月15日, yi zhang apparently wrote:=20
> I am surprised to see that=20
> the plot for the first dataset also appears on the=20
> plot for the second dataset, the plot for the 1st and=20
> 2nd dataset=20
> appears on the 3rd plot, and so on.=20
Not sure, but it seems you might not be changing the active=20
figure (e.g., with figure()).
Cheers,
Alan Isaac
From: yi z. <zha...@ya...> - 2005年09月16日 03:02:29
Hi, ALL,
I tried to use plot command within a for loop to plot
multiple set of data. I am surprised to see that 
the plot for the first dataset also appears on the
plot for the second dataset, the plot for the 1st and
2nd dataset 
appears on the 3rd plot, and so on. Could anyone give
me a hand on this issue to erase memory?
Thanks!
yi zhang
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
From: Malte M. <Mal...@cs...> - 2005年09月16日 02:31:41
John,
Fonts aren't the problem in this case, it is purely the number of abcissa 
points. I have tested the output of afm/non-afm an it is negligible.
We will have spectral data soon of 250k points, so it looks like I have to do 
the slicing or decimation. The problem is that if the user uses the toolbar 
to zoom and print the output won't be the same, or can I overload the toolbar 
zoom function?
I know displaying 250k points on a screen is insane in itself, so I will have 
to do decimation.
Thanks,
Malte
From: John H. <jdh...@ac...> - 2005年09月16日 02:21:56
>>>>> "Malte" == Malte Marquarding <Mal...@cs...> writes:
 Malte> Is there any solution/workaround for this? If you submit ps
 Malte> files to publishers they often restrict the size of the
 Malte> files.
It is correct that matplotlib doesn't clip your lines for you at the
data level, but only at the display level. So if you want less data
in your file in postscript, you need to slice it before
plotting/saving. Earlier versions of mpl had a "data clipping"
option, but is was so rarely used I removed it to simplify the code
and make it more efficient.
But data size is probably not the source of your large postscript
files. Currently matplotlib embeds freetype fonts directly into the
ps file, which typically accounts for 90-95% of the file size for
typical figures. This can explain why your file size doesn't vary
much with data size. There are ways that this can probably be made
more efficient (embed only the glyphs used rather than the whole font
file) but Paul Barrett, who wrote the freetype postscript embedding,
was unable to find a way to do this.
You can however control this font embedding feature by setting 
# use of afm fonts -- breaks mathtext but results in small files
ps.useafm : True 
in your rc file http://matplotlib.sf.net/matplotlibrc. This setting
tells matplotlib to use native postscript fonts, which will generate
*much* smaller files for typical plots. You sacrifice a couple of
things: the fonts in the GUI no longer will match the fonts in the
saved file, and the matplotlib mathtext features will no longer work
for postscript.
On a platform which supports tex/latex, you also have the option of
using latex to do text formatting, which does not trigger the
embedding freetype fonts problem that generates unreasonably large ps
files.
JDH
From: John H. <jdh...@ac...> - 2005年09月16日 02:11:41
>>>>> "Le" == Le Zhang <zha...@gm...> writes:
 Le> the first column has a value much higher than 1.0, it's not a
 Le> probability distribution I believe.
Ahh, this appears to be a docstring bug. The plotting function
matplotlib.axes.Axes.hist docstring indicates "probability
distribution" but the underlying function matplotlib.mlab.hist which
computes the histogram correctly states that it returns a probability
*density*, ie, it integrates to one. 
Thanks for pointing this out. The docstring will be updated for the
next release.
Cheers,
JDH
From: John H. <jdh...@ac...> - 2005年09月16日 02:05:35
>>>>> "daniele" == daniele <dad...@ya...> writes:
 daniele> hi! i've problems installing matplotlib under debian with
 daniele> packages provided at mentors.debian.net.
 daniele> I added these lines to my sources.list : deb
 daniele> http://mentors.debian.net/debian unstable main contrib
 daniele> non-free deb-src http://mentors.debian.net/debian
 daniele> unstable main contrib non-free
These are not the /etc/apt/sources.list lines we suggest in the
installation page at http://matplotlib.sf.net/installing.html in the
"Debian" section. Please follow those instructions instead.
What debian variant/version are you using?
It is annoying that the packages an mentors are stale and broken, but
I believe the packages linked to on the installing page are reasonably
current and actually work.
JDH
From: Jeff W. <js...@fa...> - 2005年09月15日 22:11:57
Travis Brady wrote:
> I'd like to make a map of the U.S. where I draw the state lines and
> apply a color to each state based on a ratio I've got in my data. I'm
> staring at the example here:
> http://matplotlib.sourceforge.net/screenshots/plotmap.py, but what I'm
> trying to do is much simpler so I'm wondering if there's a helper
> function somewhere.
> 
> thanks,
> 
> Travis
Travis: The state boundaries that come with basemap are not polygons,
but line segments, so you can't fill them. However, you can download a
shapefile from
http://nationalatlas.gov/atlasftp.html?openChapters=chpbound#chpbound
(statesp020.tar.gz is the one you want). Then you can use the new
'readshapefile' method in Basemap 0.6 to do what you want. I've
attached an example that shows how to do it.
HTH,
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/CDC R/CDC1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Jeff W. <Jef...@no...> - 2005年09月15日 22:08:07
Travis Brady wrote:
> I'd like to make a map of the U.S. where I draw the state lines and
> apply a color to each state based on a ratio I've got in my data. I'm
> staring at the example here:
> http://matplotlib.sourceforge.net/screenshots/plotmap.py, but what I'm
> trying to do is much simpler so I'm wondering if there's a helper
> function somewhere.
> 
> thanks,
> 
> Travis
Travis: The state boundaries that come with basemap are not polygons,
but line segments, so you can't fill them. However, you can download a
shapefile from
http://nationalatlas.gov/atlasftp.html?openChapters=chpbound#chpbound
(statesp020.tar.gz is the one you want). Then you can use the new
'readshapefile' method in Basemap 0.6 to do what you want. I've
attached an example that shows how to do it.
HTH,
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/CDC R/CDC1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Travis B. <td...@fa...> - 2005年09月15日 20:50:44
I'd like to make a map of the U.S. where I draw the state lines and
apply a color to each state based on a ratio I've got in my data. I'm
staring at the example here:
http://matplotlib.sourceforge.net/screenshots/plotmap.py, but what I'm
trying to do is much simpler so I'm wondering if there's a helper
function somewhere.
thanks,
Travis
-- 
 Travis Brady
 td...@fa...
-- 
http://www.fastmail.fm - Or how I learned to stop worrying and
 love email again
From: Jeff P. <jef...@se...> - 2005年09月15日 20:01:19
Hi again, I'm just tinkering around with py2exe and matplotlib. I
attached a very short script and the setup file I'm using and the errlog
that results. I don't understand quite what this means or how to get
this to work. I checked out the setup file at:
http://starship.python.net/crew/theller/moin.cgi/MatPlotLib
But I haven't had any luck getting it to work. How do I make this thing
go? Thanks.
Jeff
3 messages has been excluded from this view by a project administrator.

Showing results of 352

<< < 1 .. 4 5 6 7 8 .. 15 > >> (Page 6 of 15)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /