[ncl-talk] Problem with panel plot

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Tue Apr 14 12:18:28 MDT 2020


Please reply to the mailing list, not to me personally.

I see another problem.  You have gsn_open_wks inside the loops making 18
plots.  The workstation must be opened only once, before the start of the
loops, if you want to make a panel plot.  Please move that statement to
above the loops, and see what happens.

Also when paneling, the Draw and Frame resources should be set to False
when making the individual plots inside the loop.  Otherwise, each plot
would get drawn twice in the output file.  See how this is done in the
panel examples.


On Tue, Apr 14, 2020 at 11:57 AM   mqadimi <mqadimi at yahoo.com> wrote:

>  Excuse me. This is just a misspelling happend when writing this mail. In
> my code i have used "Plot" correctly. The problem is sth other than typo.
>
>
> From: Dave Allured - NOAA Affiliate <dave.allured at noaa.gov>
> Date: 14/04/2020 22:00 (GMT+03:30)
>
> You spelled "Plot" two different ways.  Variable names in NCL are case
> sensitive.  If you use the same case spelling consistently, that may fix
> the problem.
>
>
> On Tue, Apr 14, 2020 at 11:02 AM Morteza Qadimi via ncl-talk <
> ncl-talk at ucar.edu> wrote:
>
>> Hi NCL wizards,
>>
>> I’ve made 18 plots using code below:
>>
>> ==============================================================
>>
>> Plot = new (18,graphic)
>>
>> Some resources
>>
>> .
>>
>> .
>>
>> .
>>
>> do i=0,2
>>
>>   do j=0,2
>>
>>     do k=0,1
>>
>>       l=0
>>
>>       plotname      = “Plot”+Models(i)+"_"+Scenarios(j)+"_EOF"+(k+1)
>>
>>       wks                = gsn_open_wks("pdf”,plotname)
>>
>>       PLOT (l)         = gsn_csm_contour_map(wks,EOF(i,j,k,:,:),res)
>>
>>       l=l+1
>>
>>     end do
>>
>>   end do
>>
>> end do
>>
>> ==============================================================
>>
>>
>>
>> All the 18 plots get drown when I plot them individually, but when I try
>> to panel them by:
>>
>>
>>
>> ==============================================================
>>
>> resP                                              = True
>>
>> resP at gsnMaximize                   = True
>>
>> resP at gsnPanelMainString       = ""
>>
>>
>>
>> wks = gsn_open_wks("x11","Panel")
>>
>> gsn_panel(wks,PLOT,(/9,2/),resP)
>>
>> ==============================================================
>>
>>
>>
>> I get the error below:
>>
>>
>>
>> (0)     gsn_panel: Error: all of the plots passed to gsn_panel appear to
>> be invalid
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200414/af211480/attachment.html>


More information about the ncl-talk mailing list