[ncl-talk] Fwd: double error bars on a scatter plot

Alan Brammer abrammer at albany.edu
Sat Nov 26 11:24:45 MST 2016


You’ve already answered your own question which is good, but I took a couple minutes to provide an alternative (possibly more flexible) method of accomplishing your goals.

Using gsn_add_polyline() to draw the bars, and putting them into respective procedures to make things more modular and generic. 

The functions are incredibly simple and don’t check for many potential errors but are an example of how to break things up a bit more and make it more generic which can help future scripts. 







Alan


##############################
Alan Brammer,
Post-Doc Researcher

Department of Atmospheric and Environmental Sciences,
University at Albany, State University of New York, Albany, NY, 12222
abrammer at albany.edu
##############################

> On 25 Nov 2016, at 13:33, Rashed Mahmood <rashidcomsis at gmail.com> wrote:
> 
> I figured out how to plot this "double error bar" thing.
> I am attaching the script and the plot if someone else would want to plot a similar thing. I guess, if i have not missed it, there is probably no such example on NCL web.
> 
> Some explanation: The tric is to plot each error bar as a separate scatter plot with same resources (especially trYMin/Max and trXMin/Max)
> A loop can be used if we have many more data values. I hope the script is simple enough for everyone to understand it.
> 
> Best,
> Rashed
> 
> 
> 
> ---------- Forwarded message ----------
> From: Rashed Mahmood <rashidcomsis at gmail.com <mailto:rashidcomsis at gmail.com>>
> Date: Thu, Nov 24, 2016 at 2:19 PM
> Subject: double error bars on a scatter plot
> To: "ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>" <ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>>
> 
> 
> Hello everyone,
> 
> I am trying add two polylines at each marker of a scatter plot, however not getting it right.
> A very simple script that I am trying to work with is attached along with the resultant figure. I manually marked with red lines what I hope to get.
> 
> Does anyone has any ideas on this?
> 
> Best,
> Rashed  
> 
> <test_scatter_plot_2.ncl><test_scatter.pdf>_______________________________________________
> 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/20161126/031a1cad/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_scatter_plot_2.ncl
Type: application/octet-stream
Size: 1566 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161126/031a1cad/attachment.obj 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161126/031a1cad/attachment-0001.html 


More information about the ncl-talk mailing list