Jeff: in the end, i decided to suspend this kind of approach to problem,
but should give it a try in the future. thanks for suggestion.

-Yasin

2012/6/14 Jeff Whitaker <jeffrey.s.whita...@noaa.gov>

>  On 6/14/12 7:52 AM, Yasin Selçuk Berber wrote:
>
> 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')
>
> 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."
>
>
> Yasin:  If you use pcolor or contourf, you can specify the x,y (map
> projection) coordinates of the data grid, and the data will be plotted on a
> subset of the map projection region.  imshow (which doesn't take x,y
> coordinates) just fills the whole plotting region with an image.  If you
> want to use imshow, perhaps you could define an inset map (with no
> coastlines drawn) inside your larger map, and plot the image on the inset
> map.
>
> -Jeff
>
> --
> Jeffrey S. Whitaker         Phone  : (303)497-6313
> Meteorologist               FAX    : (303)497-6449
> NOAA/OAR/PSD  R/PSD1        Email  : jeffrey.s.whita...@noaa.gov
> 325 Broadway                Office : Skaggs Research Cntr 1D-113
> Boulder, CO, USA 80303-3328 Web    : http://tinyurl.com/5telg
>
>


-- 
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to