From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform graph plot colors

I am plotting multiple y-plots on one waveform graph. Up to 14 for now, and possibly more later. I use a white background, and still the program chooses white as a plot color somewhere around the 10th. If i change the color to black, save the program, exit and restart its white again. I really think LabVIEW should be smart enough not to draw a white line on a white background.
Currently using 7.1, because I installed 8.0 and lost 2 days of my life I will never get back.
Has anyone seen similar issues?

Thanks
Tom
0 Kudos
Message 1 of 12
(6,952 Views)

How are you changing the color of the white waveforms? I have tried to reproduce this problem in LabVIEW 7.1 but I haven't been able to. I right clicked on the plot name above the waveform graph and selected color. Saving the VI made the changes stick even after closing the VI or closing LabVIEW.

Could you provide any more information about your VI? I think we can work together to solve this issue.

Casey Weltzin, National Instruments

0 Kudos
Message 2 of 12
(6,938 Views)
I did it by right clicking on the graph and selecting properties, and changing it that way. I am just selecting black, which is the first waveform also. I save it and exit and upon resuming and rerunning that code it just reverts to being white. The VI is unbelievably complicated without any comments on it, but this graph problem happens on two of waveforms that are using more than 10 data points.
Question : Does LabVIEW not want you to use the same color twice?
 To me it really doesn't matter, and I could use the same color for all the graphs because I am comparing the 14 waveforms which all have a different to measurement and amplitude, so each one is seperated out where I want to see it.

I included an image. Between the numbers 1200 and 1300 there should be another peak. Actually it is there, it is just white.
0 Kudos
Message 3 of 12
(6,934 Views)
I have tried to reproduce your problem, but still with no success. I do, however, have a few ideas for resolving your issue. You can change the line color by right clicking on the plot number and selecting colors, or going in to the graph properties and selecting the plots tab then changing the individual plot color. You might also want to select operate, make current values default to ensure that the color changes stick.
 
You can also change the plot color within your program at runtime, which might be the safest way to know for sure that you will use the correct colors. To do this, right click on your graph and select create, property node. You can use the active plot and plot color properties to change colors programatically.
 
LabVIEW should not have a problem with two or more plots having the same color. I hope this information is useful.
 
Casey Weltzin
National Instruments
0 Kudos
Message 4 of 12
(6,927 Views)
I think i just figured out why this was happening thanks to you. I started the program and right clicked on properties. Without the graphs displayed, there were also no plots, so I assume that each time the graph reinitializes it just uses the standard color set. I am just going to fix the problem programatically the way you suggested. Thanks for your help. It isn't what I wanted to do though. I just don't ever want the program to use white! It should be something I don't have to worry about - thank you though.

Tom
0 Kudos
Message 5 of 12
(6,924 Views)
Using your detailed description from your last post I was finally able to reproduce your problem. There is actually a simple solution that should allow you to change the plot colors and have them "stick" without setting them programatically.
 
All that you need to do is drag the "plot 0" box on top of the waveform graph up until it displays the number of plots that you are using. Now if you change the color of any plot it will stay when you close and reopen the VI or LabVIEW.
 
Note that if you don't want to view the list of every plot you can hide the plot legend by right clicking on the graph and selecting visible items, plot legent.
 
I hope this takes care of your issue.
 
Casey Weltzin
National Instruments
0 Kudos
Message 6 of 12
(6,918 Views)
Thats a better solution.
Thank you very much!

Tom
0 Kudos
Message 7 of 12
(6,905 Views)

Hi Tom, I am trying to ploy multiple lines on a single waveform graph.  I saw that you had posted a plot with multiple lines and thought I would see if you could help. I have attached a piece of my code so you can see what I am talking about in this posting.  I understand that I have to cluster the data and feed the cluster to the graph.  However, all of the examples seem to use existing arrays of data.  I have three constants that I want to plot as horizontal lines and one value that is read from a Fieldpoint controller input.  I have bundled the four inputs but the resulting cluster is not accepted by the graph.  Can you provide some incite here?

Thanks
Scott

0 Kudos
Message 8 of 12
(6,752 Views)

Graphs take arrays (and waveforms etc.).

Maybe you want to feed your cluster to a waveform chart in a loop? Open the example finer and e.g. look for "Charts.vi" for some ideas.

0 Kudos
Message 9 of 12
(6,748 Views)
Thanks for the help, I found what I needed.  Do you know if you can display the grid lines with the waveform chart?

Thanks
Scott
0 Kudos
Message 10 of 12
(6,744 Views)