Re: legend and annotation

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Apr 21 2010 - 10:22:12 MDT

Hi Fan,

I've created an example for you. See example 11 at:

http://www.ncl.ucar.edu/Applications/legend.shtml

If you indeed want to move the legend to a second page, you can't use
the
legend that comes with the XY plot. Instead, you need to use
gsn_legend_ndc
or gsn_create_legend to create your own legend.

This example shows how to use gsn_legend_ndc.

You are also very close with your resource settings for the legend.
The example shows how to do this using resources you set for the XY
plot.

--Mary

On Apr 21, 2010, at 7:05 AM, Fan Fang wrote:

> I have two question about adding legends and annotations.
>
> First, I want the legend to include all markers, dash patterns, and
> colors I used in plot. I make arrays for these symbols/colors and use
> lgres like:
>
> lgres = True
> lgres@lgMonoMarkerIndex = False
> lgres@lgMarkerIndexes = markerArray
> lgres@lgMonoDashIndex = False
> lgres@lgDashIndexes = dashPatternArray
> lgres@lgMonoLineColor = False
> lgres@lgLineColors = colorArray
>
> I saw lines with different dash patterns and colors but not the
> markers
> (I expected to see the markers in the middle of lines in legend, at
> least somewhere around it). Is it doable or what would be the correct
> way to do it?
>
> Second, due to the size of the legend I want to move it as an
> annotation
> to a second frame (in other words, the plot in one frame, and
> annotations in a different frame without the plot, but otherwise in
> one
> postscript file). I did a frame(wks) for the plot which came out ok.
> I used lgres and amres resources and either gsn_add_annotation() or
> NhlAddAnnotation() but the annotation would not show up until I
> draw(plot) and frame(wks), when both plot and annotation came out
> overlapping with each other. Again, I am not sure I am using the
> correct method doing this.
>
> Thanks for help.
>
> -Fan
>
>
> _______________________________________________
> 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
Received on Wed Apr 21 10:22:57 2010

This archive was generated by hypermail 2.1.8 : Fri Apr 23 2010 - 14:40:07 MDT