How do I programmatically change the plot legend names on my xy graph?

I have a need to change the names/labels on my XY Graph's Legend at run time.  This is because plot 0 is not always the same set of data.  I have searched high and low for a couple days now to no avail.  The closest thing I've seen is overlaying a string over the plot legend, but I would prefer to do change the property of this box.  Any help would be appreciated.

Hello Ben,
with waveforms this also works for me fine. So where is the pitfall? (if always all works fine, one don't really gets experience)
greets, Dave
P.S. @ J.B. I used the Code Capture Tool from the Starware Thread, this made me so fast. If I could do, I would give it five stars each time I use it.
Btw. would it be possible to programmatically give ratings with LV? Here it should be used. Thanks again to tst & the others
Message Edited by daveTW on 06-14-2007 09:13 AM
Greets, Dave
Attachments:
Example_FP.png ‏5 KB

Similar Messages

  • How to remove entries from the plot legend?

    Hello,
    I have got a waveform graph to display measurement data. Sometimes there will be 40 plots shown. The plot legend also expands to 40 and I limit the number of elements shown in the Plot legend and I have activated the vertical scroll bar. Of course 40 plots are too many to work with. So the user has the ability to select plots to be shown. Now I want to decrease the number of elements in the plot legend as well. But if there were once 40 elements the plot legend remains in this size and the vertical scroll bar indicates that there are more elements than shown even if there are only e. g. two plots in the graph.
    I don't want to increase and decrease the number of plots shown in the plot legend programmatically each time the user changes the number of plots shown. Secondly the plot legend shall have a maximum number of 20 elements (otherwise it would exceed my front panel). So I don't want to programmatically check whether to show the vertical scroll bar or not.
    The legend should look like a partially filled array with grayed out elements. 
    How do I do this? 
    Is there a simple way to clear the plot legend and remove all entries?
    Regards, Jörn

    Hi Suse,
    your example does not exactly solve my problem. I wanted the plot legend always to show 10 legend entries.
    But it helped me to find the solution: set LegNumRows to 10 and set LegPlotMin to the number of plots in the Graph (see attached example).
    One thing is still missing: setting the plot number currently at the top of the legend. If you run the attached example with 30 plots shown, scroll the legend down and run the VI once again with 3 plots shown then you will see no plots in the legend despite the fact that all could be shown. You need to move the scroll bar first to see the 3 elements.
    Best regards, Jörn
    Attachments:
    Graph_Plotanzeige.vi ‏12 KB

  • How can I programmatically change the fill color Settings of the Cwslide ActiveX Controls

    In design mode (Visual Studio 6.0),I want to programmatically change the fill color in properties of  cwslide  ActiveX Controls.what's the command?
    Attachments:
    cwslide.JPG ‏11 KB

    First, if you want to start getting beyond the basics with DAQ, you are going to have to stop using the DAQ assistant and do it with lower level DAQmx VI's.  There are hundreds of examples in the example finder.  You can even right click on the DAQ assistant and select open front panel.  That will create a subVI that you can open and see what is going on behind the scenes.  Do it.  I think you'll find the DAQ task is being recreated on each (though I'm not 100% of how the settings are established or maintained in each section of that subVI).
    The second problem is you have a bit of a race condition on iteration 0.  Those two DAQ property nodes are running at the same time.  So when you read the AI.Max, it may be happening before or after the AI.Max is set in your case structure.
    Third, make sure you wire up your error wires.

  • Changing the Plot Legend (NonSequential Names)

    I've got a Chart that serves multiple purposes.  As such, the plot legend needs to change.  I've looked through the forums, and have found options that let me create a dynamic legend of the form (Name1, Name2, Name3).
    However, I don't want the labels to be sequential in nature.  I'd like to be able to define the legend as either (x,y,z) or (A1,A2,B1)
    Any suggestions?
    Thanks!

    You have the option to change the scale label through the property node, using that you can set any name you want. Is that what you are looking for?
    The best solution is the one you find it by yourself

  • How can I programatically change the Plot Style of a 3D surface?

    I believe this can be done using a property node...however I am unable to find the property. At one point in my program, the plot style automatically switches to Points, and I want it to be Surface again later. I have a 3D surface reference wired to a property node, giving me the CWGraph3D properties. If the properties followed the menu style you get from right clicking on the 3d surface, I should be able to then select the property plots, and change the plot style. However, even though I can get a reference to the plot, the only property I can access is the count. I would appreciate it if someone could show me where I am going wrong, since Im confident this can be changed programatically.
    Thank you!
    Jeff
    Using Labview 7 Express

    Hi Jeff,
    here's what I did (found somewhere in the examples that come with LabView):
    Message Edited by GerdW on 03-14-2007 04:28 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    3dplot.png ‏9 KB

  • How to programatically (dynamically) change the chart legend ?

    How do I add new labels/symbols to the chart legend dynamically ?
    I'm creating a scatter graph using the query
    select A,B,C from tableX group by A
    B is the y-axis, C is the x-axis. Points plotted for each grouping of A will be a different color. I know I can change the color of the point to be plotted thru the format trigger. The format trigger will change the color of the plotted points when there is a change in the grouping of A. My problem is how can I add a new label/color to the legend for each grouping of A as it is plotted ? The number of groupings of A is variable depending on what's in tableX. I need to programatically create the legend (each grouping of A will have it's own label/color) thru the format trigger as I won't know before hand how many groupings of A there will be.

    Try with Presentation variables.

  • How do I programmatically determine the cursor legend refnum?

    I am determining the controls and such of a front panel programmatically as I have a need to be able to modify panels quickly without the manual editing necessary. I need to know how to determine the refnum of a cursor legend for a waveform or XY graph in a programmatic fashion rather than by creating a reference node.

    That is a good question. The cursor legend reference is not returned if you get a list of all the object references. The graph is, so you can get its reference and get the cursor legend reference from it. You probably only need to look at the ones with a visible property set to true.
    Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
    DISTek Integration, Inc. - NI Alliance Member
    mailto:[email protected]

  • How can I programmatically change the voltage range settings in a DAQ Assistant

    Hi,
    First post here.  
    I need to be able to change the voltage range properties of a daqmx DAQ Assistant based on user input.  My hardware, an SCXI-1102C does not allow changing this property on a running task, so I'd like to either set the analog input voltage range before the DAQ Assistant activates, or pause the DAQ Assistant immediately after it starts, set the values and then resume.
    I don't know how to edit the task ahead of time because the DAQ assistant creates the task when it runs, and there is no task before that.
    In the attached picture, I have a conditional section, set to run only if the while loop iteration is 0.  I take the task from the Daq assistant, send it to a stop task vi, set the property, and then send the task on to the start task vi. I can watch it run with the debug light on, and everything seems to work correctly, but on the second (and all the other) iteration of the loop, I read out AI.Max and it seems like the DAQ Assistant has re set it back to 5V.  Can anyone see what is going wrong here?
    BTW, this is continuous acquisition and the code does not produce error messages when it runs.
    I did come across a similar question that someone posted here back in 2006, but his question was specifically aimed at a Labview API (VB, I think), and not an actual G solution.
    Attached are the actual vi in question and a png image of the block diagram.
    Thanks! 
    Ruby K
    Solved!
    Go to Solution.
    Attachments:
    Labview_question.PNG ‏14 KB
    Sample_AIV.vi ‏91 KB

    First, if you want to start getting beyond the basics with DAQ, you are going to have to stop using the DAQ assistant and do it with lower level DAQmx VI's.  There are hundreds of examples in the example finder.  You can even right click on the DAQ assistant and select open front panel.  That will create a subVI that you can open and see what is going on behind the scenes.  Do it.  I think you'll find the DAQ task is being recreated on each (though I'm not 100% of how the settings are established or maintained in each section of that subVI).
    The second problem is you have a bit of a race condition on iteration 0.  Those two DAQ property nodes are running at the same time.  So when you read the AI.Max, it may be happening before or after the AI.Max is set in your case structure.
    Third, make sure you wire up your error wires.

  • How can I programmatically change the colour of tab pages? If not, when?

    I have found that in LabVIEW 6.0.2 the "Dialog" tab control cannot be coloured, but the other type of tab control one can be coloured by the paintbrush tool. I cannot find any property node to programmtically set the colour of the enitre tab control or individual pages. When will these properties be available in LabVIEW?

    The dialog controls and indicators are designed
    specifically for use in dialog boxes. These controls inherit their color from the colors you set in Control Panel >> Display. Because of this you will not be able to programmatically change their color.
    Chris_Mitchell
    Product Development Engineer
    Certified LabVIEW Architect

  • How can I programmatically change the number displayed on a digital control?

    In my application, there are two while loops. The inner loop has a digital control where the user can enter a number. If he enters an invalid number, I want to clear his input.

    One way of doing is see attach..
    need to use property node and case structure.
    When you feel sad, laugh
    Attachments:
    25feb04.vi ‏28 KB

  • How to chang the number of plots in the plot legend during run time?

    Hi, I am using waveform graph. At run time only i will come to know, how many plots should be plotted in the waveform graph. Based on the number of plots i have to change the plot legend. Is there any method to do the same?

    Maybe something like this?
    The inputs on the left are (from the top)
    your array of data you want to plot (or anything that contains the number of inputs you have)
    next one is an array of colorschemes (maybe you dont need this)
    and the third is an array of booleans that are true if that "channel" should be plotted and false otherwise
    /Anders
    Message Edited by Tohatsu on 01-08-2008 08:56 AM
    Attachments:
    graph.JPG ‏10 KB

  • How to programmatically change the width of a graph?

    How can I programmatically change the width of a Waveform Graph or Waveform Chart? When I create an implicit property node for a graph or chart, it is read-only. Changing the plot bounds worked in earlier versions of LabVIEW, but not anymore.
    Solved!
    Go to Solution.

    It works for me in LV2013 but I'm using the Plot Area : Size : Width property.
    Using LabVIEW: 7.1.1, 8.5.1 & 2013

  • Stop plot legend names changing

    Hi all,
    I'm using the X-Y graph for the plot (comparison) of two datasets.
    I have manually given each of the two datasets a name which appear in the legend.
    The problem is once the graph is updated then the plot name in the legend for one(1) of the plots reverts to "Plot 1".
    How do I stop it from doing this?  I want to fix the names of the plots in the legend.
    Thanks,
    Battler.

    Hi Battler,
    I can't think why one of the plots would lose it's defined name unless you are setting the data in a bizarre way.
    You can always set the plot legend name each time you update the data by using a property node for the XY graph and setting two properties:
    1. Set the  ActivePlot property to 1 (0 is the first plot, 1 the second plot)
    2. Set the  Plot.PlotName property to your desired string.
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

  • How to Generate Event on change in Plot Legend for XY Graph

    Hi,
    I have two XY graphs on the front panel and would like to maintain a common plot legend such that any change in the plot legend affects both graphs.
    Objective: I would like any value change in plot legend to fire an event.
    How do I program that?
    I know of value change event for the graph but am unable to find something specific to the plot legend. Other option is to have the user press a "refresh" button that will fire the event.
    Feel free to share thoughts on other elegant methods to achieve the same objective.
    Thanks,
    Gurdas
    Gurdas Singh
    PhD. Candidate | Civil Engineering | NCSU.edu

    Hi Sarah,
    Looks like you are talking of exactly what I want!
    I have attached a sample VI to try achieve what I want. But it still has some issues which are:
    1) I am unable to configure a Plot Attribute Change Event. I have used a mouse leave event instead. How does one configure a Plot Attribute Change Event?
    2) Is there no single property which will transfer all the settings of plot legend from one graph to plot legend of another graph? In my sample VI, I have to read each property of the master graph and feed it into the slave graph.
    Kindly note I am using LV FDS 7.1 on Win2000
    Thanks,
    Gurdas
    Message Edited by Gurdas on 03-27-2006 11:51 PM
    Gurdas Singh
    PhD. Candidate | Civil Engineering | NCSU.edu
    Attachments:
    Graph_PlotLegend_Event.vi ‏45 KB

  • How to remove a plot and resize the plot legend in LV 8.6 as in this link to a LV 7.0 example

    This VI ( ftp://ftp.ni.com/pub/devzone/epd/201150.vi ) works exactly as I want an 8.6 application to - but the property node used in the example is no longer supported.
    I can add/remove plots and resize the plot legend with 8.6 using the "LegNumRows" property however this property does not appear to behave the same way.
    It seems this should be straight forward but I must be missing something.
    Solved!
    Go to Solution.

    Hi again!
    I have implemented a method to shuffle the plots in the legend and was satisfied with one exception- the plot colors. This application allows the user to add or delete plots from the graph, adding a plot is easy as the new plot name gets appended to the next place on the legend and the number of rows grows by one. Deleting a plot is also quite easy but this action brought up a usability issue in that the existing plots that were shuffled on the legend would also shift their colorsaccordingly. To eliminate possible confusion I want to keep the correlation between existing plots and their assigned colors so I tried to use the plot color property to change the plot color programmatically with unexpected results.
    Programmatically changing a color from the "Plot Colors" array does not change the color of that plot if it is set to any of the "Common Plots" wih the exception of "Common Plot 0" - i.e. this doesn't seem to work for Bar Plots which is what I am using.
    I have attached a demo VI to illustrate this behavior - there are detailed free labels on the front panel which describe this in more detail.
    Regards and thank's in advance!
    Attachments:
    Plot color behavior.vi ‏27 KB

Maybe you are looking for

  • Maxdb 7.7.4 wont start ERR_WRONGDBSTATE Operational State UNKNOWN

    Hi, We are running maxdb 7.7.4 on a linux suse 10 environment. The system was shutdown the other week and we cannot get it to restart When we try and restart we get the following in the dbm.prt client connection was established at 2010-11-03 01:13:04

  • Flex Ant Task

    I am setting up Ant to compile my flex projects. When I use compc to compile my SWC library, I need a way to include all of my assets without naming them all in <include-file> tags. Is it possible to pass a directory or a pattern or a fileset? It is

  • My TV Shows Used to sort in Chronological order, but now???? Help.

    I have an entire series on my iPod, and it used to display in chronological order. Then I upgraded to the iPod Classic, and now they display in alphabetical order. The sub heading for each show reads, "no release date for this program", but there isn

  • Mac Pro HDD bay failure

    I have an early 2008 mac pro quad core 2.8, all was fine until i tried to install windows 7 on the drive in bay 3, I never got past formatting the drive, upon restart that drive did not mount and did not appear in disc utility, i had to remove place

  • Rose vs Select Enterprise vs Paradigm Plus vsObjectTeam?

    Which CASE Tool should one use? Is it true that Rational will not support any more Rose for Forte? Has any body used Select Enterprise for Forte v6.0? Any feedback, hints, suggestion or experiences? Thanks in advance, Nikola Filipovic To unsubscribe,