<div dir="ltr"><div>Hi, <br></div><div><br></div><div>One possibility would be to load the shorter 5th array's data into an array the same size as the rest, but set the first twelve values (862-850 to missing values; that is @_FillValue</div><div><br></div><div>as demonstrated by the script below:</div><div><br></div><div>Rick</div><div><br></div><div><br></div><div>; ***********************************************<br>; xy_1.ncl<br>;<br>; Concepts illustrated:<br>; - Drawing a black-and-white XY plot<br>;<br>;************************************************<br>; These files are loaded by default in NCL V6.2.0 and newer<br>; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br>;************************************************<br>begin<br>;************************************************<br>; read in data<br>;************************************************<br> f = addfile ("$NCARG_ROOT/lib/ncarg/data/cdf/<a href="http://uv300.nc">uv300.nc</a>","r")<br> u = f->U ; get u data<br>;************************************************<br>; plotting parameters<br>;************************************************<br> wks = gsn_open_wks ("x11","xy") ; send graphics to PNG file<br><br> res = True ; plot mods desired<br> res@tiMainString = "Basic XY plot" ; add title<br><br> plot = gsn_csm_xy (wks,u&lat,u(0,:,{82}),res) ; create plot<br><br> u(0,0:15,{82}) = u@_FillValue<br> plot = gsn_csm_xy (wks,u&lat,u(0,:,{82}),res) ; create plot<br>end</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 30, 2019 at 8:36 AM S Br <<a href="mailto:sbr.climate@gmail.com">sbr.climate@gmail.com</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">Hi All,<div>I am doing a multi-line plot with 5 different sets of data. All my data has annual mean values.</div><div>4 sets of data extends for the period 850-2005, where as the 1 sets of data extends for the period 862-2005. </div><div>In the line plot, the first 4 sets of data should start at year 850, where the 5th line should start at year 862. I am doing following things but all line starts from year 850.</div><div>Could you please suggest how to start first 4 lines from 850 and the 5th line from year 862.</div><div><br></div><div> temp1 = f1->tos(:,0,0)<br> printVarSummary (temp1)<br> temp2 = f2->tos(:,0,0)<br> temp3 = f3->tos(:,0,0)<br> temp4 = f4->tos(:,0,0)<br> temp5 = f5->tos(:,0,0)<br></div><div><br></div><div> time = ispan(850,2005,1)<br> time@long_name = "Time"<br></div><div><br></div><div> data = new((/5,1156/),float)<br></div><div> data(0,0:1155) = temp1<br> data(1,0:1155) = temp2<br> data(2,0:1155) = temp3<br> data(3,0:1155) = temp4<br> data(4,0:1138) = temp5<br></div><div><br></div><div>wks = gsn_open_wks("X11", "Multiline_NCL")<br></div><div><br></div><div>res = True<br> res@xyXStyle = "Time"<br></div><div><br></div><div>;-- create plot<br> plot = gsn_csm_xy(wks,time,data,res)<br></div><div><br></div><div>Thank you.</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><br>
</blockquote></div>