SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: ringobelingo <rin...@gm...> - 2009年09月30日 23:00:43
Hi, 
I would like to add coastlines to a map but do not want interior
'coastlines'. At present, without them my continents are not distinct enough
from the data I am plotting in the background. But, when I draw them using
drawcoastlines(), I also get e.g. the great lakes showing up, and this just
makes my world maps look messy and distracts from my data which should be
the main focus. Does anyone know of a way to force this to happen, or is it
something that might be added, i.e. splitting the function into
drawcoastlines() and drawicoastlines() ... ?
Many thanks.
Ringo
-- 
View this message in context: http://www.nabble.com/Basemap-drawcoastlines-issue-tp25690572p25690572.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Scott S. <sco...@gm...> - 2009年10月05日 06:58:33
>2009年10月1日 ringobelingo <rin...@gm...>:
> I would like to add coastlines to a map but do not want interior
> 'coastlines'. At present, without them my continents are not distinct enough
> from the data I am plotting in the background. But, when I draw them using
> drawcoastlines(), I also get e.g. the great lakes showing up, and this just
> makes my world maps look messy and distracts from my data which should be
> the main focus. Does anyone know of a way to force this to happen, or is it
> something that might be added, i.e. splitting the function into
> drawcoastlines() and drawicoastlines() ... ?
The easiest way to address this is to obtain (or make) a GIS shapefile
that has the coastlines you'd like to see. Then use the
readshapefile() method on your Basemap object instead of the
drawcoastlines() method.
my_map = Basemap(...)
my_map.readshapefile(my_shpfile_name)
Cheers,
Scott
From: ringobelingo <rin...@gm...> - 2009年10月06日 14:14:55
Hi Scott,
thanks for your response. This seems like the way to go!
Ringo
Scott Sinclair-4 wrote:
> 
>>2009年10月1日 ringobelingo <rin...@gm...>:
>> I would like to add coastlines to a map but do not want interior
>> 'coastlines'. At present, without them my continents are not distinct
>> enough
>> from the data I am plotting in the background. But, when I draw them
>> using
>> drawcoastlines(), I also get e.g. the great lakes showing up, and this
>> just
>> makes my world maps look messy and distracts from my data which should be
>> the main focus. Does anyone know of a way to force this to happen, or is
>> it
>> something that might be added, i.e. splitting the function into
>> drawcoastlines() and drawicoastlines() ... ?
> 
> The easiest way to address this is to obtain (or make) a GIS shapefile
> that has the coastlines you'd like to see. Then use the
> readshapefile() method on your Basemap object instead of the
> drawcoastlines() method.
> 
> my_map = Basemap(...)
> my_map.readshapefile(my_shpfile_name)
> 
> Cheers,
> Scott
> 
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9&#45;12, 2009. Register
> now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
-- 
View this message in context: http://www.nabble.com/Basemap-drawcoastlines-issue-tp25690572p25769546.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Jeff W. <js...@fa...> - 2009年10月05日 09:33:34
Scott Sinclair wrote:
>> 2009年10月1日 ringobelingo <rin...@gm...>:
>> I would like to add coastlines to a map but do not want interior
>> 'coastlines'. At present, without them my continents are not distinct enough
>> from the data I am plotting in the background. But, when I draw them using
>> drawcoastlines(), I also get e.g. the great lakes showing up, and this just
>> makes my world maps look messy and distracts from my data which should be
>> the main focus. Does anyone know of a way to force this to happen, or is it
>> something that might be added, i.e. splitting the function into
>> drawcoastlines() and drawicoastlines() ... ?
>> 
>
> The easiest way to address this is to obtain (or make) a GIS shapefile
> that has the coastlines you'd like to see. Then use the
> readshapefile() method on your Basemap object instead of the
> drawcoastlines() method.
>
> my_map = Basemap(...)
> my_map.readshapefile(my_shpfile_name)
>
> Cheers,
> Scott
>
> 
You can also use the 'area_thresh' keyword to control the minimum size 
of coastline features that are drawn. area_thresh=1000000 makes the 
Great Lakes disappear, at the expense of making all the islands except 
Greenland disappear too. If that's unacceptable, you'll have to do as 
Scott suggests and create a shapfile without the lakes.
-Jeff
From: ringobelingo <rin...@gm...> - 2009年10月06日 14:17:31
Hi Jeff,
I had already tried area_thresh, but suffered from the limitation that you
pointed out, namely that although the inland waterways disappear, it is at
the expense of a lot of land. That's why I wondered if the function might be
splittable to avoid such issues. 
But thanks anyway.
Ringo
Jeff Whitaker wrote:
> 
> Scott Sinclair wrote:
>>> 2009年10月1日 ringobelingo <rin...@gm...>:
>>> I would like to add coastlines to a map but do not want interior
>>> 'coastlines'. At present, without them my continents are not distinct
>>> enough
>>> from the data I am plotting in the background. But, when I draw them
>>> using
>>> drawcoastlines(), I also get e.g. the great lakes showing up, and this
>>> just
>>> makes my world maps look messy and distracts from my data which should
>>> be
>>> the main focus. Does anyone know of a way to force this to happen, or is
>>> it
>>> something that might be added, i.e. splitting the function into
>>> drawcoastlines() and drawicoastlines() ... ?
>>> 
>>
>> The easiest way to address this is to obtain (or make) a GIS shapefile
>> that has the coastlines you'd like to see. Then use the
>> readshapefile() method on your Basemap object instead of the
>> drawcoastlines() method.
>>
>> my_map = Basemap(...)
>> my_map.readshapefile(my_shpfile_name)
>>
>> Cheers,
>> Scott
>>
>> 
> 
> You can also use the 'area_thresh' keyword to control the minimum size 
> of coastline features that are drawn. area_thresh=1000000 makes the 
> Great Lakes disappear, at the expense of making all the islands except 
> Greenland disappear too. If that's unacceptable, you'll have to do as 
> Scott suggests and create a shapfile without the lakes.
> 
> -Jeff
> 
> 
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9&#45;12, 2009. Register
> now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
-- 
View this message in context: http://www.nabble.com/Basemap-drawcoastlines-issue-tp25690572p25769595.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
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 によって変換されたページ (->オリジナル) /