06-01-2016 12:17 AM
I have used an intensity graph to display frequency vs time.
What i would like to do is change the direction of the updates. Currently Frequency is on the y axis, time is on the x axis, and new values are added on the right.
I would like to have Frequency on the x-axis, and Time on the y-axis. Not really fussy as to whether the graph flows down or up, but I would like to flip the axes
Is this possible? It should be quite simple to implement but I havent been able to find a way to do it
Solved! Go to Solution.
06-01-2016 12:20 PM
Hi benny,
in your topic line you mention an "intensity chart", while in the message text you write "intensity graph". What exactly are you using?
(Attaching a VI or snippet would be so much better than just attaching images…)
With a chart you cannot flip axis as you intend to do.
With a graph it is possible by reorganizing the array data you supply to the graph!
06-01-2016 12:39 PM
Could you use a Property Node implicitly linked to the Chart or Graph and write True to the property of "Transpose Array"..
Give that a try..
06-01-2016 12:52 PM
06-01-2016 03:11 PM
I'm not sure I can find it, now, but there was a Blog article that discussed using Graphs instead of Charts, particularly if update rates were slow (like 10 Hz or lower), the notion being you have a circular buffer, add points in one at a time, and plot the entire buffer (either "unrolled", making a scrolling "chart", or in place, making a "sweep chart"). If you are going to do that, then sure, transpose the array before plotting it, and you've interchanged the X and Y axes.
Bob Schor
06-01-2016 07:09 PM
Apologies GerdW, I am using an intensity chart. So the answer seems to be that it is not possible.
In response to the suggestion to transpose the array - that does not work as it still updates along the x axis.
It seems ridiculous that you cant do something as simple as rotate a control (or flip the axes) Especially when, after doing a bit of a search, found that people have been asking for at least 5 years
I am a fan of LabVIEW but something as simple as this going unimplemented is unacceptable in my opinion. It makes me frustrated with the whole LabVIEW environment.
I hope there is a very good reason for not doing this that I am not seeing.
06-01-2016 07:11 PM
Bob_Schor any chance you have a link to this blog handy?
The update rates dont need to be terribly high - In fact I want to slow them down from the current rate and provide some sort of integration (averaging)
06-01-2016 11:29 PM
You are in luck: http://culverson.com/tips-and-tricks/ . I've played with this a bit, and I really like it -- I've gotten some impressive "Chart-like" responses at multiple time bases, multiple selectable channels, while taking (simulated) 4-channels of data at 500 Hz (the original spec called for 4 channels at 50 Hz for up to several hours, but when you run it 10 times faster, you don't have to wait as long to see some of the longer time axes become effective ...).
Bob Schor
06-02-2016 12:36 AM
Thanks for your reply bob - fortunately I ended up implementing the solution myself anyway.
Surprisingly it wasnt that painful - which actually makes me even more annoyed that this isnt a standard feature of LabVIEW by now
I found this from way back in 2006 and used it as my starting point
http://www.ni.com/example/25994/en/
My code is attached.
It allows for the graph to be reset in real time, and to change the amount of history displayed (currently this also clears the graph but it would be straightfoward to change this and keep the data there)
Hope this helps someone!
06-02-2016 03:33 AM
Hi Benny,
which actually makes me even more annoyed that this isnt a standard feature of LabVIEW by now
A chart always displays data along the x axis - why should NI change this behaviour?
With a graph the programmer has (more or less) full control over the displayed data so it's your task to decide which direction you want to take! (And again NI doesn't need to change anything.)