Re: warning:TransformPostDraw: tfPolyDrawList element 0 is invalid

From: Cheung <zuibeidemei_at_nyahnyahspammersnyahnyah>
Date: Sun Apr 01 2012 - 09:01:50 MDT

it's resolved, no need to bother.

At 2012-04-01 21:58:13,Cheung <zuibeidemei@126.com> wrote:

Dear all:

       I'm trying to add some error_bar to my plot. For efficiency, I use a function to do this.

But the plot is generated without error bar, and it throws:
warning:TransformPostDraw: tfPolyDrawList element 0 is invalid
warning:TransformPostDraw: tfPolyDrawList element 1 is invalid

.....
plot(0) = add_error_bar(wks,res,6,mid,std)
.....

undef("add_error_bar")
function add_error_bar(wks,res,nps:numeric,mean:numeric,std:numeric)
begin

  plot = gsn_csm_xy(wks,ispan(1,6,1),mean(0:5),res)
  polyres &nbsp ; = True
  polyres@gsMarkerIndex = 1 ; index for circle
  polyres@gsMarkerSizeF = .01 ; size
  error_bar = new(nps,graphic)
  centers = new(nps,graphic)
  do t = 0, dimsizes(nps)-1
    centers(t) = gsn_add_polymarker(wks,plot,t+1,mean(t),polyres)
    error_bar(t) = gsn_add_polyline(wks,plot,(/t+1,t+1/),(/mean(t)-std(t),mean(t)+std(t)/),polyres)
  end do
&nbs p; return(plot)
end

Thanks

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Apr 1 09:02:03 2012

This archive was generated by hypermail 2.1.8 : Mon Apr 09 2012 - 13:43:03 MDT