Re: overlay plot

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Dec 20 2011 - 10:26:40 MST

On Dec 20, 2011, at 2:21 AM, juki juki wrote:

> Hi all,
> I come to you again and hope your sharing. I want to plot olr data and wind data together using overlay. The code and the input data are enclosed. By this email, I would like to ask several questions:
> (1). I think my attached code is correct, but when I run it was stated that "can not be overlay", how to make it overlayable ?

Dear Juky,

You are almost there. You can't overlay one map on another. The overlay plot needs to be a non-map plot.

Simply change:

   vector_wind = gsn_csm_vector_map_ce(wks,data_U(lat|:,lon|:),data_V(lat|:,lon|:),vcres)


   vector_wind = gsn_csm_vector(wks,data_U(lat|:,lon|:),data_V(lat|:,lon|:),vcres)

You also don't want tp set any mp resources when you call gsn_csm_vector. You've already set up the map when you created the contour plot.

> (2). How to set the space of the Thick of X and Y axis of the plot ? For example we can set the latitude and longitude as follow:
> res@mpMinLatF = -10 ;
> res@mpMaxLatF = 10.
> res@mpMinLonF = 80.
> res@mpMaxLonF = 160.
> For example, if we need to set the spaceLonF = 10, how to do it ?

You are setting res@pmTickMarkDisplayMode = "Always" which doesn't allow
for much customization. To be able to set the lat/lon spacing, don't set the
pmTickMarkDisplayMode resource, and set:

   res@gsnMajorLatSpacing = 10
   res@gsnMajorLonSpacing = 10

> (3) Assume we want to make multiplot as:
> gsn_panel(wks,plots,(/4,1/),pres), how to set the colorbar size and location ?, we can set as:
> pres = True ; Set panel resources.
> pres@gsnPanelLabelBar = True ; Turn on panel labelbar.
> pres@lbOrientation = "Vertical"
> But the size is very large (it is very long), for example if we need the location of the colorbar is at right side of first figure and the size is the same as the size of the first figure (its height), how to do it ?

You can set the pres@pmLabelBarWidthF resource to something between 0. and 1. to shorten it. Try a value of something like 0.6 to start with.


> Sorry, too many questions, thanks for nice attention...
> Cheers
> Juky
> <juky_overlay_test.ncl><djfOLR.txt><vwnd1.txt><uwnd1.txt>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Tue Dec 20 10:26:54 2011

This archive was generated by hypermail 2.1.8 : Wed Dec 21 2011 - 10:44:06 MST