[ncl-talk] Adding markers on an overlay plot

Rick Brownrigg brownrig at ucar.edu
Fri Mar 1 07:41:29 MST 2019


Hi Maxime,

It looks like you are very close -- I think all you need to do is add this
to your resources:

    res1 at gsnFrame = False
    res1 at gsnDraw = False

Without these, the plots are drawn immediately upon calls to
gsn_csm_XXXX(), before the markers get attached to the plots.  In fact, I'm
a bit surprised you did not end up with 7 different plot frames, but ???

As a general comment, I see a great deal of code dealing with setting of
different resources that share some common values. It might be less tedious
to do something like:

   res1 = True
   res1 at foo = "..."
   ...
   res1 at bar = "..."

   res2 = res1
   res3 = res1
   res4 = res1

;;; and now you set those values that are unique to res2/res3/res4 directly
on those resource variables.

I hope that helps...
Rick


On Fri, Mar 1, 2019 at 4:11 AM Maxime Colin <m.colin at unsw.edu.au> wrote:

> Dear NCL users,
>
>
> I'm trying to have 7 lines, of different colours, different styles
> (dashed/dotted/solid), with a legend, and with different markers, . It
> works all fine as long as I don't try to add markers (see plot attached).
>
>
> I've tried to add the markers following example 1 here (
> https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_add_polymarker.shtml)
> and then following example 16 here (
> https://www.ncl.ucar.edu/Applications/overlay.shtml). I have no error
> message, but the markers do not appear on the plot. I am not inside a
> procedure or function as far as I can tell.
>
>
> I doubt the problem is in the variable computation, but rather in the
> plotting commands.I attach the script I'm using for reference.
>
>
> Could anybody help me figure out what the problem may be?
>
>
> Thank you very much.
>
>
> Maxime.
>
>
>
>
> Maxime Colin
> ---------------------------------------------
> PhD candidate
> Climate Change Research Centre & ARC Centre of Excellence for Climate System Science, UNSW, Australia
> and Laboratoire de Météorologie Dynamique, UPMC, France
> http://www.ccrc.unsw.edu.au/ccrc-team/students/maxime-colin
> http://www.climatescience.org.au/staff/profile/mcolin
> ---------------------------------------------
> +61 (0)421 620 779    /    +33 (0)6 25 57 81 93
> m.colin at student.unsw.edu.au    /     colinmaxime at hotmail.fr <https://www.normalesup.org/phare/squirrelmail/src/compose.php?send_to=maxime.colin%40normalesup.org>
>
>
> _______________________________________________
> 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/20190301/3d4a227f/attachment.html>


More information about the ncl-talk mailing list