Add plot to a graph

Hi everybody,
I first a plot on a waveform graph. I want then to add on the same graph a second plot (in my case an exponential who gives the enveloppe of my signal) as you can see in the image attached.
I cannot draw the first plot and then the second plot. The second plot erase the first one. I also try with active plot property but it doesn't seems to work.
I also attached a test VI
Can anyone help me?
thanks in advance
Message Edited by valais on 05-20-2008 07:02 AM
Attachments:
image2.JPG ‏19 KB
AddCurveGraph.vi ‏36 KB

Thanks for your answer Mike,
In fact I don't want to write both channels at the same time. Because in my case, the first plot is a measurement, and I want to draw the enveloppe after. The enveloppe is in an another case event. So the event are separeted.
I try to use active plot like that, but the result is only the second plot. I don't have anymore the first plot.
Any idea?
Message Edited by valais on 05-20-2008 07:21 AM
Attachments:
AddCurveGraph.vi ‏38 KB
image2.JPG ‏5 KB

Similar Messages

  • Add plots to digital waveform graph programmatically

    Hi Guys,
                This might be an easy one but I can't seem to find the right property. I'm adding "Plot Name" values for a each Plot in a Digital Waveform Graph. I select each plot with "Active Plot" property and name it. However if there are already e.g. 7 plots and I try to set eight plot active (i.e. 7 = Active Plot) I get an error cause this eight plot doesn't exist on the graph, and so can't be named.
        How can I add (or indeed remove) plots using property nodes?
        Thanks

    Hello,
    One thing to consider is the actual data the graph is receiving.  Choosing plot 8 in this case is perhaps attempting to choose a plot which doesn't exist in the data, which could be why you're seeing the error.
    Off the cuff, one thought might be to have the following "steps" take place when you want to add plots:
    on the appropriate action to create a plot, create a default data set representing that plot
    package that with your overall graph data so that the new plot exists in the data
    write that data to the graph, perhaps using the Value Signaling property (via a property node linked to the Graph)
    trap the graph's Value Change event using an event structure (possibly in a parallel loop) and update the plot name there (much like you are today - using a property node to first set the active plot to <previous value + 1> since you just added a plot, and then set your new plot name)
    Not sure what the rest of your application looks like, but hope this helps!
    Best,
    JLS
    Sixclear

  • Ploting new plot in xy graph on button click

    hi all experts
    i need your help.
    i want to plot multiple graph, on a single xy graph
    i want -->if user want to plot a new plot
    user will place new button,give value of parameter using control,do needed operation .
    then press button name as plot.
    on button click user must see all previous and new plot.

    Hello,
    Joe is right, you will need to use build array to add plots to the previous one. Specifically, you can refer to the XY Graph.vi which demonstrates a couple different methods for graphing multiple plots to an XY Graph.
    Regards,
    Jyoti F.
    National Instruments
    Attachments:
    XY_Graph.vi ‏49 KB

  • How to let the user define the colors for each plots in the graph (I use LabVIEW 7)?

    How to let the user define the colors for each plots in the graph (I
    use LabVIEW 7)?

    Hi,
    Take a look at this example, it uses property nodes to select tha
    active plot and then changes the color of that plot.
    If you want to make the number of plots dynamic you could use a for
    loop and an array of color boxes.
    I hope this helps.
    Regards,
    Juan Carlos
    N.I.
    Attachments:
    Changing_plot_color.vi ‏38 KB

  • Labeling Variable Number of Plots on a Graph?

    I'm loading up an unknown number of files and graphing them. Since it can get a bit confusing, I'd like to be able to take a portion of the file name and label each plot on my graph. Since there is a variable number of graphs, I can't seem to work around how to wire the property node. There are several other things I'd like to do with the graph, but dont know if its possible or not such as having a label pop up if your cursor is over a plot.

    You are going to have to embed the reference node for the graph into a for-loop like the attached example. File names or portions thereof are built as strings and then added into the property node Plot>>Plot Name.
    I'm not sure about how to get a label to pop up if you are over the plot. You might be able to do it with some cursors and associated code.
    Attachments:
    Graph-Names.vi ‏20 KB

  • Read from spreadshee​t and plot multiple XY graph

    I'm trying to read a text file using the "Read from Spreadsheet" function. Next I want to plot the data in it on a single XY Graph.
    The text file contains 4 coloums and the first coloumn is X axis and rest are for Y axis. I'm not able to get the multiple plots. 
    However, I could get it to plot when only a single graph is to be plotted(only 2 coloumn in file). I've attached my VI and a picture here.
    I need help in plotting multiple XY graph from the text file with the 4 coloumns.
    Solved!
    Go to Solution.
    Attachments:
    Test_1.vi ‏13 KB

    Here's a more scalable solution, useful if you have one x and many y columns.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    MultiXY.png ‏5 KB
    MultiXY.vi ‏10 KB

  • Problem Plotting a Line Graph

    I am trying to plot some line graphs on Numbers and am a new user.
    I can't seem to work out an issue. I want the numbers on the X axis to ascend from 0 onwards from left to right but at the moment they are descending from 10 to 0 left to right.
    How can I change this so the graph is plotted logically?
    Thanks in advance

    There are two basic types of X-Y charts.  All but one are "category" charts where the X axis is evenly spaced and the "numbers" are actually text. The data will be presented in the order listed in your table.  The other is a scatter chart. The icon for this chart looks like a shotgun blast.
    If your X axis numbers are evenly spaced (0,1,2,3...) you can use either type of chart.  Sort your table in ascending order and it will chart as you want it to.
    If your X axis numbers are not evenly spaced (such as 1,2,4,5,10) and you want the chart to be a true X-Y plot of the data, you have to use the scatter chart.  In contrast to the category charts where the X axis values must be in a header column/row, a scatter chart requires the X and Y data to be in data cells. You may have to move your data over a column so the X data is not in a header column.

  • Do you know a VI or a mean to remove plots from a graph?

    I'd like to remove plots from a graph and i know their
    x-cordinate do you know a VI or a mean to remove them?
    Thank you for yours answers.

    A graph is just a display of different points in graphical form. You can actually get the points out of the graph, remove the points of the plot you want to take out from the array, and put it back into the graph.
    Another way I've done it is to use the property nodes, and make the color of the line on the graph transparent. That way, the data is still there, but the plot is invisible.
    Mark

  • Two plots on one graph....

    Hi
    I am running a project where I need to follow a plot on a graph. Currently both the plots are being plotted on the graph at the same time (i am using a waveform chart) so it is hard to follow as I have to anticipate where it will be next.What i would like to do is have the plot I want to follow already displayed on the graph and then as I run the VI the new plot is written in real time.
    Is this possible?

    Here's what I had in mind (LabVIEW 8.2)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    IncrementalPlots.vi ‏14 KB

  • How to plot a log graph using grapher with a given set of data

    hi there,
    im just wondering is it possible to plot a log graph in the grapher software with a given set of data, and also give an error bar and a best-fit line for it?
    so here is the set of data,
    Concentration of BCh (M)
    Mean % Specific Binding (%)
    Standard Deviation
    3 ×10⁻⁹
    71.52
    9.52
    1 ×10⁻⁸
    57.30
    8.56
    3 ×10⁻⁸
    39.15
    9.40
    1 ×10⁻⁷
    24.13
    10.15
    3 ×10⁻⁷
    14.77
    3.31
    1 ×10⁻⁶
    7.22
    2.02
    hope someone could help

    Try these:
    http://y.barois.free.fr/grapher/Bienvenue.html
    http://homepage.mac.com/tlindywizdumb/math/Grapher_index.htm
    http://homepage.mac.com/tlindywizdumb/math/Grapher/Grapher_HowTo.pdf

  • How to build query to give daily balance across bank accounts? (to then plot in a graph)

    How would one build a query to give daily balance across bank accounts? (to then plot in a graph)
    Assumptions:
    * There is a table TRANSACTIONS which includes columns TRANS_DATE, AMOUNT and BANK_ID. It does NOT include a column for balance. So current balance for a bank account is the sum of the AMOUNTs for that BANK_ID for example. Balance on date XX will be the sum
    of all AMOUNTS for that BANK_ID for all TRANS_DATE's prior and including the date XX.
    * There is not necessarily transactions on every day for each bank
    * Table BANKS which has BANK_ID and TITLE
    Would like a query that gives: Supply StartDate and EndDate for the query:
    Date Bank1Balance Bank2Balance Bank3Balance TotalBalance
    1/1/15 $100 $200 $100 $400
    1/2/15 $200 $200 $100 $500
    etc

    You'll find examples of queries for computing balances in various contexts in Balances.zip in my public databases folder at:
    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169
    If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.
    The queries in this little demo file return balances per transaction, however, whereas you appear to wish to return balances at close of business per day.  This can easily be done by means of a subquery which sums all transactions to date.  To return
    balances for all dates regardless of whether or not any transactions have been undertaken on the day, an auxiliary calendar table can be introduced into the database to plug the gaps,  The Calendar.zip file in my same OneDrive folder has means of generating
    such a table.
    With the introduction of an auxiliary calendar table into the database a query can then be written to return the balance per customer at close of business per day over the period 2009 - 2012 covered by the data in the Transactions table:
    SELECT CustomerID, Firstname, LastName, calDate,
       (SELECT SUM(TransactionAmount)
         FROM Transactions
         WHERE Transactions.CustomerID = Customers.CustomerID
         AND Transactions.TransactionDate <= Calendar.calDate) AS Balance
    FROM Calendar,Customers
    WHERE calDate BETWEEN #2009-01-01# AND #2012-12-31#
    ORDER BY CustomerID, CalDate;
    Rows for each customer/date are returned by means of the Cartesian product of the Calendar and Customers tables (the latter analogous to your Banks table), and the subquery returns the balance at close of each day by correlating the Transactions table with
    the Customers and Calendar tables, returning the sum of all transactions per customer up to and including the date in question.  In this example credit and debit transactions are expressed as positive and negative values in a single column of course,
    but where separate credit and debit columns are used its merely a case of summing (Credit-Debit), as done in some of the examples in my demo.
    To return the data in a horizontal format per date I'd suggest the use of a report which returns one row per date, and within it a multi-column subreport in across-then down column layout, linking the subreport to the parent report on the date columns.
    Ken Sheridan, Stafford, England

  • Plotting on Log graph

    Good Day,
    I am plotting a semilog graph displayed on the front panel of my program.
    The unit on the x-axis is in frequency(Hz) and the y-axis is in dBc/Hz
    I wanted to program in such a way that the a straight line is plot between points at 10,100,1K,10K and 100KHz.That is to say I only need to key in 5 values.
    My plot now jumps back to zero as all the values set to zero by default when i do not enter value into each array cell. I hope someone out there has solution to this.
    Thank you.
    Regards,
    Daniel
    Attachments:
    Plot Result.GIF ‏37 KB

    You probably want to use an xy-graph. This way you can graph arbitrarily spaced points.
    (If you want to use a waveform graph, you must generate interpolated values for all intermediary array elements).
    LabVIEW Champion . Do more with less code and in less time .

  • Multiple plots in one graph (LabVIEW to Excel)

    Hi All-
    Reference this initial discussion: https://forums.ni.com/t5/LabVIEW/Place-Multiple-Data-Sets-on-One-Graph-LabVIEW-to-Excel/td-p/2164380
    Problem description: Generated multiple 2D arrays with different x-axis and y-axis values cannot be placed into ONE excel graph (looking for LabVIEW solution). 
    We tried several options.  1) Coercing the data to have the same x-axis works in the sense that I get a graph (of the multiple data sets) but the graph is bogus since the x-values are different enough that the graph isn't correct.  (This was suggested in the referenced post).  The x-values are output power and y-values are efficiency.  2) We can feed the x-values and y-values into a bundle element and wire the output into a waveform graph element which works great but again the output needs to be fed into excel.  (also suggested by the reference post).  3) Lastly, we tried using the Excel Update Graph.vi but unfortunately we were only able to plot the last data set because it looks like the graph gets updated on each loop run and ultimately we only get the last data set.  4) As a final effort we tried looking into the sub.vi but that didn't get us any closer to x-values and y-values plotted in excel with LabVIEW generated data.
    Any suggestions?
    Thanks! 

    Hi,
    You attempted to invoke nodes? Add a  invoke node of the waveform graph, so this add data to excel. There are several types of  invoke  nodes that can be used, such as  invoke node "Export data to Excel" or the invoke node "Export data to excel Plot".
    Regards
    Hector
    Attachments:
    Export Data to excel from a waveform.vi ‏34 KB

  • Plot a 2D Graph as Date being on X-Axis

    hi all,
    I'm a quite a new bee to Java 2D an would like to know if there are any possibilities to plot a graph in java 2D with X Axis representing Date.
    I would need a graph somewhat like
    Y
    |_____
    | _______
    |
    |_____
    |
    |________________________ X Axis = Date ->
    I have to plot a graph which has a Blocks (consisting of Start & end Dates).
    So my graph looks like as shown above and starting point of my graph being the start date of Block & End point being End Date respectively.
    Any help in this regard will be highly appreciable.
    Thanx
    Ati

    import java.awt.*;
    import java.awt.font.*;
    import java.awt.geom.*;
    import java.text.*;
    import java.util.*;
    import javax.swing.*;
    public class PlottingData extends JPanel {
        int[] xVals;
        int[] yVals;
        final int MIN = 50;
        final int MAX = 100;
        final int PAD = 25;
        public PlottingData() {
            // Create a couple of "dates".
            Calendar start = Calendar.getInstance();
            start.setTime(new Date());
            Calendar end = Calendar.getInstance();
            end.setTime(start.getTime());
            end.add(Calendar.DAY_OF_MONTH, 16);
            DateFormat df = new SimpleDateFormat("dd MMM");
            System.out.printf("start = %s  end = %s%n",
                               df.format(start.getTime()),
                               df.format(end.getTime()));
            // Calculate the number of days in between.
            Date difference = new Date(end.getTime().getTime() -
                                       start.getTime().getTime());
            Calendar c = Calendar.getInstance();
            c.setTime(difference);
            int days = c.get(Calendar.DAY_OF_MONTH);
            System.out.println("days = " + days);
            // Instantiate xVals.
            xVals = new int[days];
            // Prepare to count from start to end in days.
            int startDay = start.get(Calendar.DAY_OF_MONTH);
            int endDay = end.get(Calendar.DAY_OF_MONTH);
            Calendar counter = Calendar.getInstance();
            counter.setTime(start.getTime());
            // Initialize elements of xVals array.
            for(int j = 0; j < days; j++) {
                counter.add(Calendar.DAY_OF_MONTH, 1);
                xVals[j] = counter.get(Calendar.DAY_OF_MONTH);
            //System.out.printf("xVals = %s%n", Arrays.toString(xVals));
            // Instantiate yVals array and initialize its elements.
            yVals = new int[days];
            Random seed = new Random();
            for(int j = 0; j < yVals.length; j++) {
                yVals[j] = MIN + seed.nextInt(MAX-MIN+1);  // [50 - 100]
            //System.out.printf("yVals = %s%n", Arrays.toString(yVals));
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            int w = getWidth();
            int h = getHeight();
            double xInc = (double)(w - 2*PAD)/(xVals.length-1);
            double yInc = (double)(h - 2*PAD)/(MAX - MIN);
            //System.out.printf("xInc = %.1f  yInc = %.1f%n", xInc, yInc);
            // Origin of graph:
            double x0 = PAD;
            double y0 = h-PAD;
            // Draw ordinate.
            g2.draw(new Line2D.Double(PAD, PAD, PAD, h-PAD));
            // Draw tick marks.
            for(int j = MAX-MIN; j >= 0; j -= 10) {
                double y = y0 - j*yInc;
                g2.draw(new Line2D.Double(x0, y, x0-2, y));
            // Label ordinate.
            Font font = g2.getFont();
            FontRenderContext frc = g2.getFontRenderContext();
            LineMetrics lm = font.getLineMetrics("0", frc);
            float height = lm.getAscent() + lm.getDescent();
            for(int j = 0; j <= MAX-MIN; j += 10) {
                String s = String.valueOf(j+MIN);
                float width = (float)font.getStringBounds(s, frc).getWidth();
                float x = (PAD - width)/2;
                float y = (float)(y0 - j*yInc + lm.getDescent());
                g2.drawString(s, x, y);
            // Draw abcissa.
            g2.draw(new Line2D.Double(PAD, h-PAD, w-PAD, h-PAD));
            // Draw tick marks.
            for(int j = 0; j < xVals.length; j++) {
                double x = PAD + j*xInc;
                g2.draw(new Line2D.Double(x, y0, x, y0+2.0));
            // Label abcissa with xVals.
            float sy = h - PAD + (PAD + height)/2 - lm.getDescent();
            for(int j = 0; j < xVals.length; j++) {
                String s = String.valueOf(xVals[j]);
                float width = (float)font.getStringBounds(s, frc).getWidth();
                float x = (float)(PAD + j*xInc - width/2);
                g2.drawString(s, x, sy);
            // Plot data.
            g2.setPaint(Color.red);
            for(int j = 0; j < yVals.length; j++) {
                double x = x0 + j*xInc;
                double y = y0 - (yVals[j] - MIN)*yInc;
                g2.fill(new Ellipse2D.Double(x-1.5, y-1.5, 4, 4));
        public static void main(String[] args) {
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.add(new PlottingData());
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    }

  • Programmatically add multiple scales to graph

    On the front panel, I can choose "duplicate scale" "delete scale" to add/remove multiple scales a Graph control.  Can I do this programmatically,i.e., use the VI to adjust the number of scales on the graph?  The purpose is to have variable number of plots on the same graph, each having a different scale.

    I use this: Add the maximum number of needed scales per hand. You can swap sides to get a better look.
    To switch on/off a scale use the property "Active Y Scale" to select the scale and "yscale.visible" to switch on/off.
    I've written a small demo.  I hope it's usefull.
    Attachments:
    add_multiple_scales_to_graph.vi ‏24 KB

Maybe you are looking for

  • How to go about requesting an RMA to exchange an incorrect MagSafe charger

    Obviously the correct answer is contacting customer support, though specifically I'd rather do it via E-mail. The only options I see are calling them, and current transportations issues are preventing me from visiting an apple store. Also, I'm not su

  • 10.9.3 DIsk Permissions need fixing constantly

    I am running 10.9.3 on an imac. I have to repair the disk permission several times a day. How I know they are needing repair is the computer's performance becomes significantly impaired.

  • PO Info Record scales

    Hi sapians, We have created scale based info records for   material  A  and vendor B such as: quantity          price 0-100               10 per unit 100-200             9 per unit and open a PO for vendor B like : item 1 : material A   quantity 50 i

  • RFC Adapter details

    hello everybody, i want to know in detail about the RFC Adapter. i have already gone through the docs in http://help.sap.com and basic RFC concepts. Now have to understand the architecture as well as the code.Hope somebody helps me out in this. Thank

  • Accessing Proxy Settings

    Hi, I am trying to access user's proxy settings in my signed JApplet, but can't find any information about that in documentation. Can someone point me somewhere? I need them because I use Sockets in my program. Thank you, Dmitri