[ncl-talk] Using vp resources for panelling different sized WRF contour plots
Mary Haley
haley at ucar.edu
Fri Aug 24 08:10:43 MDT 2018
Hi Tabish,
I haven't tried this with wrf_map_overlays, but I think if you want to
change the width and height, you need to do it using the second resource
list associated with wrf_map_overlays:
mpres = True
mpres at vpHeightF = vph
plot(1) = wrf_map_overlays(c,wks,(/contour_d04/),pltres,mpres)
If that doesn't work, then you could try setting the height after the plot
is created:
plot(1) = wrf_map_overlays(c,wks,(/contour_d04/),pltres,False)
setvalues plot(1)
"vpHeightF" : vph
end setvalues
If that still doesn't work, then it would help if you could provide your
data file, which you can use our ftp for, if the file is not too large.
You can email me this information offline if you don't want to email the
whole group.
http://www.ncl.ucar.edu/ftp_files.shtml
--Mary
On Wed, Aug 22, 2018 at 10:07 AM, Tabish Ansari <tabishumaransari at gmail.com>
wrote:
> 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/20180824/a5b16faa/attachment.html>
More information about the ncl-talk
mailing list