Re: Missing line labels

From: Mary Haley (haley AT ucar.edu)
Date: Fri Sep 10 2004 - 08:49:28 MDT

  • Next message: Derrick Snowden: "Other syntax highlighting options: NCL vim syntax"

    >
    > I am using gsn_add_polyline to add lines to an XY plot
    > and am trying to use gsLineLabelString to put labels
    > on each line. Most of the time none of them appear.
    > Once in awhile one of them appears. Never do they
    > all appear as expected. Even when the one does appear,
    > it's not in the middle of the line as hoped. I have
    > searched diligently for relevant resources and tried
    > lots of things but with no luck.
    >
    > Let me know and I'll send you the script, some data
    > and the figure I get from this data.
    >
    > thanks,
    > dave

    Dave,

    After running your script to see what kind of labels you were getting
    (not many at all), a bell rang somewhere for me about the
    "DashSegLenF" resources that exist for various plot objects. Since
    you are using gsn_add_polyline, the resource you want to use is
    "gsLineDashSegLenF".

    The documentation for this particular resource is not as detailed
    as it is for the XY plot version of this resource, which states:

        This resource indicates the length of each segment of a dash
        pattern. It is the length in NDCs before the dash pattern repeats
        itself. This resource automatically scales with changes in the
        size of the viewport of the XyPlot. If line labels are being
        drawn, this is also the length between the end of one label and
        the start of the next.

    The "gsLineDashSegLenF" resource defaults to 0.15, so decreasing its
    value should cause more labels to appear on your line. Unfortunately,
    I don't think you can control *where* the labels appear on your line.

    Here's the documentation on the resource, which I beefed up to include
    its effect on line labels:

    http://ngwww.ucar.edu/ngdoc/ng/ref/hlu/obj/GraphicStyle.res.html#gsLineDashSegLenF

    NCL developers: can you correct me if I'm wrong about this being the
    only resource that you can use?

    --Mary
    _______________________________________________
    ncl-talk mailing list
    ncl-talk@ucar.edu
    http://mailman.ucar.edu/mailman/listinfo/ncl-talk



    This archive was generated by hypermail 2b29 : Fri Sep 10 2004 - 08:58:46 MDT