Hiding plots in legend

Hello,
I am currently producing a XY graph based on a set of points.  Along with this, I plot three trendlines that the user then will select from.  When he/she selects one of the trendlines, I wish for the other two to disappear.  Currently, I am able to use the Property "Plots"->"Visible" to cause the actual trendline to disappear.  However, the name of the plot is still shown in the legend (although the sample of how the curve looks is blank as desired).  I am wondering if there is a way to cause the name in the legend to also disappear. 
 I know that it is possible to use "Legend" -> "Number of Rows", but this seems to limit the plots shown in the legend based on their order.  For example, if I have plots "Curve", "Trendline 1", "Trendline 2", "Trendline 3", and desire to select Trendline 3 only, setting Number  of Rows to 2 will show "Curve" and "Trendline 1".  I believe it is possible to take the data and reformat it so that the second plot becomes the desired trendline, but I was hoping to avoid this if possible. 
I attached a small VI to show what I am doing so far.
Thanks
Attachments:
VisiblePlot.vi ‏18 KB

Hello Guruthilak,
Thank you for the reply and sample VI.  While the VI that you attached was certainly better than my original, there is still the issue of the blank space existing where the trendline used to be.  I also programmed the attached VI based on your first approach.  The issue is that when I rename the plots to the legends, it just renames the existing trendlines.  For example, if I want "Curve" and "Trendline2", the Legend will read
"Curve - <white line>"
"Trendline2 - <blank space>"
Is there an additional step that must be taken? 
Thank you again for the help
Attachments:
VisiblePlot[1]_Mod[2].vi ‏23 KB

Similar Messages

  • Polar plot with legend points

    I can put one Polar Plot with legend in points?
    Case:
    I have magnitude and phase arrays for build polar plot and i want put rotation legend in each point of measurement. Then we have 3 arrays (magnitude, phase and rotation), but rotation need stay like legend for each point.
    Somebody already do it?
    thx for tip.
    Leonardo de S. Cavadas
    Maintenance Engineer and Inspection - Bureau Veritas do Brasil
    Engineer Metallurgist with emphasis in Advanced Materials
    Technologist in Computer Science

    Unclebump,
     i do one simple modification to be possible add rotation value to image, isn't better solution but i think that i'm near to solution way. Look these VIs, Re-link is necessary.
    Leonardo de S. Cavadas
    Maintenance Engineer and Inspection - Bureau Veritas do Brasil
    Engineer Metallurgist with emphasis in Advanced Materials
    Technologist in Computer Science
    Attachments:
    Plot Polar Data with Legend.vi ‏74 KB
    OtherPolarPlot.vi ‏67 KB
    Polar Plot with Legend.vi ‏75 KB

  • XY-Graph: How to set number of plots in legends depending in number of plots

    Hello,
    i have an xy-graph that gets an array of plots. The size of the input array is can be different.
    Now how can i set via properties the number of plots shown in the plot-legend?
    Thanks

    Hi Thomas,
    there's a property to determine the number of plots shown in the legend…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Keeping plot area, legend and legend within same area

    I have two xy graphs, arranged one below another. Both have legends and multiple yscales (depending on user selection using popup menu). Yscales are shown programmatically and so is legend text (which varies in length). Legend is on right of plots. What I need to do is resize the plotting part of the xy graph to accomodate the legend, when its text increases in size (and it moves left onto the graph). The lower graph's plotting part shoudl also acquire the same size.That is the total control area should not increase (lets say 1200 pixels in width) and plotting area should shrink or enlarge to accomodate the increasing yscales (on the right side) or legend size.
    Please share a VI that does so.
    Thanks

    Well, this seems to do what you want. IMHO, it's not pretty, and I bet it could be made better (if it could, I'm sure we'll find out, BRING IT ON!). Autosize your legend if you want, I wanted to show how things would vary. You could then just wire the second graph to have the same size properties as the first.
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ

  • Hiding plots programatically in XY graphs

    My data acquisition plots five y values along a time axis. There are occasions when the number of plots is less than this due to user set-up of the test. The problem that I have is that the XY graph continues to plot all five values with the empty values drawn on the zero line of the y-axis. Whenever I try to disable the visible property of the plots it doesn't seem to recognise them as active plots and delivers an error code saying 'Invalid property...."etc. The plots can be made invisible only if the user choose to acquire 5 sets of data. Can you help?

    Make sure you are using the order: Set Active Plot -> Set Active Plot's Property
    As in the attached LV 6.1 example
    2006 Ultimate LabVIEW G-eek.
    Attachments:
    Vis_Graph.vi ‏45 KB

  • Legend for a 3D Surface Plot

    How can I create a legend for a 3D surface plot? I'm doing a xy-projection and the view direction is directly towards this plane. The plot style is a surface contour plot. I want to display next to the plot the legend in a separate bar where the different colours with each value are displayed. The value for each contour line shall be displayed in the legend.
    Patrick

    OK,
    I remember that thread now. That was the one were you did not want to use interpolate colors and I did. Well I still  like to interpolate colors but that presents another challenge when trying to produce a proper color ramp. Without resorting to using the picture control
    http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=14&jump=true
    I decided to play with some of the built in objects.
    All of the round objects like knobs and guages include a color ramp. This gave me a ramp but is not quite up to what you get with an intensity graph.
    Since I could not get a ramp on any of the straight indicators like sliders etc, I hid most of an intensity graph and just use the Z-scale. It turns out that the same data structure can be used in the intesity graph as the guage.
    Can anyone think of other ays of producing a proper color scale when intepolation is turned on?
    Ben
    Message Edited by Ben on 12-24-2005 08:03 AM
    Message Edited by Ben on 12-24-2005 08:03 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Scale.vi ‏81 KB
    Scale.JPG ‏111 KB

  • Can plot legend grow upward?

    Hi,
    I'm dynamically adding plots to an XY graph. The plot legend is placed on the top, right corner of the graph by default. When I add new plots, the legend grows downward, blocking the graph. Is there a setting that I can change so that the legend will grow upward? Also, I tried to place the legend on the right hand side of the graph. This also caused a similar problem when I changed the name of the plot because the name grew to the left. Is there a possible setting change for this so that the legend will grow to the right when the text becomes longer?
    Thank you,
    Jae Ho
    LV7.1

    Use the "Plot Bounds" property along with the Plot legend property ("LegLeft") to move the plot legend's left side to the edge of the plot after setting the plot names, colors, etc.
    “A child of five could understand this. Send someone to fetch a child of five.”
    ― Groucho Marx

  • Legend in graphs

    The plot function is CW is great but does not have a built-in legend.
    Are there any examples of a plot with legend available?

    Create a property node for your graph. Use the property node "Active Plot" to define which plot (or line) you want to rename. Then write the new legend label to the property node "Plot.Name". See attached.
    Tim
    Attachments:
    legend.vi ‏12 KB

  • Delete plot definition​s from chart

    Hi all. I'm struggling with a chart to which I programmatically add and
    remove plots. When I wire an empty array to the Value property it
    clears the plot, as expected, but each of the plot definitions still
    remains. This can be seen by simply inspecting the legend, snapshot
    below. How can I remove these definitions?
    I've read that this is supposed to be a good thing, but it's not
    for me. I programmatically enlarge and shrink the legend to show the
    number of plots, so as the user clicks "Add Data to Plot" the legend
    size increases. This works fine, but once the legend reaches ten elements deep, I turn on the vertical scroll bar and keep the legend size constant. But the vertical scroll bar allows the user to see
    all previously defined (yet empty) plots, which looks terrible! Below
    are three more snapshots, showing 4 defined plots, 9 defined plots and
    13 defined plots. You can see that in the third snapshot where only the
    first 10 are in the legend and the scrollbar is on, the user will be able to see
    lots more previously defined plot entries by scrolling down. How
    can I programmatically remove these definitions?
    Message Edited by Thoric on 07-23-2008 10:29 AM
    Thoric (CLA, CLED, CTD and LabVIEW Champion)
    Attachments:
    legend1.jpg ‏20 KB
    legend5.jpg ‏40 KB

    Thanks for the input Mike, but this hasn't worked for me
    See the snapshot - the Visible flag has simply made the plot symbol in the legend invisible, but it's still defined. You can see from here that I've added up to "test 14" in the plot, but there any many more in the legend. Right down to 27 if I scroll all the way. I really do need these to be erased. Is there really no way to un-define them at all?
    Message Edited by Thoric on 07-23-2008 12:01 PM
    Thoric (CLA, CLED, CTD and LabVIEW Champion)
    Attachments:
    legend6.jpg ‏12 KB

  • Dynamic legend name in XY-graph in labview 7.0

    Dear All,
            In my application i am displaying multiple plot in XY-Graph. The total number of graph displayed may very. I want according to total number of plot selected legend display. And name of that plot is not fix it very depending on selection.
             I tried to use property node "plot name" but in that case only first plot name is changing.
    --Vishnu
    Solved!
    Go to Solution.

    Hi Vishnu,
    use the property "Legend"->"Plots shown"!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • 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 to delete rows from 2D array in this case...

    Hello. I'm just begging adventure with labview so please for patient. I created a program whitch suppose work in following way:
    2D Input array is array created by FOLDER BROWSING subVI. It works in this way,that browse folder and looking for txt files whose contanins measurment data. In my case subVI founds 4 files,and from theirs headers read information about what kind of data are in file also their's path. In this way is created 2D Input Array. subVI named PLOTS FROM PATHS ARRAY make picture with polar/XY plot. It's create only those plots and legends on one picture as many files(their paths) is setted to the program by output array. I made this subVI in that way and I would not like to change it. 
    My problem is that in even loop (witch check for any change by user) program suppose to relay anly those rows(files) for which checkbox are marked, e.g. marking anly 1 and 4 box, program should chose from input array row 1 and 4 only and pass them to output array,then  PLOTS FROM PATHS ARRAY subVI makes a picture only with 1 and 4 plot and legend only for plot 1 and 4. The best solution would be some relay witch is avtivated by logical signal. It lost to me ideas how to solve it, I'm just in blaind corner...
    I tried to use delete from array but I don't know how to do use it properly in this program,becease it can be only before or afeter for loop. Below is scan of front panel and also main problem. Please set me up somehow to solve this problem. 
    Regards 
    Solved!
    Go to Solution.
    Attachments:
    plots selector.vi ‏17 KB
    problem.PNG ‏18 KB

    I have attached a vi. Is this the one that you need?
    Anand kumar SP
    Senior Project Engineer
    Soliton Technologies Pvt Ltd
    Attachments:
    plot selector modified.vi ‏14 KB

  • Templates and SSI

    http://kirtmarkle.com/slide1.html
    http://kirtmarkle.com/
    http://kirtmarkle.com/gallery_frameset.html
    Above I have included a link to a set of 3 slides I create
    this morning in an attempt to better define my site (as well as
    links to my Home and Gallery pages for reference):
    Slide 1: a flowchart of the “stuff” that makes up
    the site:
    Red items are “class 1” elements that will not
    change
    Green items are “class 2” elements which could
    change
    Blue items are “class 2” elements used for
    section-specific navigation
    Brown items are “class 3” elements which will
    change every page
    Slide 2: the elements in their current position on the site.
    The white dividers with “150px” and “145px”
    are used to mark the current boundaries of the frames-based layout.
    Red: graphic images placed inside CSS-P elements absolutely
    positioned
    Green: navigation bar placed inside CSS-P element absolutely
    pos.
    Blue: overlapping CSS-P elements with “previous”
    and “next” buttons
    (typically, there are two such 5x4 grids for each Year
    Category)
    Slide 3: when any of the Blue CSS-P elements are clicked,
    they navigate/animate to their new position above the
    “Legend”, hide the other Blue CSS-P elements and reveal
    the “Legend” “Viewer”
    “previous” and “next” buttons. Clicking the
    image inside the “Viewer” cycles through a series of
    detailed/zoom views. When the Blue CSS-P element is clicked again,
    it navigates/animates to its original position, hiding the
    “Legend” “Viewer” “previous”
    and “next” buttons while revealing the overlapping Blue
    CSS-P elements again. You’ll note, however, that the button
    (in this case “D2”) swaps CSS-P element
    “D2” to “D2-y” to allow the return
    navigation/animation, swapping back once it reaches its original
    position.
    TASK: create a template containing all the class 1 elements.
    Question #1: What should this template be named? Would
    “page.html” suffice?
    Question #2: Should the Red elements be CSS-P? Would a
    navigation bar work better? If so, how does one have two navigation
    bars on a page? (I refer to the Green elements)
    TASK: Create server-side include files containing all class 2
    elements and place them on the template as needed.
    Question #3: Which elements are used to build the SSI files?
    How many SSI files would need to be built? For example, for the
    Green navigation bar, do I create a file with only those five
    elements in a table and then save it as an SSI? How are they then
    placed correctly on the template (I assume inside the CCS-P
    wrapper)? How does the “Gallery” button make them
    appear when clicked?
    TASK: Insert editable regions to cover the class 3 items,
    including the section-specific navigation.
    Question #4: The same question with regards to the SSI files
    required for the puzzle grid. Is each grid saved as its own SSI?
    (Currently, there are nine variations of this 5x4 grid, two for
    each navigation bar item except 2007) Or, since each piece is in
    its own CSS-P element, does each piece need to be saved as an SSI?
    Do the “previous” and “next” buttons belong
    in this class 2 section-specific navigation elements?
    Question #5: In the “Viewer” I cycle zoom levels.
    Is a separate page to be built for each zoom level, as I have
    currently done?
    [Of course, I realize I’m asking for a LOT of
    information. I don’t know if this is beyond the scope of this
    board or if I’m overstepping my bounds by asking too many
    questions. However, I believe if I can have the answers it will go
    a long way towards my understanding of something that seems
    essential to web design. And as I hope to make this a profession
    when my skills improve, I need to learn the BEST methods for
    executing the work. I apply the same attitude towards my work as an
    artist, animator and, yes, word processor. I desire to be just as
    proficient in the field of web design and will continue to work has
    hard as necessary until I achieve that goal. The assistance
    I’ve received on this board has been most helpful towards
    that end.]

    I am unable to spend the kind of time this would really
    require, but to
    say one thing: rethink the use of Absolutely Positioned
    elements. There
    has been much written here on this subject which you night
    want to
    google. But they will be more misery than you might imagine.
    As a
    general rule, use Divs instead.
    E. Michael Brandt
    www.divaHTML.com
    divaGPS : you-are-here menu highlighting
    divaFAQ : FAQ pages with pizazz
    www.valleywebdesigns.com
    JustSo PictureWindow
    JustSo PhotoAlbum
    KirtMarkle wrote:
    >
    http://kirtmarkle.com/slide1.html
    >
    >
    http://kirtmarkle.com/
    >
    >
    http://kirtmarkle.com/gallery_frameset.html
    >
    >
    > Above I have included a link to a set of 3 slides I
    create this morning in an
    > attempt to better define my site (as well as links to my
    Home and Gallery pages
    > for reference):
    >
    > Slide 1: a flowchart of the ?stuff? that makes up the
    site:
    > Red items are ?class 1? elements that will not change
    > Green items are ?class 2? elements which could change
    > Blue items are ?class 2? elements used for
    section-specific navigation
    > Brown items are ?class 3? elements which will change
    every page
    >
    > Slide 2: the elements in their current position on the
    site. The white
    > dividers with ?150px? and ?145px? are used to mark the
    current boundaries of
    > the frames-based layout.
    > Red: graphic images placed inside CSS-P elements
    absolutely positioned
    > Green: navigation bar placed inside CSS-P element
    absolutely pos.
    > Blue: overlapping CSS-P elements with ?previous? and
    ?next? buttons
    > (typically, there are two such 5x4 grids for each Year
    Category)
    >
    > Slide 3: when any of the Blue CSS-P elements are
    clicked, they
    > navigate/animate to their new position above the
    ?Legend?, hide the other Blue
    > CSS-P elements and reveal the ?Legend? ?Viewer?
    ?previous? and ?next? buttons.
    > Clicking the image inside the ?Viewer? cycles through a
    series of detailed/zoom
    > views. When the Blue CSS-P element is clicked again, it
    navigates/animates to
    > its original position, hiding the ?Legend? ?Viewer?
    ?previous? and ?next?
    > buttons while revealing the overlapping Blue CSS-P
    elements again. You?ll
    > note, however, that the button (in this case ?D2?) swaps
    CSS-P element ?D2? to
    > ?D2-y? to allow the return navigation/animation,
    swapping back once it reaches
    > its original position.
    >
    > TASK: create a template containing all the class 1
    elements.
    >
    > Question #1: What should this template be named? Would
    ?page.html? suffice?
    >
    > Question #2: Should the Red elements be CSS-P? Would a
    navigation bar work
    > better? If so, how does one have two navigation bars on
    a page? (I refer to
    > the Green elements)
    >
    >
    > TASK: Create server-side include files containing all
    class 2 elements and
    > place them on the template as needed.
    >
    > Question #3: Which elements are used to build the SSI
    files? How many SSI
    > files would need to be built? For example, for the Green
    navigation bar, do I
    > create a file with only those five elements in a table
    and then save it as an
    > SSI? How are they then placed correctly on the template
    (I assume inside the
    > CCS-P wrapper)? How does the ?Gallery? button make them
    appear when clicked?
    >
    >
    > TASK: Insert editable regions to cover the class 3
    items, including the
    > section-specific navigation.
    >
    > Question #4: The same question with regards to the SSI
    files required for the
    > puzzle grid. Is each grid saved as its own SSI?
    (Currently, there are nine
    > variations of this 5x4 grid, two for each navigation bar
    item except 2007) Or,
    > since each piece is in its own CSS-P element, does each
    piece need to be saved
    > as an SSI? Do the ?previous? and ?next? buttons belong
    in this class 2
    > section-specific navigation elements?
    >
    > Question #5: In the ?Viewer? I cycle zoom levels. Is a
    separate page to be
    > built for each zoom level, as I have currently done?
    >
    >
    > [Of course, I realize I?m asking for a LOT of
    information. I don?t know if
    > this is beyond the scope of this board or if I?m
    overstepping my bounds by
    > asking too many questions. However, I believe if I can
    have the answers it
    > will go a long way towards my understanding of something
    that seems essential
    > to web design. And as I hope to make this a profession
    when my skills improve,
    > I need to learn the BEST methods for executing the work.
    I apply the same
    > attitude towards my work as an artist, animator and,
    yes, word processor. I
    > desire to be just as proficient in the field of web
    design and will continue to
    > work has hard as necessary until I achieve that goal.
    The assistance I?ve
    > received on this board has been most helpful towards
    that end.]
    >
    >

  • Graph alignment in Report 10g

    Hi!
    I'm working with Reports Builder 10g and I have a problem with alignment of a graph.
    This graph (G1) is contained in a repeating frame (R1) and the repeating frame is in a simple frame (M1).
    In the XML I set 'autoLayout' to 'AL_NEVER' and I resize the graph moving the borders in the layout editor to align it to the left border of the page.
    However, when I run report, the graph isn't aligned to the left margin, and it appears in the centre of R1 and it don't fit R1 exacltly: there are some space between the margins of R1 and the graph G1.
    Can, you help me!
    Please, I'm very hungry because I spend too much time to resolve the problem but I didn't find a solution.
    Thanks in advance.
    Bye.

    Hi Leonardo,
    The attribute autoLayout=AL_NEVER does not have any effect on the size of the graph object. The graph object consists of different areas, eg, plot area, legend area, background, etc. By setting autoLayout=AL_NEVER, you can specify the exact placement of legend area, plot area, etc inside the graph object. But the size of the graph object remains un-affected. You can change the size of the graph object only by dragging its boundaries in the paper layout.
    I tried with Reports Builder 10g, and could not reproduce your problem. Remember that there will always be whitespace between the plot area (the area where you see bars, lines etc) and the graph object boundary. I hope that you are not referring to this whitespace as gap.
    In order to see the graph object boundaries completely, you can add the following to your graph XML
    <Background fillColor="0000CC" />
    Navneet.

  • I need advice on creating SubVIs

    Hi all,
    My code is getting bulky and I have created SubVIs to handle certain tasks. Here is what the code does: take in multiple data file paths from the user, and generate
    data summary tables, and lots of plots (table and plot formats controlled by property nodes) and place objects (tables and formats) on different tabs of a control tab on the FP.
    Here is what I need help with:
    1. Is it a good idea to feed file paths to inputs of a SubVI? The code reads 2D numeric data from data files using Read from Spreadsheet File.vi.
    2. Should I make the input of my SubVI the actual 2D data input instead of file path?
    3. Does it make sense to have graphs, charts, etc. in a SubVI? This is how I have them right now (also feeding references to these plots into the SubVI), but someone suggested that I shouldn't do that.
    For my plots, the legend, X-axis label, and Y-axis lable are read automatically from the file name and updated through property nodes, which is why my SubVI takes in file paths.
    Does it make sense to generate a cluster of properties and feed that into my SubVI?
    Any other thoughts?

    murchak wrote:
    Hi all,
    My code is getting bulky and I have created SubVIs to handle certain tasks. Here is what the code does: take in multiple data file paths from the user, and generate
    data summary tables, and lots of plots (table and plot formats controlled by property nodes) and place objects (tables and formats) on different tabs of a control tab on the FP.
    Here is what I need help with:
    1. Is it a good idea to feed file paths to inputs of a SubVI? The code reads 2D numeric data from data files using Read from Spreadsheet File.vi.
    Sure, i do that all the time.
    2. Should I make the input of my SubVI the actual 2D data input instead of file path?
    Why not, make a 2nd sub-vi which uses the data inputs inside the #1 subvi.
    3. Does it make sense to have graphs, charts, etc. in a SubVI? This is how I have them right now (also feeding references to these plots into the SubVI), but someone suggested that I shouldn't do that.
    This is 2 different issues. Having graphs inside a sub-vi is ok for debugging purposes, if never shown they should have no effect later on. Feeding references is a way to update graphs in another VI (presumably main), but i'd recommend returning the data array to main and simply feed the graph there instead.
    For my plots, the legend, X-axis label, and Y-axis lable are read automatically from the file name and updated through property nodes, which is why my SubVI takes in file paths.
    Does it make sense to generate a cluster of properties and feed that into my SubVI?
    3 string inputs are fine. You'll also need the graph ref. I'd make a state or event in the main of it instead.
    Any other thoughts?
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

Maybe you are looking for