As suggested by Verica .... polymarkers: something like
res_at_xyMarkLineModes = "Markers" ; choose which have markers
res_at_xyMarkers = 16 ; choose type of marker
res_at_xyMarkerColor = "red" ; Marker color
---- If you prefer connected lines, perhaps the following will work. Let "time" and "y" by the original variables. The following assumes that the time steps are exactly 30 sec apart. ntim = dimsizes(time) tStrt = time(0) tLast = time(ntim-1) ; or could be specified dt = 1800 ; seconds (30 min) NTIM = (tLast-tStrt)/dt + 1 TIME = fspan(tStrt, tLast, NTIM) Y = new ( NTIM, typeof(y) ) ; set to default _FillValue do n=0,NTIM-1 i = ind(time.eq.TIME(n)) if (.not.ismissing(i)) then Y(n) = y(i) end if ;delete(i) ; not necessary here end do plt = gsn_xy(wks, TIME, Y, res) good luck On Wed, 10 Jan 2007, Verica Savic-Jovcic wrote: > Hi James, > > Why don't you just plot in Markers mode instead of Line mode? > > Verica > > ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ > http://www.atmos.ucla.edu/~verica/ > > ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ > "The art of being wise is the art of knowing what to overlook." > William James > > > On Jan 10, 2007, at 4:59 PM, James McPhee wrote: > > >Hi All, > >I'm trying to plot a time series with data gaps. This is I have something > >like > > > >X!0="time" > >X&time=stamp > >stamp_at_units="seconds since 1-1-1970 00:00:0.0" > > > >Most of the data is taken every 30 min, but some times are not available. The > >unavailable times do not correspond to _FillValue values; instead, the time > >corrdinate just doesn't include those time stamps. Therefore, if I use > >gsn_csm_xy to plot the data, a straight line joins the last point before a > >gap and the first point after the gap. I'd like the plot to actually show the > >gap, for which I imagine I would have to somehow *insert* the missing time > >stamps and corresponding _FillValue values into the time series. Is there an > >efficient way to do this in NCL without going through a loop? can I avoid > >inserting the missing time stamps at all and still have the desired effect on > >the plot? > > > >Thanks much! > > > >James > > > >James McPhee > >Profesor Asistente, Departamento de Ingenieria Civil > >Facultad de Ciencias Fisicas y Matematicas, Universidad de Chile > >Av. Blanco Encalada 2002 piso 3 > >Santiago, Chile > >tel: +56-2-9784400 > >jmcphee_at_ing.uchile.cl > >http://www.cec.uchile.cl/~jmcphee > > > > > > > >_______________________________________________ > >ncl-talk mailing list > >ncl-talk_at_ucar.edu > >http://mailman.ucar.edu/mailman/listinfo/ncl-talk > > _______________________________________________ > ncl-talk mailing list > ncl-talk_at_ucar.edu > http://mailman.ucar.edu/mailman/listinfo/ncl-talk > _______________________________________________ ncl-talk mailing list ncl-talk_at_ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Thu Jan 11 2007 - 09:00:34 MST
This archive was generated by hypermail 2.2.0 : Thu Jan 11 2007 - 10:16:54 MST