LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to find the X and Y data from the PlotScaledIntensity Plot?

Hello,

I am trying to access the X and Y data from the PlotScaledIntensity plot. I figured that I could use the GetPlotAttribute() function to get to the ZData of a Scaled intensity plot but I could not find a way to access the X and Y data. Can anybody help me on this issue.

regards,

Dwivedi
0 Kudos
Message 1 of 4
(3,557 Views)
Dwivedi,

Have you tried using the ATTR_PLOT_XDATA and ATTR_PLOT_YDATA attributes yet?

Luis
NI
0 Kudos
Message 2 of 4
(3,554 Views)
Luis,

I tried ATTR_PLOT_XDATA and ATTR_PLOT_YDATA, but found that these attributes work only for plot types X, and XY and not for PlotScaledIntensity.
Any other suggestions??

regards,

Dwivedi
0 Kudos
Message 3 of 4
(3,542 Views)
Of course, you're right. I don't know what I was thinking...

Anyway, the reason XDATA and YDATA don't work for intensity plots, is the same reason why XDATA doesn't work for PlotY and YDATA doesn't work for PlotX. It's because in those cases, the x data and y data are only indices, not actual array data passed in to the function.

For the PlotIntensity function, you can simply assume that:

x[i] = i
y[i] = i

For the PlotScaledIntensity function, it's a little more complicated, but not much:

x[i] = xGain * i + xOffset
y[i] = yGain * i + yOffset

That is why there are no attributes to obtain the x and y data. You can use these formulas instead.

Luis
0 Kudos
Message 4 of 4
(3,537 Views)