Re: warning:TransformPostDraw:: shading region below res@gsnXYBarChartOutlineOnly

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Mar 05 2014 - 08:44:49 MST

Hi Erika,

Sorry about that. These errors are coming from the fact that I broke an NCL golden rule of using unique variable names when calling the gsn_add_polyxxx functions.

I’ve fixed the customize_bar_chart procedure to make sure the variables are unique. The updated version is on the web, and I’ve attached the new “bar_17.ncl” here.

—Mary

On Mar 5, 2014, at 3:35 AM, Erika Folova <e.folova@gmail.com> wrote:

> Dear Mary and NCL,
>
> Once I applied this subroutine for panel plot,
> I produced these error:
>
> warning:TransformPostDraw: tfPolyDrawList element 0 is invalid
> warning:TransformPostDraw: tfPolyDrawList element 1 is invalid
> warning:TransformPostDraw: tfPolyDrawList element 2 is invalid
> warning:TransformPostDraw: tfPolyDrawList element 3 is invalid
> warning:TransformPostDraw: tfPolyDrawList element 4 is invalid
> warning:TransformPostDraw: tfPolyDrawList element 0 is invalid
> warning:TransformPostDraw: tfPolyDrawList element 1 is invalid
> warning:TransformPostDraw: tfPolyDrawList element 2 is invalid
> warning:TransformPostDraw: tfPolyDrawList element 3 is invalid
> warning:TransformPostDraw: tfPolyDrawList element 4 is invalid
> warning:TransformPostDraw: tfPolyDrawList element 0 is invalid
> warning:TransformPostDraw: tfPolyDrawList element 1 is invalid
> warning:TransformPostDraw: tfPolyDrawList element 2 is invalid
> warning:TransformPostDraw: tfPolyDrawList element 3 is invalid
> warning:TransformPostDraw: tfPolyDrawList element 4 is invalid
>
> my snapshot codes look like this;
>
> plot(0) = gsn_csm_xy(wks,xx(0,:),yy(0,:),res)
> customize_bar_chart(wks,plot(0),xx(0,:),yy(0,:),xref_line)
>
> plot(1) = gsn_csm_xy(wks,xx(1,:),yy(1,:),res)
> customize_bar_chart(wks,plot(1),xx(1,:),yy(1,:),xref_line)
>
> plot(2) = gsn_csm_xy(wks,xx(2,:),yy(2,:),res)
> customize_bar_chart(wks,plot(2),xx(2,:),yy(2,:),xref_line)
>
> plot(3) = gsn_csm_xy(wks,xx(3,:),yy(3,:),res)
> customize_bar_chart(wks,plot(3),xx(3,:),yy(3,:),xref_line)
>
>
> resP = True
> resP@gsnPanelYWhiteSpacePercent = 5
> resP@gsnPanelXWhiteSpacePercent = 5
> gsn_panel(wks,plot,(/2,2/),resP)
>
> ;;==============
>
> xx and yy were produced from pdfx. Actually I also wonder how kind of setting that I need to do, if I want to divide the bins with the same size (ranges), because once I set nbins=40, it directly produced different size of bins. Thanks for any hints.
>
> Erika
>
>
>
>
> On Wed, Feb 26, 2014 at 8:33 PM, Erika Folova <e.folova@gmail.com> wrote:
> Thanks Mary,,
> I hope this subroutine can be added to the main graphic library/functions in the next release of NCL.
>
> Thank you very much,
> Best,
>
>
>
> On Thu, Feb 27, 2014 at 4:24 AM, Mary Haley <haley@ucar.edu> wrote:
> Erika,
>
> We don't have a specific function or set of resources to do what you're asking.
>
> However, you can create your own subroutine that adds the required filled area using gsn_add_polygon.
>
> I created an example that shows how to do this, and also shows how to draw the reference line and outlines yourself, so you can better control the order that everything gets drawn in.
> See example "bar_17.ncl" at:
>
> http://www.ncl.ucar.edu/Applications/bar.shtml#ex17
>
> --Mary
>
>
> On Feb 24, 2014, at 10:07 AM, Erika Folova <e.folova@gmail.com> wrote:
>
> > Dear NCL,
> >
> > Will helped me on this issue, but I still did not get the result as I expected.
> > What I need is to shade the region below the XYBarchart outline that is less than zero (value) indicating by xRefLine.
> > However, I have'nt got any trick, The example of the figure is in the attachment.
> > I fully understand what Willi suggested by overlaying the histogram, but I prefer to
> > have only the outline chart rather that the bar. Any helps would be really appreciated.
> >
> > Thanks for any tricks.
> > Best
> >
> >
> > <Screenshot.png>_______________________________________________
> > 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

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Mar 5 08:45:01 2014

This archive was generated by hypermail 2.1.8 : Fri Mar 14 2014 - 15:08:52 MDT