Re: line label density

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Tue Jan 26 2010 - 12:55:19 MST

Hi Mike,
Mary is correct that the only way to control the number of line labels
is with the xyLineDashSegLenF. As she notes, there is only a scalar
resource, meaning that the same value applies to all lines in the
plot. Furthermore, it is not possible to control with any precision
the positioning of the labels at one end or the other of the lines.
At the moment, the only way to achieve the control you want is 1) to
use James Correia's idea of drawing the line without labels and the
redrawing just a portion of the line with labels included. I think
this might be a somewhat frustrating exercise. Another possibility is
2) use gsn_add_text to place text at the locations you choose. You
would probably need to set txBackgroundFillColor to something besides
transparent if you want the labels to appear over the lines. More
control of this feature would certainly be desirable. We will put it
on the to-do list.
  -dave

On Jan 26, 2010, at 11:53 AM, Mary Haley wrote:

> Hi Mike,
>
> Dave Brown will need to weigh in here, but I did't see any resource
> that allows you to control the density of the labels, like we have
> with contour labels.
>
> There's one resource, xyLineDashSegLenF that allows you to specify,
> in NDC coordinates, how often a dash pattern is repeated. Since the
> labels actually become part of the pattern,
> this resources controls how often you see the labels.
>
> This resource is not perfect however. If your curves vary in
> amplitutde quite a bit from each other, then one line may end up with
> more labels than another.
>
>
> See attached script and PDF file.
>
> --Mary
>
> On Jan 26, 2010, at 9:28 AM, M Coniglio wrote:
>
>> Hello-
>>
>> I'm wondering if there's a resource for controlling the number of
>> line labels on an xy plot. I'm using:
>>
>> res@xyLabelMode = "Custom"
>> res@xyExplicitLabels = (/"0-1 km","0-3 km","0-6 km","0-8
>> km","3-8 km"/)
>>
>> which results in the attached plot. The labels are drawn 3-4 times
>> per line, but I want only one label per line. I looked for a
>> "xyLineLabelDensityF" resource, or something like that, and
>> couldn't find one.
>>
>> Thanks,
>> Mike
>>
>> --
>> *************************
>> Dr. Michael Coniglio
>> National Severe Storms Laboratory
>> 120 David L. Boren Blvd
>> Norman, OK 73072
>> (405) 325-6227
>> Michael.Coniglio@noaa.gov
>> *************************
>>
>> <example.png>_______________________________________________
>> 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

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jan 26 12:55:27 2010

This archive was generated by hypermail 2.1.8 : Mon Feb 01 2010 - 08:05:34 MST