jfazekas Posted May 1, 2008 Report Share Posted May 1, 2008 Perhaps this is trivial, but it simplified a design for me. I needed a graph with two plots to update every 100 msec forever (history of last 1000 points). The user wanted the plot colors to change for sections of the plot to indicate some system information. My previous design used FIFO arrays and a waveform graph to display the plots as separate waveforms. The attached pictures should help clarify. Today I stumbled onto a much easier method using a waveform chart. Using a 'NaN' constant as a place-holder for the secondary plot color the same user interface requirements were satisfied. Wish I had thought of this before. Quote Link to comment
Neville D Posted May 1, 2008 Report Share Posted May 1, 2008 I seem to remember there is an example showing varying plot colors by value in the LV examples. Neville. Quote Link to comment
crelf Posted May 1, 2008 Report Share Posted May 1, 2008 QUOTE (jfazekas @ Apr 30 2008, 11:29 AM) Using a 'NaN' constant as a place-holder for the secondary plot color the same user interface requirements were satisfied. Yep: NaN = Don't plot. Quote Link to comment
David Boyd Posted May 1, 2008 Report Share Posted May 1, 2008 Another trick I've used is to run a second plot which gets the value 'NaN' until I want to mark an event in the plotting. I then plot a point at -Inf, followed by +Inf, then return to plotting NaN. This guarantees a vertical line draw that does not affect autoscaling behaviors (nor is it affected by scale changes). The visual effect is to have a hairline vertical marker appear over/under the other trace(s) in the chart at the sample of interest. Dave Quote Link to comment
MikaelH Posted May 2, 2008 Report Share Posted May 2, 2008 What I'm missing in LabVIEW is the ability you get in .net using Measurement Studio. Where you can override any calls to the Graph, e.g. When a plot point gets drawn you can check for some criteria and just change the color or shape of the point. --Mike Quote Link to comment
crelf Posted May 2, 2008 Report Share Posted May 2, 2008 QUOTE (David Boyd @ Apr 30 2008, 06:22 PM) Another trick I've used is to run a second plot which gets the value 'NaN' until I want to mark an event in the plotting. I then plot a point at -Inf, followed by +Inf, then return to plotting NaN. Oh - that's purdy! :thumbup: Quote Link to comment
jfazekas Posted May 2, 2008 Author Report Share Posted May 2, 2008 QUOTE (David Boyd @ Apr 30 2008, 06:22 PM) Another trick I've used is to run a second plot which gets the value 'NaN' until I want to mark an event in the plotting. I then plot a point at -Inf, followed by +Inf, then return to plotting NaN. This guarantees a vertical line draw that does not affect autoscaling behaviors (nor is it affected by scale changes). The visual effect is to have a hairline vertical marker appear over/under the other trace(s) in the chart at the sample of interest.Dave Dave, while you were plotting -Inf and +Inf on the second plot, what did you do with the first plot? Didn't this mess up the timescale for the first plot data? Quote Link to comment
LAVA 1.0 Content Posted May 3, 2008 Report Share Posted May 3, 2008 QUOTE (jfazekas @ May 1 2008, 01:58 PM) Dave, while you were plotting -Inf and +Inf on the second plot, what did you do with the first plot? Didn't this mess up the timescale for the first plot data? If you use Waveform data types, the "t0" of the waveform dicatate the value on the X-Axis. Ben Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.