06-24-2024 08:35 AM
Hello,
I'm plotting temperature sensor DAQ measurements, and I want to change the color (red, blue, yellow) of part of the plot based on button selections (heating, cooling, pumping). I wrote a program, but the problem is that it changes the color of the entire plot.
Is there a solution for this?
Thanks.
Solved! Go to Solution.
06-24-2024 09:14 AM
Hello,
unfortunately LabVIEW graphs don't support multicolored plots (I think due to performance reasons).
You can use three plots with different colors, putting your valid data point into the according plot. The other plots are to be set with NaN, this makes them invisible.
See the attached VI.
06-24-2024 09:15 AM
A technique I have seen is to have a plot per coloring to disable the use of the value NaN.
For example, if you need to have a plot where 0-10s is heating, then 10-12s is pumping and 12-14s is cooling, populate the waveform with valid values only for the segment it needs to be displayed and the rest be NaN.
06-24-2024 12:31 PM
Thank you for the response, but I cannot open the file. Error: The file version is later than the current LabVIEW version.
06-24-2024 12:35 PM
Here is daveTW's VI attached in LV 2015
06-24-2024 12:36 PM - edited 06-24-2024 12:37 PM
Thank you for the response, I understood the technique, but I had some issues with the condition of the buttons and manipulating the DAQ Assistant signal.
06-25-2024 02:51 AM
Thank you for the response, I understood the technique, but I had some issues, i dont know how to link buttons state with changing color conditions.
06-25-2024 02:55 AM
Please explain in detail what you want to achieve with the buttons. This keeps us from guessing around.
Draw an image!
06-25-2024 03:22 AM - edited 06-25-2024 03:25 AM
I'm going to control a pump, a heater, and a cooler using three buttons in the user interface. I also have a temperature sensor, and I want to show the three phases in a graph by coloring the curve. If the pump is activated, the curve should be colored yellow; if the heater is activated, the color should be red; and if the cooler is activated, the curve should be blue. I have attached the VI below.
06-25-2024 03:26 AM
Hi Mehdi,
@MEHDI_LIS wrote:
I want to show the three phases in a graph by coloring the curve. If the pump is activated, the curve should be colored yellow; if the heater is activated, the color should be red; and if the cooler is activated, the curve should be blue.
So instead of using InRangeAndCoerce to decide which plot to use you will use those 3 buttons to decide which plot will show the current sample: you just need to change that decision making in your VI…