<div dir="ltr"><div>There is no explicit function to do that. This has to be a custom plot.</div><div>===<br></div><div><a href="http://www.ncl.ucar.edu/Applications/histo.shtml" target="_blank"><b>http://www.ncl.ucar.edu/Applications/histo.shtml</b></a></div><div>example 9</div><div>===</div><div>Perhaps, other have done this and have better ideas.<br></div><div>An overview of the process follows. It is your job to manage the plot.<br></div><div><br></div><div>[1] Decide the number of histograms you want to plot. Your example was 3x5 + 3x4=>27. I will use 6x5 for convenience]</div><div>[2] Based upon [1] specify a histogram size <br></div><div>[3] Draw background map [gsnFrame=False; <a href="http://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_map.shtml"><b>gsn_csm_map</b></a>]<br></div><div>[4] It looks like blocks [windows] of grid points were used to create the distribution</div><div>Loop over grid block locations. <br></div><div> NY = 6</div><div> MX = 5<br></div><div> plot_hist = new (/NY,MX/), "graphic")<br></div><div> ixblock = ; block size in 'x' [longitude direction]<br></div><div> jyblock = ; 'y' [latitude direction]</div><div> nplt = -1<br></div><div> do nblock=1,NBLOCK<br><div> xloc = ; location of 1st histogram<br></div><div> yloc =</div> </div><div> do jy=jyStrt,jyLast</div><div> do ix=ixStrt,ixLast</div><div> ....</div><div> end do ; ix<br></div><div> end do ; jy</div><div><br></div><div>; plot current histogram at centroid of grid location block</div><div> ixCenter = (ixStrt+ixLast)/2</div><div> jyCenter = (jyStrt+jyLast)/2</div><div><br></div><div> nplt = nplt + 1<br></div><div><div> plot(nplt)_ = gsn_histogram(...)<br></div></div><div><br></div><div><div> ixStrt = ixStrt+ixBlock ; update indices for next block<br></div><div> ixLast = ixLast+ixBlock</div><div><div> jyStrt = ixStrt+jyBlock</div><div> jyLast = jyLast+jyBlock</div><div><br></div><div> xloc = xloc + ...</div><div> yloc = yloc + ..<br></div><div><br></div></div></div><div> end do ; nblock</div><div> frame(wks) <br></div><div><br></div><div>====</div><div>Rather than 'do' loops, <br></div><div><div> do jy=jyStrt,jyLast</div><div> do ix=ixStrt,ixLast</div><div> ....</div><div> end do ; ix<br></div><div> end do ; jy</div></div><div><br></div><div>These internal loops do loops, you could likely use functions with syntax like<br></div><div><br></div><div> Q([..,..,jyStrt:jyLast,ixStrt:ixLast) ; data block<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 10, 2019 at 9:02 AM Lyndz via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Dear NCL expert,</div><div><br></div><div>I would like to plot a similar plot as in the attached file:</div><div>Barchart of rainfall in each gridbox.</div><div><br></div><div><br></div><div>I did this manually by extracting the values in each grid point within the domain, </div><div>plotting the barcharts individually (almost transparent) and manually overlaying them on the map.</div><div><br></div><div>I used CMAP for this with a 2.5 x 2.5 degree grid resolution.</div><div><br></div><div>I would like to ask for suggestions on how I can do this in a script using NCL.</div><div>I know how to plot a barchart, but how do you do this per grid point and plot at the center of each gridpoint?</div><div><br></div><div>I'll appreciate any help you can provide.</div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font face="comic sans ms, sans-serif"><b><u>Lyndz</u></b></font></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>