LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
altenbach

Allow axis swap for Waveform charts/graphs and intensity charts (and possibly others).

Status: New

In the current implementation, charts increment along the x-axis and waveform graphs have the array index linked to the x-axis. The y axis is graphing the values.

 

There are many scenarios where this axis association should be swapped. However, we cannot do it without resorting to xy-graphs and jumping through flaming hoops, significantly complicating the data structures.

 

I propose a right-click option "swap axes" which would have the following effect, depending on the object:

 

Charts (waveform, intensity) would have the y-axis labeled "time" (by default), there would be an optional vertical scroll bar, and the data would run up (or down) with time (instead of left or right). Everything else would stay the same, same datatypes, data structures, same definition of chart history, etc.

 

Waveform graphs would have the y-axis tied to the array index of the data, while the value is tied to the x-axis.

 

Often, we want the data simplicity of a waveform graph, but swapped axes. One (of many) example application would be an intensity graph with a cursor flanked by a narrow vertical graph on the right and a narrow horizontal graph below (See image). These two additional graphs are used here to interactively show the intensity profile along the cursor lines.

 

 

Currently, it is not possible to use a waveform graph for the graph on the right. We need to use an xy-graph and do some data gymnastics. With this idea implemented, we could use a plain waveform graph with swapped axes and simply graph a plain 1D array sliced out with "index array". Wouldn't that be great?! 😄

 

Similarly, we could also allow this for xy graphs where it is not as important, but would simply swap the way the data is displayed (e.g. the imaginary part along X for complex data). This could be useful too.

 

The ability to swap axes should probably only be available at edit time...

 

 

 

 

 

 

Message Edited by altenbach on 06-24-2009 04:49 PM
6 Comments
waldemar.hersacher
Active Participant

For having more flexibility shouldn't we have instead of swap axes the posibility to rotate Clockwise/Counterclockwise by 90/180 degrees.

 

How would the scale value and labels be displayed?

Should we rotate them with the diagram or keep them standing as normal?  When rotating by 180 degrees they will fall on their head.

Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
altenbach
Knight of NI

rotation is something different.

 

> How would the scale value and labels be displayed?

 

From a user perspective, things would basically look identical to the current graphs. Visually, there will be no difference. With xy graphs we can simply swap the data wires for x and y, and this is no different. Waveform graphs always graph an array of y-values, while x (the horizontal axis) is implicitely tied to the array index (possibly scaled by offset and multiplier). A swap would just mean that if we graph an array with the axes swapped, the values will get assigned to the horizontal x axis, while the array index is tied to the vertical y axis. This is all the flexibility we need.

 

Everything else will remain the same, e.g. we still can invert an axis so it runs the other way. Since each axis can be inverted individually, the addition of "Swap" as in this idea will allow all possible transformations.

SteveP
Active Participant

Profile readout of cursor data on 2D images is a nice analysis feature.  How about having the X and Y profile 1-D line plots be an inherent feature of 2D intensity charts and graphs ?  R-Click > Show X profile.  That way one could resize the 2D plot and have the profile plot area positions remain lined up with it.  I will submit this as a separate Idea.

 

Mac671
Active Participant

I Second that.

The ability to use the chart top to bottom as opposed to left from right would be very usefull.

 

I've tried to realize this feature myself using the Graph and stacking up memory in the background.... but since LV controls take a copy of data for front panel and the block diagram and the wire ... for large data sets using the graph as a chart becomes a pain ... and is not suited for real time use.

 

Maciej


QFang
Active Participant

@altenbach wrote:

...

 

The ability to swap axes should probably only be available at edit time... 

 

Message Edited by altenbach on 06-24-2009 04:49 PM

I voted for this idea, HOWEVER, I STRONGLY dissagree with this last statement.  Why would you limit this to edit time only?

I just had a customer request that they have the option, at run-time, to swap between horizontal display and vertical display, and when vertical, the x-axis should be along the top instead of the bottom and the (new) y-axis should be inverted.

I see NO user driven reason to limit this feature to edit time only, and depending on how the background code is, I don't necessarily see why it would complicate the backend code for NI all that much either.

 

It's already bad enough that you can't "swap sides" on an axis at run time, like you can during edit time, so instead I have to duplicate and move one axis at edit time, then use code to juggle which one is displayed when, and if I do any sort of custom scaling, I further need to either apply it to both (all) duplicate axes or I have to cary an extra index value around to know which one is currently active.

graph/chart axis "swap-side" at run-time

QFang
-------------
CLD LabVIEW 7.1 to 2016
GregSands
Active Participant

I kudoed this (first!) on the day it was posted, and keep revisiting the same issue regularly, most recently today, 9 years later.  Of all the ideas here, this seems to be one of the more useful, certainly more so than the minor tweaks that have been picked up - it's exactly the sort of idea that the Idea Exchange should uncover.

 

Further I would suggest that graphing overall in LabVIEW has fallen well behind what's available elsewhere - it was possibly state-of-the-art when introduced, but hasn't seemed to have changed substantially since.  I just checked NXG 2.0, and it still seems to be pretty much identical, and that's a little disappointing.