14 Jun 2012 15:52
how can i set a projection area larger than data's geographical coverage?
I want to set a projection area larger than data's geographical coverage.
But data must still be georeferenced correctly inside map region
and coastlines in projection area should still be visible outside data area.
right now, the data is always stretched inside whole projection area.
trying to mimic with characters:
--right now--
ulcorner
_______________________
| p r o j. a r e a |
| |
| w h o l e |
| d a t a |
| i s |
| s t r e t c h e d |
| |
-----------------------| lrcorner
--what i try to do--
ulcorner
_______________________
| |
|__________ this |
| | is |
| this |projection |
| is | area |
| data | |
| | |
-----------------------| lrcorner
Code below certainly does not work and stretch data to full projection region:
-------------------------
*code skipped*
m = Basemap(projection='merc',llcrnrlat=37,urcrnrlat=42,\
llcrnrlon=24,urcrnrlon=34,resolution='i')
llcrnrlon=24,urcrnrlon=34,resolution='i')
m.imshow(data, cmap=plt.cm.jet, interpolation='nearest')
plt.show()
*code skipped*
---------------------------
i fiddled with imshow's extent and clip_box keywords but since could not get it work. and googling for a serious amount of time didnt help either.
Some posts on web mentioned bbox or set_autoscale_on related things but i cant seem to get it. Any ideas ?
thanks.
--
Yasin Selçuk Berber
"Bismillah, her hayrın başıdır."
------------------------------------------------------------------------------ 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 Matplotlib-users@... https://lists.sourceforge.net/lists/listinfo/matplotlib-users
RSS Feed