[ncl-talk] margin top of viewport?

MeteoBB info at meteo-bb.de
Mon Feb 25 17:10:00 MST 2019


Hello,

find out that the height und width depends on the map lat and lon-settings:

res at mpLimitMode   = "LatLon"
res at mpMinLatF     = 45.0
res at mpMaxLatF     = 56.0

When the latitude region is to small, then the height of the viewport is 
not as set before.
Same for the lat-region is to big. But that's a gamble then.
How to find out, which lat lon settings to choose, that the vpWidth and 
vpHeight fit's?
(vpWidth and vpHeight should be the same)

Regards

Am 22.02.2019 um 00:00 schrieb MeteoBB:
> Hi,
>
> first I also thought about the labelbar.
>
> I've tested the following:
> *res at lbTitleOn = True*
> and then :
> *res at lbLabelBarOn = False*
>
> Result is attached. No changes in die viewport height.
>
> Regards.
>
> Am 21.02.2019 um 17:41 schrieb Adam Phillips:
>> Hello,
>> I would speculate that it has to do with the label bar, as in the 
>> labelbar is counted as part of the plot height. Note the height of 
>> the plot itself is not equal to 0.3. Try temporarily turning off 
>> first the labelbar title, and then the entire labelbar and see if 
>> that corrects the issue. If it does, you can always call 
>> gsn_labelbar_ndc (example of use  instead of letting the plotting 
>> function handle the plotting.
>> gsn_labelbar_ndc documentation: 
>> https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_labelbar_ndc.shtml
>> Script that uses gsn_labelbar_ndc: 
>> https://www.ncl.ucar.edu/Applications/Scripts/maponly_6.ncl
>>
>> Hope that helps!
>> Adam
>>
>>
>> On Thu, Feb 21, 2019 at 7:03 AM MeteoBB <info at meteo-bb.de 
>> <mailto:info at meteo-bb.de>> wrote:
>>
>>     Hi all,
>>
>>     to get space in top of the plot i tried to set the viewport
>>     parameters manually in NDC.
>>
>>     res at vpXF        = 0.2
>>     res at vpYF        = 0.8
>>     res at vpHeightF   = 0.3
>>     res at vpWidthF    = 0.3
>>
>>     As you can see in die picture, the x-coordinate is correct (0.2).
>>     But the y coordinate of the viewport isn't 0.8 (it is 0.784).
>>     Why? Is that because of my lat/lon settings for the contour plot?
>>     Any ideas?
>>
>>     Regards.
>>
>>     Am 19.02.2019 um 05:49 schrieb Rick Brownrigg:
>>>     Hi,
>>>
>>>     I have to wonder if you might have better luck trying your
>>>     annotations in NDC space. There are a number of functions named
>>>     "gsn_XXX_ndc() that operate in this coordinate system. The
>>>     function "drawNDCGrid()" can be helpful in understanding what's
>>>     going on.
>>>
>>>     http://ncl.ucar.edu/Document/Functions/Shea_util/drawNDCGrid.shtml
>>>
>>>     HTH...
>>>     Rick
>>>
>>>     On Mon, Feb 18, 2019 at 5:26 PM MeteoBB <info at meteo-bb.de
>>>     <mailto:info at meteo-bb.de>> wrote:
>>>
>>>         Hi,
>>>
>>>         i have a map with a countur plot and want to add above the
>>>         map a box with some infos (see the attached pic).
>>>         Drawing the box is no problem, but when i turn off the
>>>         MainString, then there is no area left to draw my box,
>>>         because the
>>>         map is slipping up. Yes, i could leave the MainTitle empty.
>>>         But this is not satisfying.
>>>
>>>         Tried setting:
>>>         *res at gsnBoxMargin = 0.05 *
>>>
>>>         seems to be a good start. But is there a resource only for a
>>>         margin-top?
>>>         Or do i have to set the viewport manually with
>>>         *vpXF*,*vpYF*, *vpWidthF*, *vpHeightF*?
>>>
>>>         Thanks.
>>>
>>>
>>>         _______________________________________________
>>>         ncl-talk mailing list
>>>         ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
>>>         List instructions, subscriber options, unsubscribe:
>>>         http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>
>>     _______________________________________________
>>     ncl-talk mailing list
>>     ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
>>     List instructions, subscriber options, unsubscribe:
>>     http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>>
>> -- 
>> Adam Phillips
>> Associate Scientist, Climate and Global Dynamics Laboratory, NCAR
>> www.cgd.ucar.edu/staff/asphilli/ 
>> <http://www.cgd.ucar.edu/staff/asphilli/> 303-497-1726
>>
>
>
> _______________________________________________
> 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/20190226/3b1476ce/attachment.html>


More information about the ncl-talk mailing list