LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to display both wavelength and wavenumbers on same xy graph?

Hello all,

 

Is there someway to mathematically manipulate an axis to create an identical axis but in a different unit?  What I am trying to do is display spectral data from an FTIR and I'd like to show the wavelength in both wavenumbers and microns.  So one X-axis would be in wavenumbers and another in microns.

 

Thanks for your help in advance....

 

Jay 

0 Kudos
Message 1 of 6
(4,886 Views)

You can right click on the X axis and select Duplicate Scale.  You can modify the scale to that the beginning and end will match your other x scale with whatever factors you need.

 

I think if you used the event for the graph's ScaleRange Change, you could detect when one X scale changes and programmatically change the other X scale to match by way of the graph's property nodes.

0 Kudos
Message 2 of 6
(4,872 Views)
Thanks for responding....the issue is that a simple linear spacing of the scale endpoint does not work in this case.  To convert wavenumbers to wavelength (in microns) one needs to convert to wavenumbers by the following: wavelength= 10,000/wavenumber.  For example  1000 wavenumbers corresponds to 10 microns and 2000 wavenumbers corrsponds to 5 microns and 3000 wavenumbers corresponds to 3.33 microns.   So a simple linear spacing of the max and min x-axis yields the wrong answer.  What is needed is a way to recalculate the x-axis (wavenumbers) into microns.   
0 Kudos
Message 3 of 6
(4,847 Views)

You can use an picture indicator and do all drawing manually. have a look at some of the examples in the example finder for ideas (e.g. "XY Multi Plot.vi").

 

In the long run you might want to support two of my ideas that would allow doing what you want directly:

 

 

Once we have all this, you can set the markers wherever you want, and give it arbitrary marker text, e.g. containing the numbers in the "other" units.

Message Edited by altenbach on 12-03-2009 07:08 AM
0 Kudos
Message 4 of 6
(4,838 Views)
Interesting ideas but this won't work if one zooms  a plot to focus on a specific segment.  There has got to be some way to mathematically transform once axis based on the value of another besides simple offset and multipliers.
0 Kudos
Message 5 of 6
(4,827 Views)

Radman wrote:
Interesting ideas but this won't work if one zooms  a plot to focus on a specific segment.  There has got to be some way to mathematically transform once axis based on the value of another besides simple offset and multipliers.

 Of course the axes would need to be recalculated when the graph is zoomed.

 

We currently only have two mappings: Linear and log. It would be great to have more options, as well as an option to define a formula for a custom mapping to relate the displayed number to the underlying value. I'll post an idea....

 

Message Edited by altenbach on 12-03-2009 08:07 AM
0 Kudos
Message 6 of 6
(4,825 Views)