Legend, error bars, 2nd y axis etc

Hello all,
Measurement Studio is a powerful program. But it's graphing functions need improvement. As a scientific tool, for example, the lack of plotting error bars in CWGraph is unforgivable. And many other essential functions for producing decent graphs are missing. So I attempted to try to fill in some gaps. The attached program intends to do following:
1) Plots x- and y error bars.
2) Legends for data sets,
3) Graph saving,
4) Graph printing
Notes:
1)Error bars are not plotted symmetrically. They can be improved.
2)Legends can be improved by making them automatically located in the empty part of the plotting area. And the routine doesn't work well for the logarithmic scale.
3)Since the point sizes are tied to line size, it is impossible to use larger symbols without increasing the size of the lines!
4)y axis and the 2nd axis labels as rotated have terrible looking fonts.
5)When printing to a pdf file, filename can be automatically set to a default filename so that a dialog box can be avoided.
I hope the attached program is useful.
Sincerely,
Cem
P.S.
The program plots 5 data sets. 4 of which use left y-axis, the last one uses the right axis. Only y error bars are plotted. (x error bars optional). The legend text appears on the left upper corner. User can enable/disable legend, lines connecting data points, error bars, and grid lines. When log axis is chosen, the legend placement is screwed up.
Attachments:
plottest.zip ‏6 KB

Thanks for sharing this with us Girit. I'm sure this will help out alot of people on the forum.
For your legend, this document provides another way you might be able to create a legend and not have to deal with finding an empty place on the graph.
Thanks again
Bilal Durrani
NI

Similar Messages

  • XY Graph, 2D Error Bar, Legend, Multi Plot Help? Please modify the VI

    PLEASE READ THE ENTIRE POST and HELP!
    Please help with this VI and make it an instructive example for me and other novices like me who come across this typical example.
    A typical problem in plotting data is as follows: On the SAME plot (Y-axis = Amplitude vs. X-axis = Time), plot the curves Amp1, Amp2, Amp3, ... coming from sample1, sample2, sample3, ...
    Furthermore, there is Error1, Error2, Error3, ... associated with Amp1, Amp2, Amp3,...., which also needs to be plotted. In order to distinguish between these curves, one may use different
    colors and show a legend that reads Amp1 (say black), Amp2 (say red), and Amp3 (say green). The plot then becomes complete and conveys data very conveniently.
    The attached VI makes an attempt to plot Amp1 and Amp2 using XY Graph and also 2D Error Bar plot (to show error bars). There is one slight problem. The legend does not show what it is supposed
    to show. Can someone fix this? If I plot two curves, the legend should show Amp1 and Amp2, if I plot three curves, the legend should show Amp1, Amp2, Amp3, and so on.
    I don't want to see the default Plot 0, Plot 1, or whatever. Also, it would be nice to dynamically control the symbol, color, curve style etc, as we keep adding more and more curves to the plot.
    Once this problem is fixed, I know I can easily extend it to make it plot more than just two curves in a dynamic way. I could use for loops with shift registers, etc to plot any number of curves on a single plot.
    Believe me, I have searched for other posts and cannot find a simple example like the one I have posted here. Many examples I found have confused me more than helped me. 
    I believe that if this problem is solved in a simple way, many others will find this example very instructive. So by helping me, you help many other people as well!
    Thank you in advance. Please see the attached files (the VI, and an example data file that I just created)
    Solved!
    Go to Solution.
    Attachments:
    Multi_Plot_Legend_Error_Bar.vi ‏24 KB
    data.txt ‏2 KB

    Some members have pointed out that this problem has already been resolved (see the link below).
    http://forums.ni.com/t5/LabVIEW/Dinamically-handle-legend-names-using-property-nodes/td-p/1479572
    I did verify that this works for XY Graph, but not for 2D Error Plot.
    I need both legend and error bars. Shame on LabVIEW for not making such a basic plotting requirement easy and trasparent. 
    There are many clever people who can find work arounds, but that is a not a correct approach. 

  • LV 2009 error bar plots suggestions

    I have mentioned my mixed feelings about the new error bar plot introduced in 2009 on the info-labview list and have been asked to move this discussion to this forum.
    So there it goes:
    Introducing the possibility to natively display plots with error bars associated with each data point is a nice touch that brings LV one step closer to being a full-fledged data analysis and representation environment. However, the feature is limited in allowing only a single axis error bar (and on the Y axis only). This might come from NI's hardware bias (time recording of waveforms, in which the time axis does not have any "error" to it, being clock driven). Some of us use LV for a tad more than just recording waveforms and displaying them. We use complex instruments, process our data extensively, and when times come to plot a XY graph (and this is true for higher dimensionality data too), each coordinate (X, Y, etc) of each data point may be affected by a statistical or experimental uncertainty.
    In this kind of situation, each data point should be represented as a center point with two orthogonal error bars (with different sizes, and possibly, as offered in the new error plot, different plus and minus error bars). In most cases, the plus and minus error bars will be identical (representing the standard deviation of the data), so it would be advantageous to have an option that allows specifying that and avoid passing twice the same array of error bars to the plot formatting VI.
    Note that introducing this feature wouldautomatically bring up the request to have fitting algorithms that take this kind of dual axis error bar representation into account (which most data analysis software do nowaday).
    I hope this brief suggestion will be supported by other fellow LabViewers...
    X.

    All,
    These are great suggestions, and we always enjoy getting feedback from real-world situations where LabVIEW could help out more.  I really think this should be thrown on the LabVIEW Idea Exchange. Our development team looks over all the suggestions there, and it would have much more visibility than just being posted in this thread.
    Also, while you are there, be sure to vote on ideas that you like!  Some of the top ideas are so obvious, you will be surprised they weren't implemented already!
    Rob K
    Measurements Mechanical Engineer (C-Series, USB X-Series)
    National Instruments
    CompactRIO Developers Guide
    CompactRIO Out of the Box Video

  • Scatter Chart Error Bars Help

    I'm new to using iWork for my lab reports and today, while I was plotting a scatter chart, I had to put some error bars on the points in percentage form. The value for the x-axis was 0.5% and the value for they y-axis was 1.5%, and when I tried to input these, the only thing I got was the error sound and the error bars returning to 3% and 1% respectively. Anyone know why this is happening and how i might resolve this issue? Thank you in advance.

    Angelos,
    I'm sure that your eyes are sharper than mine. Still, if your error bar is shorter than the radius of your symbol, you aren't going to see it. The standard symbols are roughly 4mm in diameter, based on the Numbers Rulers. Let's say you have a 100 mm tall chart, an average graphic size. A 0.5% error bar would be a maximum of 0.5 mm in length, unless you suppress the axis zero, and would be hidden behind the 4 mm dia. data symbol. Yes, you could see a 3% or 4% error bar, but I'm not sure everyone would recognize that it was an error bar and not part of the data symbol.
    Regards,
    Jerry

  • How to put std dev error bars in a chart

    Page 141 of the Keynote User Guide states that error bars can be shown on plotted series data. Can anyone get this to work as expected with standard deviation bars for each plotted mean value? I spoke with an Apple Tech Rep today who supposedly knows Keynote well, but he could not get std dev error bars to display properly on a line chart.
    Numbers has the same instructions as Keynote and seems to be designed to work the same way.

    "Properly" means placing the error bars around the mean values for each data point in a series. In my case, the x-axis is time in minutes and the y-axis is concentration of a chemical.

  • How can I display different error bars for each point on a scatter graph?

    I have a scatter chart in Numbers and I need to add error bars to the points along both the x and y axes, however, the size of the error bars for each point need to be of different sizes. Is there a way to accomplish this or is there some kind of work around to acheieve a similar result? So far the only way I can find to add error bars only allows a standard amount for each point.

    I found the answer here https://discussions.apple.com/message/16440653#16441393

  • How to fix Syntax Error: Expected end of line, etc. but found end of script. in applescript?

    I am making an applescript for my modding tool for Minecraft. It used to use multiple apps and I am now trying to make one app for all the tasks.
    Here is the code:
    say "You are running iCraft version one point one for minecraft version 1.2.5"
    display dialog "Which tool do you want to use?" buttons {"Mod Installer", "Backup", "Restore"} default button 3
    set the button_pressed to the button returned of the result
    if the button_pressed is "Mod Installer" then
    do shell script "~/desktop/iCraft/iCraft.app/contents/re…
    display dialog "Insert all mod files into the Mods folder."
    display dialog "Have you inserted all Mod files into the Mods folder?" buttons {"Yes", "No"} default button 2
    if the button_pressed is "Yes" then
    do shell script "~/desktop/iCraft/iCraft.app/contents/re…
    display dialog "Finished"
    else
    display dialog "Insert mod files into the Mods folder and restart iCraft.app."
    end if
    if the button_pressed is "Backup" then
    display dialog "Are you sure you want to backup your Minecraft.jar in it's current state?" buttons {"Yes", "No"} default button 2
    if the button_pressed is "Yes" then
    do shell script "~/desktop/iCraft/iCraft.app/contents/re…
    display dialog "Finished, find it in your Backups directory in the iCraft folder"
    else
    display dialog "Backup aborted"
    end if
    if the button_pressed is "Restore" then
    display dialog "Are you sure you want to restore your Minecraft.jar with your backup?" buttons {"Yes", "No"} default button 2
    if the button_pressed is "Yes" then
    do shell script "~/desktop/iCraft/iCraft.app/resources/s…
    else
    display dialog "Restore aborted"
    end if
    end
    When I try to compile/run it gives me Syntax Error: Expected end of line, etc. but found end of script.

    Your script got mangled when pasting it into your message, but the main problem looks like you are missing a bunch of end if statements.  Unless your if statements are contained on one line, you need to terminate them with a matching end if statement - for example, the following are equivalent:
    if someString is "whatever" then display dialog "foo"
    if someString is "whatever" then
      display dialog "foo"
    end if

  • How do I activate AUTOMATIC superscripting for numbers / dates; e.g. 1st, 2nd, 3rd, 4th, etc .... It used to do this in all PRE-5.0 versions of Pages; now, it is GONE from Pages 5.0, and I cannot find out where / how to activate it !!

    How do I activate AUTOMATIC superscripting for numbers / dates; e.g. 1st, 2nd, 3rd, 4th, etc .... It used to do this in all PRE-5.0 versions of Pages; now, it is GONE from Pages 5.0, and I cannot find out where / how to activate it !!

    Whilst I appreciate your responding - I do not think this helps with what I was enquiring (at least not without further explanations anyways).
    I am aware of, and do use, the function - System Preferences > Keyboard > Text - for various replacements like (tm), (c), etc .... and also for fractions like 1/2, 1/4, 1/3.
    However, my question was in relation to SUPERSCRIPTS for dates / numbers - namely, superscripting numerical suffixes for things like 1st, 2nd, 3rd, 4th,
    So - please help - HOW do I set this up ? If indeed it is possible without System Preferences > Keyboard > Text ???

  • I accidently click for a full screen view on Firefox and now I can't undo it. My bar with tools, bookmarks, etc. is not visible. As the browser opens, the bar appears but then jumps up where it can't be reached. How do I turn off the full screen?

    I accidently clicked for a full screen view on Firefox and now I can't undo it. My bar with tools, bookmarks, etc. is not visible. As the browser opens, the bar appears but then jumps up where it can't be reached. How do I turn off the full screen without access to view options?

    Co-el, This wasn't possible as there wasn't a navigation bar available. The F11 did the trick though. Thanks for adding to the discussion.

  • SSRS 2008: how to show an empty chart with legend and x and y axis when no data available

    Hi,
    I am using SSRS 2008, I generated one chart in report designer with the data from Analysis Services (Cube).
    According to the dataset, there is no data returned when I run the query. so when I preview the chart, there is nothing but "no data available" showing on the chart.
    Here I want to know is there any possible to show an empty chart with legend and x and y axis?
    If it is possible, can you tell me how can I make it?
    Best Regards.
    Connie Zhu

    Hi,
    When there is no data, the chart displays the message "no data available". But using a little work around, you can display an empty chart.
    Please find the below steps given to achieve this
    1. Create a new dataset using TSQL to return 1 row of data having the category field and value field set to 0. Add the fields that are necessary for the category fields, series fields and datafields.
       A simple example would be like
       SELECT 'abc' as Category, 0 as Amount
    2. Add a new chart, set the category field to 'Category' and set the data field to Amount from above dataset created in step 1.
    3. In the new chart, right click the category axis and select axis properties, Click on the labels tab, check on
    'Hide axis labels' and then click ok
    4. Now set the Visibility property of both the charts depending on the rows returned from your main dataset
       a. click on your main chart and set its Hidden property to :
    =iif(CountRows("MainDataSet"),false,true) 
       b. click on the new blank chart added and set its Hidden proprety to (the opposite) :
    =iif(CountRows("MainDataSet"),true,false) 
       Note : Please change the dataset name in above expression "MainDataset" to the name of your chart's dataset
    5. Resize the new chart to the same size as your main chart, then position the new chart on the place as the main chart.
       (Note : You can set the position of new chart to be same by copying the location property from the main chart) 
    6. Now run and observe the result. When there are no rows returned by your main dataset, the new chart (the blank chart) should be displayed.
    I've added a working sample of this kind of a report
    here.
    Hope this helps. Please feel free to discuss if you have any questions.
    Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
    BH

  • Error bars in Numbers for iPad?

    Greetings,
    One of the reasons I purchased an iPad was to work on the go. For me this means being able to create/edit docs, spreadsheets, and presentations in my iPad and then sync that work with my MBP at work.
    I am finding some roadblocks when sharing work between devices (a first for me with Apple). 
    This specific question has to do with Numbers for the iPad:
    - Is there a way to add error bars within Numbers for the iPad?
    When I try to import a spreadsheet from Numbers in my computer the error bars get cropped as if they were some unnecessarily fancy font that didn't make it to the iPad version of the software. If there is no way to do this, does anyone know if there are plans to add this capability to the program?
    I might be biased, but I have a hard time coming up with occasions when one would not need to add a measure of variability (error bar) to any graphic dispplay of data (save for ninth grade presentations maybe).
    Thank you for your assistance!
    Andres

    Hi Andres,
    iWork for iOS applications are in version 1, and in general provide a subset of the features of the Mac OS versions. Few of the users in this (Numbers) community are familiar with the iPad version, which probably explains the lack of response to yur question in the nine hours since you posted.
    I expect you'll get a quicker (and more useful) response if you repost in the iWork for iOS area: https://discussions.apple.com/community/app_store/iwork_for_ios?view=discussions
    Regards,
    Barry

  • Error Bars in WAD Chart

    All:
    Can anyone tell me if it's possible to add Y Error Bars to a chart in the Web Application Designer v3.5?  I'm able to add a trendline to the data series, but do not see an option for error bars.
    Thanks in advance...
    KB

    Did you have get this issue resolved or answered?

  • Error bars in illustrator

    help!! I need to insert the standard deviation in a column graph created in illustrator...how can i do this?

    Plot the upper bound and lower bound error points as data sets in a line graph and then connect the dots.  Once errors bars are drawn in, remove the upper and lower bound data sets.
    L

  • Error bars in keynote

    Does anyone know how to manually insert individual error bars in a bar chart in keynote? the custom option is greyed out in keynote and when I tried it in Numbers I could only use the same value for all the columns rather than specify for each.
    Cheers

    Thanks for your reply; if this is the case then I must admit to being slightly disappointed. From looking at the Keynote tutorials I am aware that Keynote is not intended as an application through which to present scientific data, but because Apple usually include so many more useful features in their applications than Microsoft do (in my opinion), I thought they may have given us the option to add error bars to graphs and charts.

  • Error bars in Charts?

    Hello everyone- Would anyone know how to create error bars in charts in Keynote 3? I can't seem to find an answer anywhere to this question. Many thanks to future replies...
    Powerbook G4   Mac OS X (10.4.6)  

    You can't get Keynote charts to generate error bars, or to use error bar information from some other source -- that functionality just isn't available in natively-produced Keynote charts.
    However, charts that are copied from Excel and pasted into Keynote look quite good. You won't get all the cool textures, or 3D effects that you can with Keynote charts (and not having the latter is a good thing in my book). But, if you set the background of the chart to "None" from within Excel, the chart background will be transparent in Keynote, and you can do things like apply shadows that will conform to the chart elements. Any formatting that you do in Excel should be respected by Keynote.

Maybe you are looking for