Re: Multiple polygons on panel plots (lat,lon)

From: Ahmad Farsyud <a.farsyud_at_nyahnyahspammersnyahnyah>
Date: Tue Jan 15 2013 - 16:14:39 MST

Thank you for the response,
However, after changing my codes it produced another error "fatal:Subscript
out of range, error in subscript #0 "esp at these lines:

do i = 0 , 3
    do n=0,nplots-1
     *dum((i*4)+n)=gsn_add_polyline(wks,plot(n),xpts(i:i+1),ypts(i:i+1),resp)
     <---*
    end do
 end do

Thanks a lot.
A.Farsyud.

On Wed, Jan 16, 2013 at 12:25 AM, Mary Haley <haley@ucar.edu> wrote:

>
> On Jan 15, 2013, at 4:10 AM, Ahmad Farsyud wrote:
>
> Hallo,
>
> Anybody can tell me how can I handle this error:
>
> fatal:Number of elements of dimension (0) of argument (0) is (2) in
> function (NhlAddPrimitive), expected (1) elements
> fatal:Execute: Error occurred at or near line 4147 in file
> $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl
> fatal:Execute: Error occurred at or near line 4412 in file
> $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl
>
> the error start at this lines:
>
> do i = 0 , 3
> dum(i)=gsn_add_polyline(wks,*plot*,xpts(i:i+1),ypts(i:i+1),resp)
> end do
>
> I need to plot all ploygons on each of my map in the panel plots. Once I
> change the plot
> to be *plot(0) or plot(1), *I did not get any error anymore but the
> polygons only appear in one map.
> That's not my goal.
>
> Thanks for any help.
> A. Farsyud
>
>
> Hi,
>
> You can only attach lines to one plot object at a time, so that's why
> plot(0) works and not plot. But, I can see why it would be useful to be
> able to pass an array of plots, so I'll add this to our list of things to
> do.
>
> Meanwhile, you will need to make "dum" big to be (# of plots) x 4:
>
> nplots = dimsizes(plots)
> dum = new(nplots*4,graphic)
>
> do i = 0 , 3
> do n=0,nplots-1
> dum((i*4)+n)=gsn_add_polyline(wks,*plot(n)*,xpts(i:i+1),ypts(i:i+1),resp)
>
> end do
> end do
>
> --Mary
>
>
>
>
>
>
> _______________________________________________
> 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 15 16:14:53 2013

This archive was generated by hypermail 2.1.8 : Sat Jan 19 2013 - 10:23:16 MST