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.

Similar Messages

  • 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

  • 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.

  • XY graph : Plot point by point

    hi my intention is to plot in a XY graph point by point. Meaning for eg: I want to plot a scatter plot.
    First I check if the array element satisfies a certain condition (let's say if it lies between 1 to 5) if So I want to plot in red color, else I want to check another condition (let's say lies between 5 to 10) and then plot in blue color and so on.
    First I check for the condition and link it to a case structure such that each case structure will contain the  corresponding plot color but it doesnt seem to be working.
    Kindly guide me with this.
    thanks!!
    Solved!
    Go to Solution.

    Hi Chathuri,
    If you want to plot a scatter plot, you can do this by editing the properties of the XY graph.  Righ-click on the X-Y Graph object and click on Properties.This will bring up the property viewer. If you then go to the Plots tab, you should see a screen similar to the one shown as an attachement. The fourth column from the left sets the display type and if you click the top diagram, you will display individual data points. I have circled this in the attached diagram. You will also need to set the tick markers to display.  You can do this if you set the third column from the left. 
    Hope this helps,
    Andrew McLennan
    Applications Engineer
    National Instruments
    Attachments:
    XYProperties.JPG ‏45 KB

  • 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

  • I want to set for each ponit in a graph wich color it had, how i can make that?

    i want say to the graphe wich color had each point

    > i want say to the graphe wich color had each point
    This isn't the common usage of the graph, and in fact each point on a
    plot has the same color.
    You might be able to do what you want, by adding a new plot for each
    point. You can also modify one of the picture control graphing examples
    to take in two arrays and it could change the color as it draws the plot.
    Greg McKaskle

  • Change order of wpf graph plots

    I'm trying to solve following issue. Let's say I'm sampling data once per second and showing it on the graph. I want to show history of the data, say last 20 plots using the same color with fading. What I do now:
    - create 21 plots, say Plots[0]..Plots[20] 
    - at meas 1, set Data[0] = data
    - set Plots[0] opacity to 1
    - at meas 2, set Data[1] = data
    - set Plots[1] opacity to 1, Plots[0] opacity to 0.5
    - at meas 3, set Data[2] = data
    - set Plots[2] opacity to 1, Plots[1] opacity to 0.6, Plots[0] opacity to 0.3
    - at meas 21, set Data[20] = data
    - set opacity to 0.1..1
    // we're fine as of now, here comes the tricky part
    - at meas 22 I need to remove the data of meas 0 (stored at Data[0]) and replace it with the new data
    - so I set Data[0] = data
    - set Plots[0] opacity to 1 (it's the newest result)
    - set other plots opacity 0.1..0.9
    // and here is the problem: Plots[0] is now at the bottom of the plot stack and is covered by 20 other plots, thus is barely visible
    so I somehow need to move Plots[0] to the top of the stack
    I've tried removing Plot and Data of the farthest plot and adding creating plot with the most recent data, but it leads to incorrect indices (Plot.Index grows all the time, but Data array stays the same)
    Another option would be to fix plots order and opacity in advance, and change data for all plots all the time. But I assume this would be very slow (think of 20-50 copies of the plot with say 1000 points).
    So, any bright ideas here?

    Idea 1) Pre-allocate all of the fade plots, use BeginInit/EndInit when updating the Data collection, and always apply the newest data to the last plot. In pseudo-code:
        // initial setup
        for( opacity = 0..1 )
            var renderer = new Renderer( opacity )
            graph.Plots.Add( new Plot { Renderer = renderer } )
        // on data update
        graph.BeginInit()
        for( i = 1..graph.Data.Count )
            graph.Data[i - 1] = graph.Data[i] /* shift old data down */
        graph.Data[20] = /* assign new data to the last plot */
        graph.EndInit()
    Idea 2) If you just want the historic data visible in the graph (i.e. you do not need to query or interact with the old data through the graph), and if your range is stable, then you could have one plot in the graph and use a PhosphorColorRamp to get the visual fade effect. In pseudo-code:
        // initial setup
        var brush = new SolidColorBrush( C )
        Graph.SetPhosphorMode( brush, Immediate )
        graph.Plots.Add( new Plot { Renderer = new Renderer( brush ) } )
        graph.RenderMode = Raster
        graph.PhosphorColorRamp = new FadeRamp { Color = C, Duration = 20, DurationKind = Frames }
        // on data update
        graph.Data[0] = /* assign new data to first plot */
    (Note that the phosphor effect is one of the areas being updated, so the syntax will be changing in the next release of Measurement Studio.)
    ~ Paul H

  • 10g graph xml - color of the of the base of x-axis

    Friends,
    Below is my simple 10g reports graph xml.
    What I am trying to find out is
    - HOW can I fill the base on the x-axis with any color. Example below
    <rw:graph id="CT_1" src="G_1" groups="object_type" dataValues="ocount">
    <!--
    <?xml version="1.0" ?>
    <Graph version="3.2.0.22" depthAngle="30" depthRadius="30">
    <ThreeDFloor sharePanelProperties="true"/>
    <Y1MajorTick visible="true"/>
    <Y2MajorTick visible="true"/>
    </Graph>
    -->
    </rw:graph>
    In above example depthAngle="30" depthRadius="30" create a 3D space on the base for the bar graph, I am trying to find I can I fill the color on the base which is created by the above settings (for example grey color)
        |    |                                         |    |
        |    |                                         |    |
        |    |                                         |    |
        |    ------------------------------------------|----|
        |   /    how to fill this region        |    /
        |  /     with any color  created     |  /
        | /      by depthAngle="30"         | /
        |/       depthRadius="30"            |/
    [PRE]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    To change the color of the line itself, you can use the attribute Plot>>Plot Color.
    To change the color of the points, you can use the attribute Cursor>>Cursor Color.
    To select the color, you should have a color box constant inside the Numeric>>Additional Numeric Constants palette.
    This is all in LV 7.0. I'm not sure how it similar it is in 5.1.
    One important thing is to place the attribute node inside a case structure which will execute only when your condition has been filled.
    If this didn't help you, I suggest you post the relevant piece of code, or at least an image of it (no BMPs, please).
    Try to take over the world!

  • 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

  • Iam using a table in numbers to plot daily graph lines. If I fill a cell with a text box  at say zero it plots the graph. I can't actually set the cell value until the actual day but the graph plots it at zero when I don't want it to plot anything. Is tho

    I am using a table in Numbers to plot daily graph lines. Mood swings of how I am on the day, i"m a depressive.
    If I fill a cell with a step box at say zero it plots the graph. I can't actually set the cell value until the actual day but the graph plots it at zero when I don't want it to plot anything. Is there a work around. so thatbgraph only plots on the day?

    The answer is (sort of) in your subject, but edited out of the problem statement in the body of your message.
    When you use a stepper or a slider, the value in the cell is always numeric, and is always placed on the chart if that cell is included in the range graphed by the chart.
    But if you use a pop-up menu cell, you can specify numeric or text values in the list of choices for in the menu. Numeric values will be shown on the chart. Text values will not.
    For the example, the values list for the pop-up menu was:
    5
    3
    1
    Choose
    -1
    -3
    -5
    The first pop-up was set to display Choose, then the cell was filled down the rest of the column. Any text value (including a single space, if you want the cell to appear blank) may be used instead of Choose.
    For charts with negative Y values, the X axis will not automatically appear at Y=0. If your value set will include negative values, I would suggest setting the Y axis maximum and minimum to the maximum and minimum values on your menu list, rather than letting Numbers decide what range to include on the chart. Place a line shape across the chart at the zero level, and choose to NOT show the X axis.
    Regards,
    Barry

  • Lexical References for reports 9i (graph and colors)

    hi,
    1) i want to use lexical parameters for graph and colors
    like font,background,foreground,text and so on....
    for graph :
    width,height,x-axis,y-axis and so on....
    my reports are saved in .jsp .
    it is possible or not .if possible please help me.
    it's very urgent.
    2) I have created a report with graph at the beginning of the first page
    I got result with graph and corresponding data in tabular format and saved in .jsp file.
    Graph is shown at the beginning of the report as I desired followed by
    data.(i.e. First Page).
    From next page I am not able to get the data
    from the top of the page instead a gap with the size of the graph is available
    which is blank.
    I need to produce graph only on the first page and the other pages with just the
    data without a gap reserved for graph.
    with regard's
    vijay

    1) Yes, you can use lexical references in the generated graph XML (I presume that you're talking about 9i). However, this functionality is only available in patch 1 and above (patch 2 is now available, and can be downloaded from Metalink).
    2) Create a frame around the graph (and make sure that the graph is contained by the frame, i.e., move it forwards). Make the frame vertically variable.
    Hope this helps,
    Danny

  • 3D graph plot properties - cannot be changed

    Hi all,
    I still cannot change the plot properties of the 3D graph.  I open the Plot Properties tab up and it gets stuck on the first page.
    This means that I cannot release any VIs which use the 3D graph - a big problem.
    Has anyone else experience this?  What do you suggest to fix it.
    Thanks,
    Battler.

    I have experienced exactly the same behavior (can not change 3D graph plot properties) with 3D plots (scatter and surface) in LabVIEW 2011.  The 3D plot properties page works correctly at first but then fails to switch pages after larger data sets have been loaded to the graph.  For example, my scatter graph contains 13 plots, each with 320 points of data.  Once the page "gets stuck" it is stuck for all 3D graphs until the offending graph is deleted and re-created.  To reproduce this issue create at least one 3D plot with a large number of plots in it.
    On a related note, if there was a programmatic method for deleting plots from a 3D graph then it's possible that this issue could be worked around.

  • 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.

  • How can i remember array, a using after next time in graph plot

    Hello i have a two graph , first graph case 'AF' consist with 3 arrays a second graph case 'BF' consist with 3 arrays + i need arrays of case 'AF', how can i do it? I have attached example.
    Thanks
    Attachments:
    0408 (16A) v jednom CASE.vi ‏398 KB

    Hi,
    If i have understood you right, you want to save the AF graph plots.
    am i right? if not plz correct me.
    If i got u right, the simplest is to build a 2 D array by merging your 1D arrays and write to spreadsheeet file.
    Now, you can read it whenever u want and display on the XY graph.
    hope this help, if not, plz eloberate on what you are looking for.
    Regards
    Dev

Maybe you are looking for