[ncl-talk] Multiple overlays for 3 panels on a 4-panel scatter plot

Rick Brownrigg brownrig at ucar.edu
Tue Sep 7 12:15:16 MDT 2021


Hi Jason,

I'm not totally sure what's going on here, but it looks like you are
creating 3 plots, each with other data and perhaps annotations overlaid on
top?  You allocate the variable plot as an array of graphic of length 4,
and use that in a call gsn_panel, but I. don't see where you ever assign
anything to that array.  You are also calling gsn_panel before anything is
written to the variable plot.

There are the variables plt10, plt11, plt12 that appear to be "base" plots
for overlays -- perhaps those variables should be something like plot(0),
plot(1), plot(2).  I don't know what's intended for plot(3), but note that
you use the variable plt11 twice, effectively overwriting one of your
plots. Then you would want to replace the last lines draw(plot)/frame(wks)
by the call to gsn_panel(), which do the actual drawing.

You might also check the docs on gsn_panel for some cautionary notes about
using the resource gsnMaximize:

    http://ncl.ucar.edu/Document/Graphics/Interfaces/gsn_panel.shtml

I hope that helps...
Rick

On Tue, Sep 7, 2021 at 11:53 AM Herb, Jason via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Hello All,
>
> I have a scatter plot in which attempting to color code based on
> observation location (ie urban, suburban and rural). All my data is feeding
> properly but the issue is getting the data to plot. I have attempted to do
> overlays where needed for each plot. But seeming to have gsn_ panel issue
> and can figure it out.
> The error message being received is :
>
> (0)     gsn_panel: Error: all of the plots passed to gsn_panel appear to
> be invalid
>
> I have attached the entire script, in addition to a condensed portion just
> involving the plotting aspect.
>
>
> Thanks,
> Jason
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210907/9976fdc7/attachment.html>


More information about the ncl-talk mailing list