comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: IDL Strip Chart
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL Strip Chart [message #40906 is a reply to message #40905] Thu, 09 September 2004 11:02 Go to previous messageGo to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
<pestMay@gmail.com> wrote in message news:MIO%c.17702$iS.1208@newssvr29.news.prodigy.com...
> For anyone involved in real-time data collection (e.g., atmospheric data,
> heart-rate,
> other physiological data) display this data as it arrives, say on a serial
> port, is essential
> in monitoring the data stream.
>
> There are many commercial hardware/software solutions (e.g., BIO-PAC) and an
> IDL
> competitor, MATLAB, has one. The X-axis is always time, and often there are
> a number of
> channels of data that might include an event marker (e.g., we just launched
> the weather sound,
> a subject in an experiment pressed a button, etc.).
>
> Ed May


I had a few minutes to kill before a meeting, so here is a quicky strip chart
in direct graphics. It is not the most efficient thing ever, but it will give you
a starting point.

Cheers,
bob




xr = [0,100]
yr=[-4,4]

plot,fltarr(1),xr=xr,yr=yr

timeincrement = 1 ; the sample interval
datacounter = 0

datatime = !values.f_nan
data = !values.f_nan



for i = 0,1000 do begin
; make measurement
newdata = (randomn(seed,1))[0]
datatime = [datatime,i]
data = [data,newdata]
datacounter = datacounter+1

if datacounter gt 50 then begin
;shift the axis
xr = xr + timeincrement

;redraw data
plot,datatime,data,xr=xr,yr=yr,psym=-4

endif else begin
if i gt 0 then begin
plots,datatime[datacounter],data[datacounter],psym=-4,/data, /continue
endif else begin
plots,datatime[datacounter],data[datacounter],psym=4,/data
endelse
endelse
wait,0.1

endfor


end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: CALL_EXTERNAL... unresolved?
Next Topic: Re: CALL_EXTERNAL... unresolved?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 10:15:25 PDT 2025

Total time taken to generate the page: 0.48041 seconds