[ncl-talk] histogram plot
Dennis Shea
shea at ucar.edu
Mon Oct 24 13:37:51 MDT 2016
See also:
http://www.ncl.ucar.edu/Applications/bootstrap.shtml
The two 'bootstrap_diff' examples at the end of the example page.
====
re: Mary's comment:
"Note that in order to get the X locations for your lines and strings, you
may want to use the special BeginBarLocs, MidBarLocs, or EndBarLocs
attributes that are returned when you create a histogram using
gsn_histogram."
There is a link at the following example:
bootstrap_stat_1a.ncl
<http://www.ncl.ucar.edu/Applications/Scripts/bootstrap_stat_1a.ncl>
'The procedure which attaches the markers to the histogram graphical object
is named *histogram_marker.ncl '*
<http://www.ncl.ucar.edu/Applications/Scripts/histogram_marker.ncl>
You can download and modify to draw a vertical line: gsn_add_polyline
On Mon, Oct 24, 2016 at 1:05 PM, Mary Haley <haley at ucar.edu> wrote:
> Sitan,
>
> Please be aware that ncl-talk emails are going to hundreds of users, so
> it's better not to specifically address NCL developers in a new email
> thread.
>
> I would start by looking at our histogram examples:
>
> http://www.ncl.ucar.edu/Applications/histo.shtml
>
> and in particular, examples histo_6.ncl and histo_11.ncl
>
> To add the text and lines to the plot, use gsn_add_text and
> gsn_add_polyline. You can see example histo_16.ncl for this.
>
> Note that in order to get the X locations for your lines and strings, you
> may want to use the special BeginBarLocs, MidBarLocs, or EndBarLocs
> attributes that are returned when you create a histogram using
> gsn_histogram.
>
> These attributes are necessary because the X axis values that you see
> (-2.2, -1.8, -1.4, etc) are not X locations, but rather bin ranges for your
> data. The three special attributes will give you the X locations for your
> bars so you can more easily position your text and lines where you want
> them.
>
> --Mary
>
>
> On Mon, Oct 24, 2016 at 8:18 AM, Sitan Heyl <heylsitan at gmail.com> wrote:
>
>> Hi, Mary
>> I remember there is one example how to plot histogram like this
>> (attachment). can you give me some suggestion how to plot it?
>>
>> Best,
>> Yongli
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161024/7ba1ddfa/attachment.html
More information about the ncl-talk
mailing list