LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to force plot colors in waveform graph?

Solved!
Go to solution

Hi,

 

I have a problem forcing my WaveformGraphs to have specific plot colors. I changed the properties many times: It comes back to another color when I restart. I tried the property node Plot Color with Active Plot : it says it cannot work (maybe I didn't do it well). I made the graphs type defs, changed their properties, made it their default value and then saved them. I need the 3 graphs to have the same plot colors because they're linked. 

 

Do you have any advice for me?

0 Kudos
Message 1 of 7
(4,615 Views)

The property node is the way to do this.  "It cannot work" is not sufficient information for anyone to help you.  Describe the error better or post your code.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 2 of 7
(4,601 Views)

You're right I wasn't precise. 

 

It seems to be working only for the first plot. I took a printscreen of the error window for everybody to see what it is:

 

Error_Property_Node_Color.jpg

 

Do I have to put the name of the plot as an input? If yes, then why does the first plot change its color& As an input to plot color I put a color box and as an input for the active plot I put the i of the for loop in which data is treated.

0 Kudos
Message 3 of 7
(4,596 Views)
Solution
Accepted by topic author Langelier

Here's a way to do it. This will set the first 4 plot colors in each graph.

(Get your graph references and put them into an array for the input.)

 

graph colors.png

steve

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
Message 4 of 7
(4,583 Views)

Sorry if it took that long for me to answer I was on vacation. I tried this way and it works, but I had the error code 1055: "Error 1055 occurred at Property Node in ...   Possible reason(s):  LabVIEW object reference is invalid." 

 

I ignore the error and the result is good, maybe I should have done that way earlier. 

 

Thank you

0 Kudos
Message 5 of 7
(4,533 Views)

Glad to help!

 

It sounds like your array of references contains an invalid entry.

 

Here's a way to create the array of references:

create ref array.png

 

To create the references - Right click in a graph terminal (or indicator) and select Create -> Reference.

 

steve

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 6 of 7
(4,516 Views)

Thank you again for your help. This is how I did it and the error showed up. It works now even if I get the error message so I should not need to change it, even if this is not preferable to do such things. 

0 Kudos
Message 7 of 7
(4,507 Views)