<div dir="ltr"><div><div>Hi Ipshita,<br></div>Take a look at example #9 here:<br><a href="http://www.ncl.ucar.edu/Applications/bar.shtml#ex9">http://www.ncl.ucar.edu/Applications/bar.shtml#ex9</a><br><br></div><div>You will want to adjust your months array in your two <br>

gsn_csm_xy calls to be different from one another as it is done in the example.  Otherwise your bars will overlap.<br><br>Good luck,<br>Adam<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 1, 2014 at 3:56 PM, Ipshita Majhi <span dir="ltr">&lt;<a href="mailto:ipmajhi@alaska.edu" target="_blank">ipmajhi@alaska.edu</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi,<br></div>I want to plot trend values and monthly means in one plot. Both are an array of size 12 .<br>

</div>The program gives no error but the plot are overlapping. I am not sure how to fix it<br>
;*****************************************************<br>;Trend and monthly climatology together in one bar plot<br>;*******************************************************<br> <br>     load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;<br>


     load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;<br>     <br>     months=(/1,2,3,4,5,6,7,8,9,10,11,12/)<br><br>     monthly_avg=asciiread(&quot;~/Documents/PhD_June_2015/NCL_Moonsoon/Data_output/Monthly_avg_air.txt&quot;,-1, &quot;float&quot;)<br>


     monthly_Trend=asciiread(&quot;~/Documents/PhD_June_2015/NCL_Moonsoon/Data_output/trend_air.txt&quot;, -1, &quot;float&quot;)<br>     printVarSummary(monthly_avg)<br>     <br>     wks = gsn_open_wks(&quot;ps&quot;,&quot;Trend_Avg&quot;)<br>


<br>         <br>     sres = True<br>     sres@vpWidthF = 0.7<br>     sres@vpHeightF = 0.5<br>     sres@gsnDraw = True<br>     sres@gsnFrame = False<br>     sres@gsnXYBarChart = True<br>     sres@gsnXYBarChartBarWidth = 0.15           ; change bar widths<br>


     sres@tmXBMode          = &quot;Explicit&quot;         ; explicit labels<br>     sres@tmXBValues        = (/1,2,3,4,5,6,7,8,9,10,11,12/)<br>     sres@tmXBLabels = (/&quot;Jan&quot;,&quot;Feb&quot;,&quot;Mar&quot;,&quot;Apr&quot;,&quot;May&quot;,&quot;Jun&quot;,&quot;Jul&quot;,&quot;Aug&quot;,&quot;Sep&quot;,&quot;Oct&quot;,&quot;Nov&quot;,&quot;Dec&quot;/)<br>


     sres@tmXBLabelFontHeightF = 0.0205<br>     sres@tmXTLabelFontHeightF = 0.0205<br>     sres@tmYLLabelFontHeightF = 0.0225<br>     sres@tiMainFontHeightF = 0.025<br>     sres@tiMainFont = &quot;helvetica&quot;<br>     sres@tiMainString = &quot;All India Rainfall Climatology and Trend 1880-2012&quot;<br>


     sres@tiYAxisString = &quot;(mm)&quot;<br><br>     plot1 = gsn_csm_xy (wks,months,monthly_avg,sres)    <br>     sres@gsnXYBarChartColors = (/&quot;red&quot;/)                    ; seperately, not<br>     plot2 = gsn_csm_xy(wks,months,monthly_Trend,sres)                       ; advancing the frame<br>


     sres@gsnXYBarChartColors = (/&quot;blue&quot;/)                    ; but tweaking where<br>     <br><br>     ;*******************************************************<br><br></div>Can someone suggest what steps to take<span class="HOEnZb"><font color="#888888"><br>


</font></span></div><span class="HOEnZb"><font color="#888888">Ipshita<br></font></span></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Division, NCAR<br>

</font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div>

<span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div>
</div>
</div></div>
</div>