[ncl-talk] Legend Line orientation

Adam Phillips asphilli at ucar.edu
Fri Mar 20 17:35:26 MDT 2015


Hi Alex,
I believe you are running into a limitation of NCL's legend creation
capabilities. You cannot lay the legend out the way you want to with a
single gsn_create_legend call. I think the best thing to do would be to
call gsn_create_legend for every "column" that you require (=3), similar to
what was done in example #6 here:
http://www.ncl.ucar.edu/Applications/unique.shtml#ex6

This could potentially be automated either within your script or by
creating your own function.

Hope that helps!
Adam



On Fri, Mar 20, 2015 at 4:27 PM, Alex Schaefer <
alexander.schaefer at mines.sdsmt.edu> wrote:

> Rick,
>
> The legend examples either offer horizontal lines with the different
> labels being stacked or vertical lines with the labels horizontally
> spread.  I am trying to get the in-between option:
>
> ——FIRE      ——LATENT     ——SENSIBLE
>
> Currently the only way this seems like it will happen is to piece together
> polylines and text annotations all separately which I was trying to avoid.
>
> My script is attached.
>
> Thanks,
> -Alex
>
>
>
> On Mar 20, 2015, at 2:59 PM, Rick Brownrigg <brownrig at ucar.edu> wrote:
>
> Hi Alex,
>
> Without seeing your script, its kind of hard to give specific advise.
> However, you might check out the examples at
>
>    http://ncl.ucar.edu/Applications/legend.shtml
>
> There are several plots there with horizontal legends similar to what you
> are after.
>
> HTH...
> Rick
>
>
> On Fri, Mar 20, 2015 at 12:11 PM, Alexander Schaefer <
> alexander.schaefer at mines.sdsmt.edu> wrote:
>
>> Hi All-
>>
>> I am trying to have a horizontally laid out legend but am struggling to
>> get all of the resources correct.  I have attached my current plot for
>> explanation of what I am trying to change.
>>
>> Is there a way to rotate the reference lines without having a vertical
>> legend?  I like the labels where  they are but the reference lines being
>> vertical looks odd to me.
>>
>> I am also trying to increase the offset between the line and the label
>> but *lgLabelOffsetF *is not making any difference to the position.
>>
>> Thanks for your time,
>> -Alex
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
>
> _______________________________________________
> ncl-talk mailing list
> 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/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150320/be07fbb3/attachment.html 


More information about the ncl-talk mailing list