10-03-2019 08:33 AM
Hi, I have a program that plots a spectrum with wavelength on the x-axis. I would like to have the corresponding color displayed as the background. But it should also scale with the x-axis as this can change, so a simple image won't do. Is there a way to create a scalable background?
I have attached an image that shows roughly what I want.
In this topic they show some screenshots, but not how to actually program it. Could I somehow create an array of colors and then plot that array as colors? I'm not sure if that is possible.
Solved! Go to Solution.
10-03-2019 10:34 AM
You can put intensity graph (it has color table property to match values and colors) under transparent data graph, then synchronise scales
Or you can use Plot Images Back property of your data graph and adjust image every time scale changes.
10-04-2019 04:50 AM
The intensity graph under the other graph did the trick, great idea. Thanks very much!
10-07-2019 09:30 AM - edited 10-07-2019 09:33 AM
Also works, might be easier in some cases
When number of digits on Y scale changes and affects graph width.
Or if you need to shift/scale, you need to adjust one graph, not 2.
30 ms 1500x400 picture
PS LV 2011 breaks reference and property node connections on the snippet
PPS. Extremely slow (and slowing down) when trying to edit image from property node. VI time changes from 300 ms to 1.5 s in 20 seconds of running continuously.
10-07-2019 09:49 AM
@Alexander_Sobolev wrote:
Also works, might be easier in some cases
When number of digits on Y scale changes and affects graph width.
Or if you need to shift/scale, you need to adjust one graph, not 2.
30 ms 1500x400 picture
PS LV 2011 breaks reference and property node connections on the snippet
PPS. Extremely slow (and slowing down) when trying to edit image from property node. VI time changes from 300 ms to 1.5 s in 20 seconds of running continuously.
Some thought that may help out...
1)
Advanced >>> Auto Adjust Scales (disable)
2)
Before updating the PlotImage.Back
DeferFPUpdat = T
Graph Visable = F
Apply the update
Then undo the Graph visable and then the DeferFPUpdat
The first inhibits the scale adjust.
The second lets LV update the image and skip the display updates until all changes applied.
Not usre if any will help but it may be worth a try.
Ben