[ncl-talk] How might I keep the map size constant?

Barry Lynn barry.h.lynn at gmail.com
Thu Dec 12 11:46:56 MST 2019


Hi Rick:

I have implemented this and hopefully it will solve the problem.

Thank you!

 Title = time_var + " strokes = " + sum_light

  res at gsnFrame        = False

  plot_t    = gsn_csm_contour_map(wks,terrain_only,res)   ; create the
terrain plot

; txres               = True                     ; already defined.

  txres at txFontHeightF = 0.027

; page coordinates are normalized. go from 0->1 not 0->8" etc.

  gsn_text_ndc(wks,Title,0.04,0.96,txres) ; text appears at the top of the
mapped page.

  txres at txFontHeightF = 0.010 ; reset back to original value for city names.


On Thu, Dec 12, 2019 at 7:43 PM Rick Brownrigg <brownrig at ucar.edu> wrote:

> Hi Barry,
>
> I don't know for certain what's going on, but I speculate its the
> PlotManager trying to account for the different lengthed titles. One thing
> that comes to mind is taking over the job of drawing the title yourself.
> That is, set res at tiMainString = "", and then using gsn_text_ndc() to draw
> the label. This gets the PlotManager out of the picture. See example
> text_2.ncl at:
>
> http://ncl.ucar.edu/Applications/text.shtml
>
> Note the setting of gsnFrame=False, and the explicit call to frame(wks)
>
> Maybe someone has a better approach to this issue, but I hope that helps...
>
> Rick
>
>
> On Thu, Dec 12, 2019 at 10:13 AM Barry Lynn via ncl-talk <
> ncl-talk at ucar.edu> wrote:
>
>> Hi:
>>
>> I used NCL to create these maps.
>>
>> https://youtu.be/Zn17yiKcWbs
>>
>> The problem is when the number of observed lightning events changes, the
>> map size is resized from one map interval to the next  if the number skips
>> up or down from 1000 to 999, for example.  I don't believe that the panel
>> size is changing, only the map within.
>>
>> Thank you for your suggestions,
>>
>> Barry
>>
>> --
>> Barry H. Lynn, Ph.D
>> Senior Associate Scientist, Lecturer,
>> The Institute of the Earth Science,
>> The Hebrew University of Jerusalem,
>> Givat Ram, Jerusalem 91904, Israel
>> Tel: 972 547 231 170
>> Fax: (972)-25662581
>>
>> C.E.O, Weather It Is, LTD
>> Weather and Climate Focus
>> http://weather-it-is.com
>> Jerusalem, Israel
>> Local: 02 930 9525
>> Cell: 054 7 231 170
>> Int-IS: x972 2 930 9525
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

-- 
Barry H. Lynn, Ph.D
Senior Associate Scientist, Lecturer,
The Institute of the Earth Science,
The Hebrew University of Jerusalem,
Givat Ram, Jerusalem 91904, Israel
Tel: 972 547 231 170
Fax: (972)-25662581

C.E.O, Weather It Is, LTD
Weather and Climate Focus
http://weather-it-is.com
Jerusalem, Israel
Local: 02 930 9525
Cell: 054 7 231 170
Int-IS: x972 2 930 9525
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191212/72dbb99c/attachment.html>


More information about the ncl-talk mailing list