[ncl-talk] Using vp resources for panelling different sized WRF contour plots

Tabish Ansari tabishumaransari at gmail.com
Wed Aug 22 10:07:12 MDT 2018


Hi Mary,

Thanks for your response.
I tried to include the following lines in the panelplot script:











*plot = new(2,graphic)                          ; create a plot
arrayplot(0) = wrf_map_overlays(a,wks,(/contour_d01/),pltres,mpres)  ; Plot
the data over a map background;---Retrieve the height used for the first
plot and apply to second plot  getvalues plot(0)    "vpHeightF" : vph  end
getvalues  pltres at vpHeightF                   = vphplot(1) =
wrf_map_overlays(c,wks,(/contour_d04/),pltres,False)  *

However, it still plots them with different height.

Does the wrf_map_overlays() function does not accept these resources?

Thanks

Tabish
Tabish U Ansari
PhD student, Lancaster Environment Center
Lancaster Univeristy
Bailrigg, Lancaster,
LA1 4YW, United Kingdom


On Mon, 20 Aug 2018 at 21:59, Mary Haley <haley at ucar.edu> wrote:

> Dear Tabish,
>
> You might be able to still use gsn_panel with the different-sized plots.
>
> The key is creating the first plot, and then retrieving the height of that
> plot and using it to set the height of the second plot. Then, when
> gsn_panel goes to panel both plots, it should retain the heights relative
> to each other.
>
> See the attached sample script, which only draws a map since I don't have
> your dataset.
>
> You can use gsnPanelXF to tweak the X positions of the paneled plots if
> you need to.
>
> --Mary
>
>
> On Mon, Aug 20, 2018 at 9:56 AM, Tabish Ansari <tabishumaransari at gmail.com
> > wrote:
>
>> Hi
>>
>> I want to panel two plots side by side but they're of different sizes.
>> The panelplot routine in ncl does plot them but they remain of different
>> heights. I want to use the vp resources to manually shrink them so that
>> their height matches.
>>
>> I have attached 2 scripts: first one is working and uses the panelplot
>> resource and creates the figure that is attached, second one uses vp
>> resources but doesn't panel the two plots side by side.
>>
>> I'd really appreciate if you could point out what's wrong in the second
>> script.
>>
>> Cheers,
>>
>> Tabish
>>
>>
>> Tabish U Ansari
>> PhD student, Lancaster Environment Center
>> Lancaster Univeristy
>> Bailrigg, Lancaster,
>> LA1 4YW, United Kingdom
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180822/eb6390a3/attachment.html>


More information about the ncl-talk mailing list