[ncl-talk] Question about gsn*String positioning with gsn_csm_x2y2 routine

Mary Haley haley at ucar.edu
Mon Aug 1 15:18:58 MDT 2016


Hi Alex,

I missed the part where you said the issue was with the gsnXXXStrings and
not with the tiMainString.

The gsnXXXStrings are separate thing entirely, and not managed by the
PlotManager.  They are actually placed "by hand" using the equivalent of
calls to gsn_text_ndc and gsn_add_annotation.  What you did with the
Orthogonal resources was the right thing.  Perhaps I could make this more
visible somehow. As a start, I've enhanced the gsn{Right,Center,Left}String
documentation to mention the other resources.

--Mary


On Fri, Jul 29, 2016 at 12:45 PM, Alexander Schaefer <aschae11 at uncc.edu>
wrote:

> Hi Mary,
>
> Why can’t all documentation be that exciting!
>
> Setting the pmTitleZone only seemed to move around the ti*Strings with
> respect to their positions.  It had no influence on the gsn*Strings.  After
> seeing what influence that resource had on the strings, I was finally able
> to find the resources I needed to alter to get the desired change.
>
>   res at gsnRightStringOrthogonalPosF
>   res at gsnLeftStringOrthogonalPosF
>
> When the documentation says to use small numbers I wasn’t expecting that
> small, then again I guess it is relative to the whole plot.  Setting the
> position to 0.0075 appears to do the trick to get the desired change.
>
> Thanks for opening up the ticket.  It would be great for the plot manager
> to configure the gsn*String position like it does with the other routines.
> I could see why it is expecting all of the tick marks to be on.
> Apparently, I could have achieved the plot using xy but apparently I wasn’t
> thinking the right train of thought when I was originally making this
> script.  I need to remember that NCL ignores fill values, (I’ll get all of
> the tricks down one day).
>
> Thanks,
> -Alex
>
>
>
>
> On Jul 29, 2016, at 1:46 PM, Mary Haley <haley at ucar.edu> wrote:
>
> Hi Alex,
>
> There's a short answer and a long answer.
>
> The short answer is to try setting "res at pmTitleZone" resource to either
> 1, 2, 3, or maybe 4.
>
> The long answer is that NCL's PlotManager uses "zones" to try to determine
> where to place titles with respect to the plot. I think zones 0 and 1 are
> contained within the plot X/Y axis boundary, zone 2 is just outside the
> plot, for example, where the tickmarks are, zone 3 is the area containing
> the tick mark labels, and so on.  The x2y2 routine is assuming that the top
> tickmarks and labels are all on, so it sets pmTitleZone to either 4 or 5,
> which causes the title to be moved up. By setting it to a lower value, this
> causes the title to move down.
>
> If you want to read some exciting stuff on zones, see:
>
>
> http://www.ncl.ucar.edu/Document/HLUs/Classes/PlotManager.shtml#PlotManager-Location-Control-Model
>
> I've created a ticket for this, NCL-2470.
>
> --Mary
>
>
> On Fri, Jul 29, 2016 at 10:23 AM, Alexander Schaefer <aschae11 at uncc.edu>
> wrote:
>
>> Hi all,
>>
>> I was wondering if anyone knows why there is a positioning issue with the
>> strings adjacent to the top of the plot when using the gsn_csm_x2y2
>> plotting routine as opposed to the gsn_csm_contour plotting routine.  I
>> haven’t noticed this in any of the other plotting routines I have used to
>> date.  When I turn off the top axis tick marks, the gsn*Strings don’t get
>> translated down to the top of the plot like they standardly do.  The first
>> page of the attached pdf illustrates the xy plot with the string
>> positioning issue I am referring to and the second page shows what I am
>> comparing it to, in my case, with the gsn*Strings in the correct position.
>>
>> I have created a script to reduce my scripts to basically just resources
>> (maybe they are interacting in an odd way) and plotting of fake data to
>> illustrate my question so hopefully it is less confusing than digging
>> through originals.  These plots are made in 2 separate scripts when I use
>> them but combine to reduce file count here.
>>
>> If anyone has some insight on the issue or how to fix it (maybe I missed
>> something) I would greatly appreciate the help.
>>
>> Thanks,
>> -Alex
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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/20160801/2a0cf4e2/attachment.html 


More information about the ncl-talk mailing list