Plot colors

Hello everyone,
I need some help on something that Im trying to figure out.
I need to plot on a waveform graph different points but I need to change the color by groups of 16.
Lets say that I have  304 points and I need to plot it every 16 points with a different color.
If anyone have a clue or an example just let me know ...
Thanks a lot !!

very crude example is attached.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Attachments:
Crude multicolor plot.vi ‏19 KB

Similar Messages

  • Xy graph plot color

    Hi!
    I have a XY Graph with 2 plots. For screen displey I have the Graph with black background color. But for printing I set the BG-color to white and the Plot colors to black.
    Before changing the Plot colors I save the colors with a property node (setting active plot and reading plot color). After printing I try to restore the colors (same way, by setting active plot and writing plot color).
    My problem is that the colors get only restored if I have set them manualy before. Otherwise the value gets saved but not restored and the plots stay black...
    Anyone knows why this happens?
    thanks
    hmann

    There's a number of things that could be going wrong here - could you please post your VI so we can have a closer look?
    Copyright © 2004-2015 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.

  • Predefine plot color palette

    Has anyone found a way to change the set of colors used by Labview to color plots in a waveform or xy graph?  By default the color sequence is white, red, green, blue, yellow, purple, orange...  I'm working on a waveform graph that plots a sequence of waveforms collected by daqmx.  The user can select which signals to measure and plot - e.g voltage, current, light intensity.  The user also defines a test sequence where they would like to watch the response of the DUT at each segment of the sequence. 
    Based on other posts on this forum, I've figured out how to toggle between two plots in an xy graph to get the colors, but it seems like it should be much easier and more efficient to just change the preset colors that will be used by the waveform graph.   Why not just set the palette to something like red, white, red, white... and let the graph do its thing?
    Any ideas?
    Solved!
    Go to Solution.

    Hi Matthew,
    I've gotten this method to work with an xy plot (I can't use waveforms since my dt is a user variable).   Its much more processor efficient than using property nodes but I'm bothered by the 2x increase in memory.  So far this is the best solution, but I can't help thinking that if I could change the color set that the graph pulls from when plotting, then I could just set the colors I want and let the plot do all the work.  When you create a plot indicator on a vi front panel and look at the plot legend, the color set is always the same - where does it come from?  Maybe an ini file somewhere?
    It just occurred to me - when you modify a plot, like change the axes or plot colors, where are the changes saved?  They are persistent, even when the vi is compiled.  So in theory, it should be possible to do programmatically before I start filling the plot with data.
    Message Edited by gharris on 12-22-2008 09:32 AM

  • Constraining the algorithm for assignment of multiple plot colors

    I would like to know if there is some way to modify the algorithm that
    LabVIEW uses to automatically assign different colors when a graph
    displays multiple plots. In particular, given the default background
    color (black), it appears that black is never used for a plot color.
    However, if I programmatically change the background color to white,
    for example, I would like the plot color assignment to not use white. I
    would also like to know if it is possible to constrain the plot color
    assignment to a single color a priori, without having to go back and
    explicitly assign the colors of each plot via the property node in a
    loop.
    Thanks.
    Lyle

    I think you will have to create your own plot color assignment function to do this.
    You can set the color of each plot by using the active plot property (index of the plot you want to change) and then set the plot color property (just expand one and the same property ndoe to set both at the same time).
    You can then make that function check the background color and choose a color table that fits. If this is in a built application you would run this function when a color change is detected, if it's in the development environment you need this feature make the function ask for a VI and plot name (so that it can get a reference to the plot) and put it in your projects folder. That way whenever you need to set the plot colors differently you just select this function from the Tools menu of LabVIEW. An easier alternative though would be to just create the different graphs you need (with the colors for all plots already defined correctly for that background etc.) and save them as custom indicators...
    MTO

  • Keeping plot colors with the right data

    I have a vi written in 7.1 that has three traces in one plot.  I have selector radio buttons so the user can turn on or off any channel.  The problem is the color of the trace is automatically grabbed by the vi and chooses the colors based on which trace is turned on first, second and third.  So, if the user turns off all of the channels and then turns them on one at a time, from top to bottom, they are correct, green, blue, and then red.  But, if they turn them on from the bottom first, then the first and third traces no longer follow the plot color legend.  Basically, I want to know how to lock a plot color to a given channel.
    Regards,
    Ron
    Solved!
    Go to Solution.

    I can't vouch for 7.1, but you are looking at plot.color property node similar to the one in this example. http://digital.ni.com/public.nsf/allkb/C6BFD9BD5F0​1108C86256F8100638B29
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • Chart Plot Color change programatically

    Hi, 
    May i know that for the graph plot in labview web ui design, can i change the plot color programatically ?

    Hi Ceties,
    There is Corrective Action Request:
    CAR#36683
    Though this is a bug and yet not solved, I prepared an example for you which show possible workaround - it is based on the fact, that the redrawing works correctly when you resize legend. Because this is not possible to do programmatically at ru-time for staced plots, this example uses SubPanel which display SubVI with only waveform chart. I know this is not convenient, but I guess you could use such a approach in order to improve yours customers' experience.
    With kind regards,
    Martin Stefik
    Application Engineer,
    Czech Republic and Slovakia
    Attachments:
    Example.zip ‏22 KB

  • Plot.Plot Color Bug?

    I am puzzled about this. Check out the two almost identical VIs attached. Run the first one and try to change the Plot Color. The color property changes based on the color value. Do the same with the second VI (PlotColorWrong.vi). Try to change the color of the plot - it does not change!
    Am I doing something wrong or is this a LV bug?
    LV2009, SP1, Windows XP.
    Solved!
    Go to Solution.
    Attachments:
    PlotColorCorrect.vi ‏36 KB
    PlotColorWrong.vi ‏37 KB

    you would use a FOR loop, e.g. as follows:
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    GetPlotColors.PNG ‏4 KB

  • Plot colors mismatched with legend

    Does any happen to know why colors on a graph would not match the colors indicated in the legend?
    I am trying to use a property node to set the color and name for each set of data which is displayed. The colors and names are displayed properly in the legend, but the color of the plot itself does not follow.
    Attachments:
    View_Collected_Data.vi ‏132 KB
    data.txt ‏6 KB

    The loop knows how many times to go due to a feature of LV called auto-indexing. If you pass in an array and let it autoindex on the boarder, the loop will automatically pull out the next value in the array with each iteration--AND set the number of time to loop before stopping. Compared to the hoops C makes you jump through to use arrays, this is indeed Very Cool...
    Note that if you wire both the N terminal on a FOR loop, and autoindex an incoming array, the loop will iterate the smaller of the two sizes. For example, if you wire 5 to N and pass in an array with three elements, the loop will only go three times.
    Finally, always remember that a FOR loop can iterate zero times. In that case any outputs coming directly from the loop will be
    the default value for the datatype. Arrays will be empty, numbers will be zero'd and (this is a biggie) references numbers will be invalid(!).
    In the case of your code, I modified the logic such that it generates an array of indexes that has one element for each signal selected. This array drives the loop that sets the plot properties. Note that if the operator selects more than 5 signals the higher-numbered plots will be undefined in terms of color and label because you only specify 5 colors in an array. (Input an array of 10 items and an array of 5 items and the loop only goes 5 times.)
    Note that, although it's not used here, auto indexing also works with outputs. In that case though, the loop will automatically collect an array of the output values--one element per iteration.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Any alternate solution to using Waveform Chart Property Nodes 'ActPlot', 'Plot.Visible' for mulit-plot color problem on PDA?

    Hello,
        On a waveform chart, 4 signals need to be plotted based on the status of 4 boolean inputs. Eg. if the first boolean input is true, the first signal needs
    to be visible on the waveform chart; if the first boolean input is false, the first signal should not be visible on the waveform chart and so on. This can be
    done on LabVIEW desktop using the Waveform Chart Property Nodes 'ActPlot', 'Plot.Visible' - a sample VI "BundleSignals_Select_Desktop.vi" is attached for
    reference.
        But on PDA, since the Waveform Chart Property Nodes 'ActPlot', 'Plot.Visible' are not supported, some other method has to be used. I have done the
    selection/de-selection of these signals using 'Insert', 'Delete' array functions as shown in the attached VIs "BundleSignals_PDA.zip" which works, but the
    problem is that the colour of these signals do not work as desired when the selection/de-selection of these signals is done - It is required that the first
    signal should always appear in White color, the second signal should always appear in Red color, the third always in Green color & the fourth always in Blue
    color.
        I hope i have made myself clear of the problem. Has anyone faced this problem before & is there a solution?
    Note: Version of LabVIEW that we are using: LabVIEW 8.5 Professional Development System for Windows Vista/XP/2000 and LabVIEW 8.5 PDA Module for Windows
    Mobile.
    Thanks & Regards,
    Subhashini
    Attachments:
    BundleSignals_Select_Desktop1.vi ‏25 KB
    BundleSignals_PDA.zip ‏26 KB

    Unfortunately the only alternative to using property nodes is to set the properties manually on the development environement. The limited size of memory does limit us in terms of features for the module.
    Mehak D.

  • Graph plot color

    Dear all,
    is there any way to have multiple colors in a single plot ?
    here's a brief of what i am trying to do:
    a graph is continuously running with a value '0'. when the stimulus is given, the value '1' is shown on the graph(just one value when the stimulus is given) and '-1' when it gets the response. the user sometimes gives response when no stimulus is given. that would be invalid response.
    so if the response is valid i want to show '-1' as green and if it is an invalid response i want to show '-1' in red.
    i am attaching the pic of the Graph .
    how can i achieve that ??
    Thanks,
    Ritesh 
    Solved!
    Go to Solution.
    Attachments:
    Plot.png ‏3 KB

    MikeS81 wrote:
    Hi Ritesh,
    a single waveform can only have one color. Maybe you can use annotations. See the "Programmatically Annotate a Graph.vi" Example to get more information.
    Mike
    Correct!
    So we have to resort to using a second plot to highlight the parts of the plot tht are out of spec.
    I've used two methods
    1)
    Use second plot that has "naN' values for all points that are in spec and the actual values when out of spec. "NaN' points will not plot so the second plot will only paint when the values are out. Optionally set the "fill collor" of the second plot to "zero" and you will get blobs under that bad resposnses.
    2)
    More work but do what CC suggested in this thread where he uses the "NaN" trick on the first plot as well to shut off the normal plot while the value is out of spec.
    Have fun!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • 3D Plot Color Ramp - Colors to Values

    Hi all,
    The Color Ramp for 3D plots only displays 3 values; not all values for every displayed color is shown (see below).
    The actual values associated with each color is available via the 3D Plot Properties dialog (during edit).
    How can I access the values for these colors programmatically such that I can display them to the user?
    Thanks,
    Battler.
    Solved!
    Go to Solution.

    Alisha P wrote:
    You're right that they don't match the values exactly. It also is completely dependent on how the values are set for your particular color ramp, especially whether or not they are evenly spaced. In your first post, you showed a picture with the colors distributed according to the default. The method I mentioned in the previous post gets pretty close to these values (really a little under each of them - has to do with how the default is distributed).
    You're also right that this isn't a very good solution. It's a work around to a functionality that I don't think exists. There are probably better work around options - that's just what I came up with.
    One question please Alisha.
    Are we to accept your work-around as the best answer NI can offer?
    I would think a CAR is called for to ensure R&D is at the very least aware of the issue.
    A little concerned this will get swept under the rug,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Access plot colors programmatically

    Hi all,
    When plotting multiple plots on the same axes, Labview automatically assigns each plot a different colour.
    How can I programmatically access this colour sequence (an array?) and set it with an array of colours I choose?
    Regards,
    Jamie
    Using Labview version 8.0

    Hi Jamie,
    the following code should work:
    Ton
    Message Edited by TonP on 02-11-2008 07:45 AM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    SetPlotColor.PNG ‏4 KB

  • How to plot with multi colors in a single XY graph?

    Hi,
      I'm making hesteresis measurements. In this case, I collect data while sweeping voltage first from 0 to 2V, and then back from 2V to 0V, and the data are plotted in a single XY graph. In the XY graph, I want forward sweep plot of one color while the reverse sweep with another color so I can easily make comparisons. And I want to see the data real time. I tried to wire "plot color" in "property node", but this will change the color globally and can not be applied to a section of data. Can anyone advise me how to do this? Thanks!
    Guanglei 
    Solved!
    Go to Solution.

    Hi Graham,
      Thank you very much for the reply, I really appreciate it.
      However I don't quite understand your descripton. Yes I do spit my data in two arrays, one for forward sweep, and the other for reverse sweep. I can plot with different colors in XY graph by appending several XY graphs into one, but by doing this I can not see the data real time. I quickly made a vi to demonstrate my problem,  hope this will give you a better understanding. Thanks. 
    Guanglei
    Attachments:
    demo_GL.vi ‏108 KB

  • Changing line color on XY plot

    This should be something really simple. I simple created a property node, set the active plot, and set the plot.color. What happens to some plots is the points change to my specified color and other stays as my background plot color which is white. I cant seem to get the line color to change with the point color. There are ways I can change it at run time, by right click on the plot and going into properties and setting line color in that tab.
    What am I doing that I cant get this to work at runtime?
    I attached the plot, just ignore all the missing VIs you should be able to see the problem.
    Attachments:
    SteadyStatePlot1.vi ‏350 KB

    It works just fine here using LabVIEW 7.1. Could you do us a favor and make a mini demo, just containing the xy graph, some data for it, and the related property nodes to demonstrate your problem.
    Overall comment on your VI:
    Sorry, but I am absolutely horrified by your code. I cannot believe that you need all those property nodes, especially the signaling ones, they should be used very sparingly. (For example the FOR loops on top center and in the event called "clear all points" are just pumping hot air, repeating the same action and signaling (!!) every iteration.) It also just cannot be healthy if a single event calls tons of signaling properties, such as in the above mentioned event case. Then, in the timeout event, you are rewriting the plot la
    bels and names every 10 ms. Do they really change that often???
    Please let us help you in your overall program design. It will make a big difference in your future, more complex projects if certain common desing misconceptions are not propagated. I think entire sections of your program can be deleted without loss in functionality, the code can be stripped to <20% and the CPU usage can be reduce to <2% of the current situation. Just my wild guess.
    The above is well meaning criticism, so don't take it personal. I am much harsher looking at my own early code from 8 years ago. :-) Good luck!
    LabVIEW Champion . Do more with less code and in less time .

  • Multiplot waveform graph plots are different colors when set to be the same with a property node.

    The graphs were working yesterday. I made a few changes to another part of the block diagram and now the graphs do not plot all of the plots the same color. I am using a for loop with a property node with the elements active plot connected to the iteration terminal, and plot color to a color box. My for loop increments programmaticaly from another part of the code to create plots as it runs. I have replaced the graphs with new ones and they will work sometimes.
    I am using Win2k and LV 7.1
    Thanks,
    Brett

    Hi bh3560,
    Have you tried chaging the color by right clicking on the line in the plot legend.  There is an option to change the color of the plot.
    Brian K.

Maybe you are looking for