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

Showing 18 results of 18

From: Jeff W. <js...@fa...> - 2012年08月25日 22:18:41
On 8/25/12 3:08 PM, klo uo wrote:
> On Sat, Aug 25, 2012 at 10:19 PM, Jeff Whitaker <js...@fa...> wrote:
>> Klo: For cylindrical equidistant maps (projection='cyl') it will be easy,
>> since the corner lat/lon values are all that is needed. For other
>> projections, we'll need a way to translate EPSG projection codes into
>> Basemap kwargs.
> Jeff, how is it done for static bitmaps as bluemarble, etopo... ?
> Can't the same be done, if image fits in one of supported projections?
Klo: The image in interpolated to the Basemap projection region. This 
is slow - the main reason to use the WMS is to avoid this by having it 
done on the server side.
>
> According http://atlas.resources.ca.gov/arcgis/SDK/REST/export.html
> `bbox` is required with syntax like:
>
> Syntax: <xmin>, <ymin>, <xmax>, <ymax>
>
> Number format for `bbox` AFAIK (but not sure) depends on `bboxSR`
> projection and dense list of available projections with their code is
> here: http://atlas.resources.ca.gov/arcgis/SDK/REST/pcs.html
The trick is to figure out what the EPSG projection code is based on the 
Basemap projection info, and pass that information to the WMS server so 
it can do the interpolation.
Here's an example for south polar stereographic:
width = 12000.e3
plt.figure()
basemap_url =\
"http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer/export?\
bbox=%d,%d,%d,%d&\
bboxSR=3412&\
imageSR=3412&\
size=800,800&\
dpi=128&\
format=png32&\
f=image" % (-width/2,-width/2,width/2,width/2)
m =\
Basemap(projection='stere',resolution='i',lon_0=0,lat_0=-90,lat_ts=-70,\
 width=width,height=width,rsphere=(6378273,6356889.449))
m.imshow(plt.imread(urllib2.urlopen(basemap_url)),origin='upper')
m.drawmeridians(np.arange(-180,180,30),labels=[0,0,0,1],color='y')
m.drawparallels(np.arange(-80,-0,10),labels=[1,0,0,0],color='y')
m.drawcoastlines()
plt.show()
-Jeff
>
> So perhaps, by just providing `cyl` (bboxSR=4326) and imageSR to any
> desired projection from above list will do the trick?
>
> Quickly now, I tried to map other projection on whole world as it was
> easier not knowing Basemap that well:
>
> ========================================
> from mpl_toolkits.basemap import Basemap
> import matplotlib.pyplot as plt
> import urllib2
>
> lon1 = -180; lon2 = 180; lat1 = -90; lat2 = 90
>
> basemap_url = "http://server.arcgisonline.com/ArcGIS/rest/services/World_Physical_Map/MapServer/export?\
> bbox=%d,%d,%d,%d&\
> bboxSR=4326&\
> imageSR=54030&\
> size=2000,1000&\
> format=png32&\
> f=image" % (lon1, lat1, lon2, lat2)
>
> m = Basemap(projection='robin', lon_0=0, resolution='c')
> m.imshow(plt.imread(urllib2.urlopen(basemap_url)), origin='upper')
> m.drawcoastlines()
> plt.gca().axison = False
> plt.title("Robinson Projection")
> plt.show()
> ========================================
>
> Seems almost fine ;)
From: klo uo <kl...@gm...> - 2012年08月25日 19:32:24
Well it seems ArcGIS web-services can't be bitten in public place.
Google and Bing static maps have many limitations:
 - require account for providing key
 - draw logos on image
 - limited size: Bing basic account can return max 900x834 and Google
1280x1280 (while ArcGIS 2048x2048)
 - Google static maps has max 25K requests per day per application and
not per IP
 - Bing static map doesn't return requested exact coordinates, and I
can't see parameter that can define returned image SR (haven't checked
Google)
I'll have a look tomorrow at Nokia (img size limit 2048x2048), but
considering OWSLib and providing arcgis webservice function to Basemap
class seems fine.
Also just reusing some of OWSLib solution for map services doesn't
seem like bad idea - nothing is required except Python builtin XML
parsing
----------
http://msdn.microsoft.com/en-us/library/ff701724.aspx
https://developers.google.com/maps/documentation/staticmaps
http://api.maps.nokia.com/en/restmaps/api.html
From: klo uo <kl...@gm...> - 2012年08月25日 17:54:44
>> Result with coastlines overlay attached!
>
> Here is attachment
Hm, image needs to be approved by moderator...
Here is a link to it: http://i.imgur.com/1ZMoU.png
From: klo uo <kl...@gm...> - 2012年08月25日 17:40:45
> Export Map (http://atlas.resources.ca.gov/arcgis/SDK/REST/export.html)
> seems like only function needed, but more knowledge about Basemap is
> needed, as my main problem with it is fitting projections right. I
> tried to overlay arcgis map over some Basemap projections like:
>
> m=Basemap(...)
> m.imshow(arcgis_map)
> m.drawcoastlines()
>
> But it never fits, and also aspect ratio should be considered.
Success! :)
It was that "imageSR" had to be set, as it doesn't seem to be deduced
from the map:
========================================
basemap_url = "http://server.arcgisonline.com/ArcGIS/rest/services/World_Physical_Map/MapServer/export?\
bbox=%d,%d,%d,%d&\
bboxSR=4326&\
imageSR=4326&\
size=800,600&\
dpi=128&\
format=png32&\
f=image" % (lon1, lat1, lon2, lat2) \
========================================
Result with coastlines overlay attached!
Jeff, I think it is easy to make this function to Basemap class, but
I'm not confident doing it.
If you can make it, I'll then try to use it as template and pair it to
other available webservices
Cheers
From: klo uo <kl...@gm...> - 2012年08月25日 16:44:27
On Sat, Aug 25, 2012 at 5:50 PM, Jeff Whitaker wrote:
>
> Maybe such a thing could be built using owslib?
>
> http://geopython.github.com/OWSLib/
This is interesting. I didn't know about this module
Using either simple REST (urllib) to access webservices or depend on
additional module which exposes all kinds of services capabilities,
that are not just basemaps, but services which are used to interface
many public data through XML communication, that are potentially
attractive to Basemap users IMHO
It is kind of a dilemma ;)
From: Ely S. <spe...@gm...> - 2012年08月25日 16:31:54
I have the digest option enabled in my matplotlib mailing list options.
However, I still receive between 5 and 10 mailing list messages per day,
sometimes more.
Is there any way to change a setting to ensure that I can only ever receive
exactly one message from the mailing list per day, with the entire day's
entries included?
Thanks,
Ely
From: klo uo <kl...@gm...> - 2012年08月25日 16:24:53
On Sat, Aug 25, 2012 at 5:57 PM, Jeff Whitaker wrote:
>
> tilecache.org looks relevant too.
>
This is like more advanced, on a higher level. I imagine if you plan
to add some interaction to Basemap, it would be fantastic, to say at
least.
While reading Google patent you linked the other day, I came also to
this link: http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection
It was mentioned as a advanced feature to some server providing WMS capabilities
Also, already mentioned GIS webservices IMHO provide interface to
their caching/tiling mechanisms, but if there is backend to hold this
feature in MPL/Basemap I have no idea.
From: klo uo <kl...@gm...> - 2012年08月25日 16:15:26
On Sat, Aug 25, 2012 at 3:24 PM, Jeff Whitaker <js...@fa...> wrote:
> It looks like you are fetching an image over a specified region and
> displaying it with matplotlib. That's very useful, but it doesn't solve
> the zooming problem you mentioned. Still, it's a good start and would
> be nice to have in basemap.
Yes, I was thinking about fetching image resource only. I should have
probably fetched more detailed and smaller region that would
demonstrate superiority over Basemap bitmaps quality and performance,
as I mentioned zooming problem in a context of very high memory usage
while provided image is with low detail compared to what's potentially
possible.
> Sorry for sounding so dismissive in my earlier reply. How do you think
> web map services could be integrated into Basemap? Do you see this
> mainly as a faster and more general alternative to the 'bluemarble' or
> 'warpimage' methods, where you can specify a web map service and have
> the appropriate tile that fits the map projection region fetched and
> displayed automatically?
Exactly - as function to Basemap class that could be called as
bluemarble() or shadedrelief() etc. on previously defined projection.
Export Map (http://atlas.resources.ca.gov/arcgis/SDK/REST/export.html)
seems like only function needed, but more knowledge about Basemap is
needed, as my main problem with it is fitting projections right. I
tried to overlay arcgis map over some Basemap projections like:
 m=Basemap(...)
 m.imshow(arcgis_map)
 m.drawcoastlines()
But it never fits, and also aspect ratio should be considered.
And same scheme for potentially other mapping webservices, as
functions to Basemap class...
Also for reference here are maps available to arcgis service:
http://server.arcgisonline.com/ArcGIS/rest/services
From: Jeff W. <js...@fa...> - 2012年08月25日 15:58:06
On 8/25/12 9:50 AM, Jeff Whitaker wrote:
> On 8/25/12 7:53 AM, Benjamin Root wrote:
>>
>>
>> On Saturday, August 25, 2012, Jeff Whitaker wrote:
>>
>> On 8/24/12 10:20 PM, klo uo wrote:
>> > On Sat, Aug 25, 2012 at 1:26 AM, Jeff Whitaker wrote:
>> >> Oh sure, it's simple!
>> >>
>> >> http://www.google.com/patents?id=J4YOAAAAEBAJ&dq=6618053
>> > Hi Jeff,
>> >
>> > thanks for your reply.
>> >
>> > I was hoping to get response if there are ideas how this
>> unfortunate
>> > performance can be avoided. If there are some thoughts or if it's
>> > closed case.
>>
>> Klo: It's not a closed case - but I have no idea how to do it. If
>> you'd like to try to implement something, your contribution would be
>> welcome.
>> >
>> > About GIS web-services, I thought maybe extending Basemap and
>> > providing interface to some of available online mapping services.
>> > For example arcgis is just one of them, and allows using their
>> online
>> > map service to arbitrary application, while exposing REST
>> >
>> (http://resources.arcgis.com/en/help/rest/apiref/index.html?mapserver.html)
>> > and SOAP service with full WSDL description
>> >
>> (http://services.arcgisonline.com/ArcGIS/services/World_Imagery/MapServer?wsdl)
>> > and documentation. REST requests cover all of their services while
>> > SOAP is limited and a bit harder to code in this example. Services
>> > offer much more than it's needed to be paired in Basemap, as can be
>> > seen from documentation, with any imaginable projection and
>> what not.
>> >
>> > As an example of using the service here is image:
>> http://i.imgur.com/RpUFv.png
>> > and here is it's simple source code that executes unnoticeable
>> in second:
>> > ========================================
>> > import matplotlib.pyplot as plt
>> > import urllib2
>> >
>> > lon1 = -10; lon2 = 30; lat1 = 30; lat2 = 60
>> > basemap_url =
>> >
>> "http://server.arcgisonline.com/ArcGIS/rest/services/World_Physical_Map/MapServer/export?bbox=%d,%d,%d,%d&bboxSR=4326&size=1024,768&dpi=128&format=png32&f=image"
>> > % (lon1, lat1, lon2, lat2)
>> > overlay_url =
>> >
>> "https://ogcie.iblsoft.com/sigwx?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=ASXX&WIDTH=1024&HEIGHT=768&CRS=EPSG:4326&BBOX=%d,%d,%d,%d&TRANSPARENT=TRUE&STYLES=&FORMAT=image/png"
>> > % (lon1, lat1, lon2, lat2)
>> >
>> > plt.figure(figsize=(8, 6), dpi=128, facecolor='w')
>> > plt.imshow(plt.imread(urllib2.urlopen(basemap_url)))
>> > plt.imshow(plt.imread(urllib2.urlopen(overlay_url)))
>> > plt.gca().axison = False
>> > plt.savefig("scene.png", dpi=128, transparent=True)
>> > ========================================
>> >
>> > As both "basemap map" and overlay image use same CRS, this seems
>> > doable with just MPL.
>> >
>> > Having such service paired in Basemap as a feature looks very
>> > promising to me. I don't know much about MPL and Basemap
>> design, as if
>> > all above talk is easy and then acceptable for implementation, but
>> > that's roughly what I had in mind for web-services - as additional
>> > feature for replacing bloated background maps provided, which
>> does not
>> > have such quality to justify low performance.
>> It looks like you are fetching an image over a specified region and
>> displaying it with matplotlib. That's very useful, but it
>> doesn't solve
>> the zooming problem you mentioned. Still, it's a good start and
>> would
>> be nice to have in basemap.
>>
>> Sorry for sounding so dismissive in my earlier reply. How do you
>> think
>> web map services could be integrated into Basemap? Do you see this
>> mainly as a faster and more general alternative to the
>> 'bluemarble' or
>> 'warpimage' methods, where you can specify a web map service and have
>> the appropriate tile that fits the map projection region fetched and
>> displayed automatically?
>>
>> -Jeff
>>
>>
>> If I could chime in for a quick moment, perhaps one could consider a 
>> specialized backend extension that would provide the web services 
>> communication? This way, when panning and zooming, the backend would 
>> know the limits and fetch (and optionally cache) the requested tiles 
>> from the connected service.
>>
>> Mind you, I don't think this quite falls into the scope of the mpl or 
>> Basemap project, but such a backend would be a powerful project on 
>> its own.
>>
>> Cheers!
>> Ben Root
>>
> Maybe such a thing could be built using owslib?
>
> http://geopython.github.com/OWSLib/
>
> -Jeff
tilecache.org looks relevant too.
-Jeff
>
>
> ------------------------------------------------------------------------------
> 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/
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Jeff W. <js...@fa...> - 2012年08月25日 15:50:37
On 8/25/12 7:53 AM, Benjamin Root wrote:
>
>
> On Saturday, August 25, 2012, Jeff Whitaker wrote:
>
> On 8/24/12 10:20 PM, klo uo wrote:
> > On Sat, Aug 25, 2012 at 1:26 AM, Jeff Whitaker wrote:
> >> Oh sure, it's simple!
> >>
> >> http://www.google.com/patents?id=J4YOAAAAEBAJ&dq=6618053
> > Hi Jeff,
> >
> > thanks for your reply.
> >
> > I was hoping to get response if there are ideas how this unfortunate
> > performance can be avoided. If there are some thoughts or if it's
> > closed case.
>
> Klo: It's not a closed case - but I have no idea how to do it. If
> you'd like to try to implement something, your contribution would be
> welcome.
> >
> > About GIS web-services, I thought maybe extending Basemap and
> > providing interface to some of available online mapping services.
> > For example arcgis is just one of them, and allows using their
> online
> > map service to arbitrary application, while exposing REST
> >
> (http://resources.arcgis.com/en/help/rest/apiref/index.html?mapserver.html)
> > and SOAP service with full WSDL description
> >
> (http://services.arcgisonline.com/ArcGIS/services/World_Imagery/MapServer?wsdl)
> > and documentation. REST requests cover all of their services while
> > SOAP is limited and a bit harder to code in this example. Services
> > offer much more than it's needed to be paired in Basemap, as can be
> > seen from documentation, with any imaginable projection and what
> not.
> >
> > As an example of using the service here is image:
> http://i.imgur.com/RpUFv.png
> > and here is it's simple source code that executes unnoticeable
> in second:
> > ========================================
> > import matplotlib.pyplot as plt
> > import urllib2
> >
> > lon1 = -10; lon2 = 30; lat1 = 30; lat2 = 60
> > basemap_url =
> >
> "http://server.arcgisonline.com/ArcGIS/rest/services/World_Physical_Map/MapServer/export?bbox=%d,%d,%d,%d&bboxSR=4326&size=1024,768&dpi=128&format=png32&f=image"
> > % (lon1, lat1, lon2, lat2)
> > overlay_url =
> >
> "https://ogcie.iblsoft.com/sigwx?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=ASXX&WIDTH=1024&HEIGHT=768&CRS=EPSG:4326&BBOX=%d,%d,%d,%d&TRANSPARENT=TRUE&STYLES=&FORMAT=image/png"
> > % (lon1, lat1, lon2, lat2)
> >
> > plt.figure(figsize=(8, 6), dpi=128, facecolor='w')
> > plt.imshow(plt.imread(urllib2.urlopen(basemap_url)))
> > plt.imshow(plt.imread(urllib2.urlopen(overlay_url)))
> > plt.gca().axison = False
> > plt.savefig("scene.png", dpi=128, transparent=True)
> > ========================================
> >
> > As both "basemap map" and overlay image use same CRS, this seems
> > doable with just MPL.
> >
> > Having such service paired in Basemap as a feature looks very
> > promising to me. I don't know much about MPL and Basemap design,
> as if
> > all above talk is easy and then acceptable for implementation, but
> > that's roughly what I had in mind for web-services - as additional
> > feature for replacing bloated background maps provided, which
> does not
> > have such quality to justify low performance.
> It looks like you are fetching an image over a specified region and
> displaying it with matplotlib. That's very useful, but it doesn't
> solve
> the zooming problem you mentioned. Still, it's a good start and would
> be nice to have in basemap.
>
> Sorry for sounding so dismissive in my earlier reply. How do you
> think
> web map services could be integrated into Basemap? Do you see this
> mainly as a faster and more general alternative to the 'bluemarble' or
> 'warpimage' methods, where you can specify a web map service and have
> the appropriate tile that fits the map projection region fetched and
> displayed automatically?
>
> -Jeff
>
>
> If I could chime in for a quick moment, perhaps one could consider a 
> specialized backend extension that would provide the web services 
> communication? This way, when panning and zooming, the backend would 
> know the limits and fetch (and optionally cache) the requested tiles 
> from the connected service.
>
> Mind you, I don't think this quite falls into the scope of the mpl or 
> Basemap project, but such a backend would be a powerful project on its 
> own.
>
> Cheers!
> Ben Root
>
Maybe such a thing could be built using owslib?
http://geopython.github.com/OWSLib/
-Jeff
From: Warren W. <war...@en...> - 2012年08月25日 15:40:27
On Sat, Aug 25, 2012 at 9:59 AM, Michael Rawlins <raw...@ya...>wrote:
>
>
> ------------------------------
> *From:* Damon McDougall <dam...@gm...>
> *To:* Michael Rawlins <raw...@ya...>
> *Cc:* "mat...@li..." <
> mat...@li...>
> *Sent:* Saturday, August 25, 2012 4:21 AM
> *Subject:* Re: [Matplotlib-users] plotting a colored symbol with plot
> command
>
> On Fri, Aug 24, 2012 at 02:39:12PM -0700, Michael Rawlins wrote:
> >
> >
> >
> >
> > ________________________________
> > From: Damon McDougall <dam...@gm...>
> > To: Michael Rawlins <raw...@ya...>
> > Cc: "mat...@li..." <
> mat...@li...>
> > Sent: Friday, August 24, 2012 4:22 PM
> > Subject: Re: [Matplotlib-users] plotting a colored symbol with plot
> command
> >
> > On Fri, Aug 24, 2012 at 09:20:47PM +0100, Damon McDougall wrote:
>
> >
> > If I use plt.plot(x, y, color='g', marker='.', markersize=3.0)
> >
> > the dots are black.
>
> That should not happen... Have you tried some of the other colours? 'r',
> 'b', 'm', 'y', 'c'? Are they all black? What are you saving the file as?
> What
> is the output of:
>
> plt.get_backend()
>
>
> Yes I've tried several. All produce black dots. The output of that command
> is 'agg'. I use:
>
> plt.savefig('map.eps')
>
> to produce eps images.
>
>
The default 'markeredgecolor' (or 'mec') is black, and with small dots, you
will see more edge color than face color. To test this, create the same
plot but with an exaggerated marker size, e.g. markersize=30. If that is
the problem, you can fix it by also setting the edge color to green, e.g.
mec='g'.
Warren
[Sending to the list this time--forgot to "reply to all" the first time.]
>
>
>
> --
> Damon McDougall
> http://www.damon-is-a-geek.com
> B2.39
> Mathematics Institute
> University of Warwick
> Coventry
> West Midlands
> CV4 7AL
> United Kingdom
>
>
>
>
> ------------------------------------------------------------------------------
> 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/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Damon M. <dam...@gm...> - 2012年08月25日 15:06:36
On Sat, Aug 25, 2012 at 07:59:52AM -0700, Michael Rawlins wrote:
> ________________________________
> From: Damon McDougall <dam...@gm...>
> To: Michael Rawlins <raw...@ya...> 
> Cc: "mat...@li..." <mat...@li...> 
> Sent: Saturday, August 25, 2012 4:21 AM
> Subject: Re: [Matplotlib-users] plotting a colored symbol with plot command
> 
> On Fri, Aug 24, 2012 at 02:39:12PM -0700, Michael Rawlins wrote:
> > 
> > From: Damon McDougall <dam...@gm...>
> > To: Michael Rawlins <raw...@ya...> 
> > Cc: "mat...@li..." <mat...@li...> 
> > Sent: Friday, August 24, 2012 4:22 PM
> > Subject: Re: [Matplotlib-users] plotting a colored symbol with plot command
> > 
> > On Fri, Aug 24, 2012 at 09:20:47PM +0100, Damon McDougall wrote:
> 
> > 
> > If I use plt.plot(x, y, color='g', marker='.', markersize=3.0)
> > 
> > the dots are black.
> 
> That should not happen... Have you tried some of the other colours? 'r',
> 'b', 'm', 'y', 'c'? Are they all black? What are you saving the file as? What
> is the output of:
> 
> plt.get_backend()
> 
> 
> Yes I've tried several. All produce black dots. The output of that command is 'agg'. I use:
> 
> plt.savefig('map.eps')
> 
> to produce eps images.
> 
Bizarre. I am still seeing green dots.
Could you provide a very minimal example for which you see black dots?
It'd be nice to understand what's going on.
Also, what's the output of
import matplotlib
print matplotlib.__version__
Thanks.
-- 
Damon McDougall
http://www.damon-is-a-geek.com
B2.39
Mathematics Institute
University of Warwick
Coventry
West Midlands
CV4 7AL
United Kingdom
From: Michael R. <raw...@ya...> - 2012年08月25日 15:00:00
________________________________
 From: Damon McDougall <dam...@gm...>
To: Michael Rawlins <raw...@ya...> 
Cc: "mat...@li..." <mat...@li...> 
Sent: Saturday, August 25, 2012 4:21 AM
Subject: Re: [Matplotlib-users] plotting a colored symbol with plot command
 
On Fri, Aug 24, 2012 at 02:39:12PM -0700, Michael Rawlins wrote:
> 
> 
> 
> 
> ________________________________
> From: Damon McDougall <dam...@gm...>
> To: Michael Rawlins <raw...@ya...> 
> Cc: "mat...@li..." <mat...@li...> 
> Sent: Friday, August 24, 2012 4:22 PM
> Subject: Re: [Matplotlib-users] plotting a colored symbol with plot command
> 
> On Fri, Aug 24, 2012 at 09:20:47PM +0100, Damon McDougall wrote:
> 
> If I use plt.plot(x, y, color='g', marker='.', markersize=3.0)
> 
> the dots are black.
That should not happen... Have you tried some of the other colours? 'r',
'b', 'm', 'y', 'c'? Are they all black? What are you saving the file as? What
is the output of:
plt.get_backend()
Yes I've tried several. All produce black dots. The output of that command is 'agg'. I use:
plt.savefig('map.eps')
to produce eps images.
-- 
Damon McDougall
http://www.damon-is-a-geek.com
B2.39
Mathematics Institute
University of Warwick
Coventry
West Midlands
CV4 7AL
United Kingdom
On Mon, Aug 20, 2012 at 09:13:10AM -0400, Michael Droettboom wrote:
> I've filed an issue for this here:
> 
> https://github.com/matplotlib/matplotlib/issues/1110
>
I think I have sussed out what's going on here.
See PR: https://github.com/matplotlib/matplotlib/pull/1145
Basically, on creating a new Axes object, if a shared axes was passed
in, a copy of the current axes scale is executed. This overwrites the
current formatter.
> 
> Mike
> 
> On 08/19/2012 05:55 PM, Eric Firing wrote:
> >On 2012年08月19日 10:31 AM, Christopher Graves wrote:
> >>Hi
> >>
> >>
> >>I do not think this is the expected behavior. First, run the following:
> >>
> >>
> >>from pylab import *
> >>
> >>plot([0,3],[0.2,0.7])
> >>
> >>ax1 = gca()
> >>
> >>ax1.set_yscale('log')
> >>
> >>gca().yaxis.set_major_formatter(FormatStrFormatter('$%g$'))
> >>
> >>#ax2 = ax1.twiny()
> >>
> >>#ax2.set_xlim(ax1.get_xlim())
> >>
> >>show()
> >>
> >>
> >>You will see that the y-axis is log10rithmic and axis labels are 0.1 and
> >>1 rather than 10^-1 and 10^0, due to the use of set_major_formatter().
> >>
> >>
> >>Now uncomment the 2 commented lines and run it again. It seems that upon
> >>applying a twiny(), the set_major_formatter() action is removed and the
> >>y-axis is now displayed as 10^-1 and 10^0. Or more likely, the y-axis is
> >>"overwritten" with a new y-axis present in ax2. One can add another
> >>gca().yaxis.set_major_formatter(FormatStrFormatter('$%g$')) before the
> >>show() and it works as intended. However, it seems like unexpected
> >>behavior to "lose" the formatting when twinning the axis to add a
> >>secondary x-axis. Any advice or agreement that this could be a bug?
> >Yes, I think this is a bug.
> >
> >Eric
> >
> >>
> >>Best,
> >>
> >>Chris
> >>
> >
> >------------------------------------------------------------------------------
> >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/
> >_______________________________________________
> >Matplotlib-users mailing list
> >Mat...@li...
> >https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> ------------------------------------------------------------------------------
> 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/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
-- 
Damon McDougall
http://www.damon-is-a-geek.com
B2.39
Mathematics Institute
University of Warwick
Coventry
West Midlands
CV4 7AL
United Kingdom
From: Benjamin R. <ben...@ou...> - 2012年08月25日 13:54:06
On Saturday, August 25, 2012, Jeff Whitaker wrote:
> On 8/24/12 10:20 PM, klo uo wrote:
> > On Sat, Aug 25, 2012 at 1:26 AM, Jeff Whitaker wrote:
> >> Oh sure, it's simple!
> >>
> >> http://www.google.com/patents?id=J4YOAAAAEBAJ&dq=6618053
> > Hi Jeff,
> >
> > thanks for your reply.
> >
> > I was hoping to get response if there are ideas how this unfortunate
> > performance can be avoided. If there are some thoughts or if it's
> > closed case.
>
> Klo: It's not a closed case - but I have no idea how to do it. If
> you'd like to try to implement something, your contribution would be
> welcome.
> >
> > About GIS web-services, I thought maybe extending Basemap and
> > providing interface to some of available online mapping services.
> > For example arcgis is just one of them, and allows using their online
> > map service to arbitrary application, while exposing REST
> > (
> http://resources.arcgis.com/en/help/rest/apiref/index.html?mapserver.html)
> > and SOAP service with full WSDL description
> > (
> http://services.arcgisonline.com/ArcGIS/services/World_Imagery/MapServer?wsdl
> )
> > and documentation. REST requests cover all of their services while
> > SOAP is limited and a bit harder to code in this example. Services
> > offer much more than it's needed to be paired in Basemap, as can be
> > seen from documentation, with any imaginable projection and what not.
> >
> > As an example of using the service here is image:
> http://i.imgur.com/RpUFv.png
> > and here is it's simple source code that executes unnoticeable in second:
> > ========================================
> > import matplotlib.pyplot as plt
> > import urllib2
> >
> > lon1 = -10; lon2 = 30; lat1 = 30; lat2 = 60
> > basemap_url =
> > "
> http://server.arcgisonline.com/ArcGIS/rest/services/World_Physical_Map/MapServer/export?bbox=%d,%d,%d,%d&bboxSR=4326&size=1024,768&dpi=128&format=png32&f=image
> "
> > % (lon1, lat1, lon2, lat2)
> > overlay_url =
> > "
> https://ogcie.iblsoft.com/sigwx?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=ASXX&WIDTH=1024&HEIGHT=768&CRS=EPSG:4326&BBOX=%d,%d,%d,%d&TRANSPARENT=TRUE&STYLES=&FORMAT=image/png
> "
> > % (lon1, lat1, lon2, lat2)
> >
> > plt.figure(figsize=(8, 6), dpi=128, facecolor='w')
> > plt.imshow(plt.imread(urllib2.urlopen(basemap_url)))
> > plt.imshow(plt.imread(urllib2.urlopen(overlay_url)))
> > plt.gca().axison = False
> > plt.savefig("scene.png", dpi=128, transparent=True)
> > ========================================
> >
> > As both "basemap map" and overlay image use same CRS, this seems
> > doable with just MPL.
> >
> > Having such service paired in Basemap as a feature looks very
> > promising to me. I don't know much about MPL and Basemap design, as if
> > all above talk is easy and then acceptable for implementation, but
> > that's roughly what I had in mind for web-services - as additional
> > feature for replacing bloated background maps provided, which does not
> > have such quality to justify low performance.
> It looks like you are fetching an image over a specified region and
> displaying it with matplotlib. That's very useful, but it doesn't solve
> the zooming problem you mentioned. Still, it's a good start and would
> be nice to have in basemap.
>
> Sorry for sounding so dismissive in my earlier reply. How do you think
> web map services could be integrated into Basemap? Do you see this
> mainly as a faster and more general alternative to the 'bluemarble' or
> 'warpimage' methods, where you can specify a web map service and have
> the appropriate tile that fits the map projection region fetched and
> displayed automatically?
>
> -Jeff
If I could chime in for a quick moment, perhaps one could consider a
specialized backend extension that would provide the web services
communication? This way, when panning and zooming, the backend would know
the limits and fetch (and optionally cache) the requested tiles from the
connected service.
Mind you, I don't think this quite falls into the scope of the mpl or
Basemap project, but such a backend would be a powerful project on its own.
Cheers!
Ben Root
From: Jeff W. <js...@fa...> - 2012年08月25日 13:24:58
On 8/24/12 10:20 PM, klo uo wrote:
> On Sat, Aug 25, 2012 at 1:26 AM, Jeff Whitaker wrote:
>> Oh sure, it's simple!
>>
>> http://www.google.com/patents?id=J4YOAAAAEBAJ&dq=6618053
> Hi Jeff,
>
> thanks for your reply.
>
> I was hoping to get response if there are ideas how this unfortunate
> performance can be avoided. If there are some thoughts or if it's
> closed case.
Klo: It's not a closed case - but I have no idea how to do it. If 
you'd like to try to implement something, your contribution would be 
welcome.
>
> About GIS web-services, I thought maybe extending Basemap and
> providing interface to some of available online mapping services.
> For example arcgis is just one of them, and allows using their online
> map service to arbitrary application, while exposing REST
> (http://resources.arcgis.com/en/help/rest/apiref/index.html?mapserver.html)
> and SOAP service with full WSDL description
> (http://services.arcgisonline.com/ArcGIS/services/World_Imagery/MapServer?wsdl)
> and documentation. REST requests cover all of their services while
> SOAP is limited and a bit harder to code in this example. Services
> offer much more than it's needed to be paired in Basemap, as can be
> seen from documentation, with any imaginable projection and what not.
>
> As an example of using the service here is image: http://i.imgur.com/RpUFv.png
> and here is it's simple source code that executes unnoticeable in second:
> ========================================
> import matplotlib.pyplot as plt
> import urllib2
>
> lon1 = -10; lon2 = 30; lat1 = 30; lat2 = 60
> basemap_url =
> "http://server.arcgisonline.com/ArcGIS/rest/services/World_Physical_Map/MapServer/export?bbox=%d,%d,%d,%d&bboxSR=4326&size=1024,768&dpi=128&format=png32&f=image"
> % (lon1, lat1, lon2, lat2)
> overlay_url =
> "https://ogcie.iblsoft.com/sigwx?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=ASXX&WIDTH=1024&HEIGHT=768&CRS=EPSG:4326&BBOX=%d,%d,%d,%d&TRANSPARENT=TRUE&STYLES=&FORMAT=image/png"
> % (lon1, lat1, lon2, lat2)
>
> plt.figure(figsize=(8, 6), dpi=128, facecolor='w')
> plt.imshow(plt.imread(urllib2.urlopen(basemap_url)))
> plt.imshow(plt.imread(urllib2.urlopen(overlay_url)))
> plt.gca().axison = False
> plt.savefig("scene.png", dpi=128, transparent=True)
> ========================================
>
> As both "basemap map" and overlay image use same CRS, this seems
> doable with just MPL.
>
> Having such service paired in Basemap as a feature looks very
> promising to me. I don't know much about MPL and Basemap design, as if
> all above talk is easy and then acceptable for implementation, but
> that's roughly what I had in mind for web-services - as additional
> feature for replacing bloated background maps provided, which does not
> have such quality to justify low performance.
It looks like you are fetching an image over a specified region and 
displaying it with matplotlib. That's very useful, but it doesn't solve 
the zooming problem you mentioned. Still, it's a good start and would 
be nice to have in basemap.
Sorry for sounding so dismissive in my earlier reply. How do you think 
web map services could be integrated into Basemap? Do you see this 
mainly as a faster and more general alternative to the 'bluemarble' or 
'warpimage' methods, where you can specify a web map service and have 
the appropriate tile that fits the map projection region fetched and 
displayed automatically?
-Jeff
>
>
> Cheers
>
> ------------------------------------------------------------------------------
> 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/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Damon M. <dam...@gm...> - 2012年08月25日 08:21:49
On Fri, Aug 24, 2012 at 02:39:12PM -0700, Michael Rawlins wrote:
> 
> 
> 
> 
> ________________________________
> From: Damon McDougall <dam...@gm...>
> To: Michael Rawlins <raw...@ya...> 
> Cc: "mat...@li..." <mat...@li...> 
> Sent: Friday, August 24, 2012 4:22 PM
> Subject: Re: [Matplotlib-users] plotting a colored symbol with plot command
> 
> On Fri, Aug 24, 2012 at 09:20:47PM +0100, Damon McDougall wrote:
>
> plt.pyplot gives an error:
> 
> AttributeError: 'module' object has no attribute 'pyplot'
>
Sorry, that's my mistake. It should be plt.plot
> 
> If I use plt.plot(x, y, color='g', marker='.', markersize=3.0)
> 
> the dots are black.
That should not happen... Have you tried some of the other colours? 'r',
'b', 'm', 'y', 'c'? Are they all black? What are you saving the file as? What
is the output of:
plt.get_backend()
> But I've found success with:
> 
> plt.plot(x,y,'wo',markeredgecolor='white',markersize=3.0)
> 
> so all is well. Thanks for your help.
> 
-- 
Damon McDougall
http://www.damon-is-a-geek.com
B2.39
Mathematics Institute
University of Warwick
Coventry
West Midlands
CV4 7AL
United Kingdom
From: klo uo <kl...@gm...> - 2012年08月25日 04:20:46
On Sat, Aug 25, 2012 at 1:26 AM, Jeff Whitaker wrote:
>
> Oh sure, it's simple!
>
> http://www.google.com/patents?id=J4YOAAAAEBAJ&dq=6618053
Hi Jeff,
thanks for your reply.
I was hoping to get response if there are ideas how this unfortunate
performance can be avoided. If there are some thoughts or if it's
closed case.
About GIS web-services, I thought maybe extending Basemap and
providing interface to some of available online mapping services.
For example arcgis is just one of them, and allows using their online
map service to arbitrary application, while exposing REST
(http://resources.arcgis.com/en/help/rest/apiref/index.html?mapserver.html)
and SOAP service with full WSDL description
(http://services.arcgisonline.com/ArcGIS/services/World_Imagery/MapServer?wsdl)
and documentation. REST requests cover all of their services while
SOAP is limited and a bit harder to code in this example. Services
offer much more than it's needed to be paired in Basemap, as can be
seen from documentation, with any imaginable projection and what not.
As an example of using the service here is image: http://i.imgur.com/RpUFv.png
and here is it's simple source code that executes unnoticeable in second:
========================================
 import matplotlib.pyplot as plt
 import urllib2
 lon1 = -10; lon2 = 30; lat1 = 30; lat2 = 60
 basemap_url =
"http://server.arcgisonline.com/ArcGIS/rest/services/World_Physical_Map/MapServer/export?bbox=%d,%d,%d,%d&bboxSR=4326&size=1024,768&dpi=128&format=png32&f=image"
% (lon1, lat1, lon2, lat2)
 overlay_url =
"https://ogcie.iblsoft.com/sigwx?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=ASXX&WIDTH=1024&HEIGHT=768&CRS=EPSG:4326&BBOX=%d,%d,%d,%d&TRANSPARENT=TRUE&STYLES=&FORMAT=image/png"
% (lon1, lat1, lon2, lat2)
 plt.figure(figsize=(8, 6), dpi=128, facecolor='w')
 plt.imshow(plt.imread(urllib2.urlopen(basemap_url)))
 plt.imshow(plt.imread(urllib2.urlopen(overlay_url)))
 plt.gca().axison = False
 plt.savefig("scene.png", dpi=128, transparent=True)
========================================
As both "basemap map" and overlay image use same CRS, this seems
doable with just MPL.
Having such service paired in Basemap as a feature looks very
promising to me. I don't know much about MPL and Basemap design, as if
all above talk is easy and then acceptable for implementation, but
that's roughly what I had in mind for web-services - as additional
feature for replacing bloated background maps provided, which does not
have such quality to justify low performance.
Cheers

Showing 18 results of 18

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 によって変換されたページ (->オリジナル) /