Plot Legends on CWGraph

I have a graph I am doing with 4 plots in different colors. I would
like to put a legend on the graph indicating which axis is associated
with which plot. It would also be nice of the legend printed when I
printed the graph. I can't find any properties or methods in CWGraph
or its objects that will let me put a legend on the graph.
I thought of creating an image for the plot area but it seemed an
awful lot like a kludge to do that.
Anyone know how to create legends for CWGraph?
Lee Robinson
Agility, Inc.

You might try experimenting with the 'Value Pairs' tab of the graph properties.
This will allow you to position a text string along any axis. Spaces behind
the text will help move it away from the axis, too. You could programatically
control these value pairs with something like
CWGraph1.Axes(2).ValuePairs(1).Name = "text string"
Unfortunately, I don't see any way to change the Name string font, size,
color, include any graphic symbols, or make it look like an MSChart legend.
Dave
"Lee Robinson" wrote:
>I have a graph I am doing with 4 plots in different colors. I would>like
to put a legend on the graph indicating which axis is associated>with which
plot. It would also be nice of the legend printed when I>printed the graph.
I can'
t find any properties or methods in CWGraph>or its objects that will
let me put a legend on the graph.>>I thought of creating an image for the
plot area but it seemed an>awful lot like a kludge to do that.>>Anyone know
how to create legends for CWGraph?>>Lee Robinson>Agility, Inc.>

Similar Messages

  • How can I limit the vertical size of the plot legend?

    Hi all,
    in my program I use a waveform graph and its plot legend.
    My problem is that the vertical size of the plot legend increases out of my frame and screen if I add too many plots to the graph!!!!
    Is there a possibilty to limit the vertical size of the plot legend and/or to use a vertical scrollbar in the plot legend?
    I use LV 8.2.1 .
    Thanks
    daHans

    You can write to the "Active Plot" property node. The example given in the thread I linked to before shows using this. Did you take a look at that example?
    I'm only suggesting the alternative of an "Active Plot" control if you're trying to give the user the ability to manipulate one of the plots (like color, point style, etc). If you have a lot of plots, and the plot legend is too big, you can provide a numeric control where the user selects the plot, and then additional controls to set the properties for that plot. Not as intuitive as the plot legend, but if that's what you've gotta do, that's what you've gotta do. Attached is a simple example (LabVIEW 8.20).
    Attachments:
    plot.vi ‏21 KB

  • 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

  • Programmatically formatting the active plot and plot legend

    I am monitoring 6 production sequences on an XY graph. A ring control selects which sequence I show on the graph. For each sequence I have tag data showing the "actuals" and tag data showing the "averages" and a boolean toggle switch controls which of these plots I show on the graph. I am having trouble controlling the formatting of the plots (both actuals and averages are currently shown in white) and the plot legend is wrong. I have tried programming my vi to format my plots using a property node from the XY graph and writing to the correct plot inputs, however it doesn’t seem to be working. I would also like the plot legend to show ONLY the active plot on the XY graph.
    I would like a red continuous line for the averages and blue square scatter points for my actuals. I can’t seem to get this at all. I have attached my vi if anyone can help?
    Many thanks for taking the time to help,
    Best regards,
    Stuart
    Attachments:
    Historical Handling Time Trends.vi ‏137 KB

    Hi Stuart
    Maybe this helps you.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...
    Attachments:
    Plots.vi ‏65 KB

  • Start position on plot legend scrollbar

    If I right click on the plot legend I can show the index display and vertical scrollbar. When I move the scrollbar the index changes accordingly. Does anyone know how to programmatically find the value of this index so that I know which plot labels the user sees. I've tried looking at the property node but I can't see anything that gives me what I need.

    Thanks for your reply Rob.
    I was thinking that was the case. Sometimes it’s possible that there are clever little tricks hidden away in the set up screens. I’ve ended up now with my old method which looks very clumsy (see attached vi), I can make it look much better when I get the scroll bar position.
    I’ll follow up on the product suggestion though as it would be a very useful feature.
    Attachments:
    Scrollbar Demo.vi ‏52 KB

  • 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

  • Strange Fonts in labview graph's plot legend.

    Hello All,
        I am running labview 7.1 on a Windows XP machine and
    the default and only language is English (US). Verified this under
    Control Panel > Regional Settings.
        When I run a VI, I get strange fonts in the plot
    legend. They keep updating as the VI runs. Here is a screen shot of the
    plot legend:
    I change the font to something I can read, save the VI and run it again
    and it automatically changes to this unreadable font again. Any ideas
    on what I can do? Thanks.
    KB

    Is it just the font that is off, or are these actually non-printable characters?
    Are you graphing e.g. dynamic data types? Do you possibly have weird names for your signals?
    LabVIEW Champion . Do more with less code and in less time .

  • Plots legend arrangement

    Hi all,
    I am design my software front panel.  I have a problem about plots legend. The defaut arrangement is in vertical direction as attachment shown. I want to arrange the plots legend in horizontal direction. I searched  Labview help and did not find the solution. Would you give me some clue? Thanks in advance!
    Lang.D
    帖子被Mechtest在 03-03-2010 07:09 PM
    时编辑过了
    Solved!
    Go to Solution.
    Attachments:
    Plot legend.png ‏5 KB

    Placae the Graph or chart on the front panel and then pull the plot legend horizontally....(when you click on the plot legend and drag the highlighted part of the legend horizontally so that multiple plot legends can be seen.Pull them vertically if you want to see them in vertical position)
    Guru
    Regards
    Guru (CLA)

  • Plot legend customization bug in 8.5?

    If someone can confirm this for me, I would appreciate it.
    I have 2 issues which I think may be based on the same problem:
    1.  Take the attached control and insert into a LV 7.1 - 8.2 VI.  The plot legend should have the system box instead of the 3D decoration.  Insert the same control into 8.5.  It changes back to the default 3D decoration.  This doesn't appear to happen all the time, as this control properly inserts itself into 8.5.
    2.  The customization of the plot legend is not working properly.  Take any of the attached controls, or use a standard Waveform Graph.  Customize it.  Go into customize mode.  8.5 has taken away the old method where you can simply right click on a decoration of a sub-control and replace it.  But, you can select the sub-control and go to Edit->Customize Control, then replace the decoration.  You can see this works with the Cursor list and axes list.  However, when you select the plot legend, and go to Edit->Customize, LV doesn't do anything.  No error beep, no nothing.  So the plot legend cannot be customized.  I see this behavior for charts, grpahs, and XY plots.
    Message Edited by Matthew Kelton on 11-05-2007 02:47 PM
    Attachments:
    Waveform Graph lost plot legend customization.ctl ‏26 KB
    Waveform Graph kept plot legend customization.ctl ‏12 KB

    OK, I will post more pictures.
    So, I try to customize the standard waveform graph in LV, but right-clicking on the plot and select Advanced-> Customize or Edit->Customize Control form the menu.  Go into Customize mode.
    In 8.2 and before, you used to be able to just right-click on the decoration for the plot legend and replace it with something from the clipboard, etc.
    In 8.5, this functionality has been removed.
    However, you can select the item and go to Edit->Customize Control (I show it here for the cursor legend, as it works).  You get a new control window.
    (Continued in next post)
    Message Edited by Matthew Kelton on 11-06-2007 03:23 PM
    Attachments:
    cursors customize.png ‏15 KB
    customize dec 8.2.png ‏12 KB
    customize dec 8.5.png ‏11 KB

  • Disabled item in plot legend when scrollbar is visible

    Problem is that plot legend shows only the plots being displayed correctly, while plot legend scrollbar is not being displayed, which is being controlled using LegPlotMin and LegNumRows properties. But when plot legend scrollbar is enabled (when number of plots exceed a certain number) then one disabled item (already being displayed in the enabled item above it) becomes visible. How to not show it while plot legend scrollbar is visible?
    Second question. If plot legend scrollbar is visible and the user has scrolled it to the bottom and left it there and then selects options where the number of plots are less than a certain threshold and the scrollbar is set to invisible, using property node; then the only lower disabled plot names are shown. So how do I set the scroll position for plot legend scrollbar. I could not find any scroll position property for plot legend scrollbar.
    Thanks

    It is true that you cannot set the index of the topmost displayed plot in a plot legend. It's a missing property! To accommodate long legends, I have used two graphs, one hidden behind the other. Both receive all the data, and their two legends are aligned side by side. In fact, I wrote a routine to align legends of stacked plots, which I've attached here for you. Maybe you'll find it useful!
    Attachments:
    align legends.llb ‏144 KB

  • What's this crap on my plot legend? And; how to get rid of it?

    Forgive the lack of a technical term; but what's the crap (shading/vertical lines) added to the mini-plot previews on the Plot Legend on this XY Graph in LV2012 SP1?
    And how do i get rid of it to make it look more like the original (e.g., just a solid color background)?
    I would normally specifcally identify these parts by name; yet it appears these parts have no name:
    a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"] {color: black;} a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"]:after {content: '';} .jrd-sig {height: 80px; overflow: visible;} .jrd-sig-deploy {float:left; opacity:0.2;} .jrd-sig-img {float:right; opacity:0.2;} .jrd-sig-img:hover {opacity:0.8;} .jrd-sig-deploy:hover {opacity:0.8;}

    Figured it out: it's from setting the Plot Area:Colors:BG Color property to Transparent. Changing this to a solid color likewise changes the preview to a solid color.
    Bonus points: who can describe those design elements that appear when plot area is transparent? This is not a trick question; i don't know the answer, and am curious.
    a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"] {color: black;} a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"]:after {content: '';} .jrd-sig {height: 80px; overflow: visible;} .jrd-sig-deploy {float:left; opacity:0.2;} .jrd-sig-img {float:right; opacity:0.2;} .jrd-sig-img:hover {opacity:0.8;} .jrd-sig-deploy:hover {opacity:0.8;}

  • Size of plot legend graphics

    After trying to resize the plot legend of a waveform graph with the mouse, the small graphics showing the color and other plot properties suddenly got much longer, and the plot text was no longer left aligned. Tried to modify the legend programatically with a property node, setting ActPlot, LegWidth etc, but it doesn`t work the way I expected. The attached picture show an example of the problem. I want to resize the legend so it get a width the same as the outer bounds of the graph, the text should be left aligned, and the graphics stay small and right aligned. I`m using LV 2009.
    Spoiler (Highlight to read)
    Attachments:
    graph-legend.JPG ‏66 KB

    Gunnar,
    You can basically get the sizes and alignations correct by customizing the Plot Legend. Select first the waveform graph itself -> Edit: Customize Control. After that select the first row (See Picture) from the Plot Legend and do the same -> Edit: Customize Control. Now you can type in the long plot name and move the graphics part to the right. Press "Apply changes" often to check if the Legend and its elements are in right place. Finally replace the original control with the customized control.
    I hope this helps. A bit tricky to explain, but by playing with the customizing tool I'm sure you will get the idea soon.
    Cheers,
    Cerati
    P.S. I noticed that it is in fact easier to write the plot names first directly to the legend and then use the customizing tool for the plot row to move the graphics to the right.
    Attachments:
    Customize plot legend.jpg ‏73 KB

  • Horizontal scrollbar for plot legend

    Hello,
    The plots in my plot legend for a graph can have quite long names so it would be great having a horizontal scrollbar.
    Quote from here
    >>To add a scroll bar to a plot legend, right-click the plot legend and select Visible Items»Horizontal Scrollbar or Visible Items»Vertical Scrollbar from the shortcut menu.
    I can see the entry horizontal scrollbar, but it is always grayed out, what's wrong?
    Thanks a lot for your help!
    Cheers,
    Rico

    I think you are misinterpreting the use of the scrollbar.  If you have a lot of plots on your graph, then you can use the scrollabr to not show all the plots at once and this allows you to scroll through the list.  It does not allow you to make the plot legend smaller to hide long names and scoll across.
    So, if you resize the plot to be horizontal, then you can display the horizontal scrollbar:
    If you resize it vertically, then you can display the vertical scrollbar:
    Message Edited by Matthew Kelton on 05-09-2008 12:09 PM
    Attachments:
    Plot legend horizontal.png ‏2 KB
    Plot legend vertical.png ‏2 KB

  • Programmatically expanding label space in Plot Legends

    I know that manually expanding the Plot legend with the left corners expands the label area. How do I do the same thing programmatically? Changing the width property seems to add space to the right side.

    According to the Help File entries for those properties the size properties expand or contract from the right side. 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

  • Why do waveforms show garbage in the plot legend and why is no one mentioning this?

    I have tried this on multiple machines and the result is the same. The plot legend expands and shrinks with garbage characters each time the waveform is updated.
    Sometimes the plot legend expands to as many as 100 garbage characters (or more). Is NI aware of this?

    Hi Ben
    Ok I managed to get a small enough version of it to zip it up and show what happens. I hope the demo is intact enough to show the plot legend.
    just run the VI "0_bloat-OVEN.vi"
    It uses a simulation file for the waveform but if u have a DAQ bd just uncheck the "Simulate DAQ bd?" button.
    Ive seen this on 3 machines now WIn 98 WIn XP and Win2K.
    Attachments:
    WF-PlotLegend.zip ‏778 KB

Maybe you are looking for

  • Do I need to download Mini Display Port to VGA update?

    I want to be able to watch movies from the MBP on the TV.  (Panasonic 32" about 5 years old).  Air Play doesn't work through the ATV, the stream is erratic and unwatchable.  Both HDMI ports are in use for other things.  So I got a Mini Display Port t

  • How do I clear unread messages in mail?

    They're all read, but still shows unread messages on my home page. It's very frustrating!!

  • Problem Report for Mac OS X Kernel

    Twice within half an hour I had a message I've never seen before telling me to shut down my MacBook by pressing the power key down for a few seconds.  The message took up the whole screen, I couldn't escape from it and when I did as it said, my compu

  • Relevant for billing and pricing

    Hi All, In the config for item category. There are two settings, one is "relevant for billing" and other is "pricing". what is the difference bewteen the two.... since if i enable relevant for billing, it automatically means the pricing will happen s

  • InDesign CS3 Print Presets

    Have a print preset that creates a PDF w/thumbnails, used successfully in CS2, which put the PDF file on the desktop. Loaded all our print presets into CS3, looks like file was created, but cannot for the life of me figure out where the file went! Lo