How can I plot  a graph in sections???

Hi
This is what I am trying to do:
I have a graph class that uses a double array to plot.. surprisingly a graph. The problem is that the file that I am plotting from is too large to display all of its data at once on the screen.
What I am trying to do is have a forward and back button that will allow you to display a fixed chunk of data at a time.
Also does anybody know how to clone a double array????
Any help would be great...
Cheers...........

Read the file.
Write a funtion to return all values from
starting from start to end like
public double[] getData(int start, int end)
Use the charting tool to plot only the current set of
values.. Change the start and end parameters according to
what the user wants.. (forward or backward)
Try JFreechart... Its an excellent charting tool..

Similar Messages

  • How can I get my graph to plot vs. my data points instead of vs. time?

    how can I get my graph to plot vs. my data points instead of vs. time?

    Maybe you could exaplin in a few more words what "my data" is. Are the values equally or randomly spaced?
    If they are equally spaced, just adjust offset and multiplier, and axis label.
    If they are randomly spaced you are probably looking for an X-Y graph. Check the shipping examples.
    LabVIEW Champion . Do more with less code and in less time .

  • How do I plot bar graph using MStudio.NE​T for VB

    I can not find the FillToBase property in waveformplot object using MStudio 7.0 for VB.NET. How can I plot the bar graph like that in Mstudio 6.0.

    The Measurement Studio .NET WaveformPlot does not currently have an equivalent for CWPlot's FillToBase property. In the meantime, though, you can use the WaveformPlot's custom drawing services to emulate this functionality. For example, if you dropped a new WaveformGraph on a form, you could copy and paste the following code to draw bar graphs on the WaveformPlot:
    Private Sub OnBeforeDrawPlot(ByVal sender As Object, ByVal e As BeforeDrawXYPlotEventArgs) Handles WaveformPlot1.BeforeDraw
    DrawBarGraph(e, 0, Color.BurlyWood, Color.Firebrick)
    End Sub
    Shared Sub DrawBarGraph(ByVal e As BeforeDrawXYPlotEventArgs, ByVal baseYValue As Double, ByVal outlineColor As Color, ByVal fillColor As Color)
    Dim plot As XYPlot = e.Plot
    Dim g As Graphics = e.Graphics
    If plot.HistoryCount > 0 Then
    ' Clip the data to just what will be drawn with the current axis ranges.
    Dim xData() As Double, yData() As Double
    plot.ClipData(xData, yData)
    ' Calculate the screen coordinates of a base y value and the clipped data.
    Dim baseY As Double = CType(plot.MapPoint(e.Bounds, 0, baseYValue).Y, Double)
    Dim points As PointF() = plot.MapData(e.Bounds, xData, yData, False)
    Dim outlinePen As Pen = Nothing
    Dim fillBrush As Brush = Nothing
    Try
    outlinePen = New Pen(outlineColor)
    fillBrush = New SolidBrush(fillColor)
    ' Iterate through the mapped points and calculate the bar, fill it, and outline it
    For i As Integer = 0 To points.Length - 2
    Dim currentPoint As PointF = points(i)
    Dim nextPoint As PointF = points(i + 1)
    Dim barX As Single = currentPoint.X
    Dim barY As Single = currentPoint.Y
    Dim barWidth As Single = nextPoint.X - currentPoint.X
    Dim barHeight As Single = baseY - currentPoint.Y
    g.FillRectangle(fillBrush, barX, barY, barWidth, barHeight)
    g.DrawRectangle(outlinePen, barX, barY, barWidth, barHeight)
    Next
    Finally
    If Not outlinePen Is Nothing Then
    outlinePen.Dispose()
    outlinePen = Nothing
    End If
    If Not fillBrush Is Nothing Then
    fillBrush.Dispose()
    fillBrush = Nothing
    End If
    End Try
    ' Cancel any further drawing since we completely handled the drawing of the plot.
    e.Cancel = True
    End If
    End Sub
    Hope this helps.
    - Elton

  • How can I plot the 3d plot of a vibrating bridge?

    Dear all
        My question is as follows:
        I want to plot the mode shape of a bridge. Now the deck of the bridge is vibrating, which can be plot. But at the same time; I want to plot the column of the bridge
    The question is: when some surface of the 3d plot are vibrating, which  means animated plot.How can I plot  the stationary multiple curves at the same time.
    The attached file is one example, but always the mutiple curves disappear when the surface vibrating.
    PS: My VI version is 8.0 How can I save the VI as version 7.x or 6.x, version 8.x seems too new.
    Any reply will be appreciated! Many thanks!
    Attachments:
    format line plot.vi ‏32 KB
    3D plot of mode shape.vi ‏33 KB
    format 3D.vi ‏31 KB

    Sorry,the attached VI should be as follows since there is not data in the array in the previous VI
    Attachments:
    format surface plot.vi ‏20 KB
    3D plot of mode shape.vi ‏31 KB
    format 3D.vi ‏27 KB

  • How can I erase or edit "Category" section in a song? And what is this section for?

    How can I erase or edit "Category" section in a song? And what is this section for?

    At least in my case (OS 10.7.5, iTunes 11.0.2) you can hide this (if I understand you correctly) by going to the iTunes menu bar, clicking View, then View Options.  From the drop down menu make sure that Category (under Other) isn't selected.  You'd have to do this for every playlist where you don't want "category" to appear.
    Good lucck
    srb

  • How can i make a graph y is unmber pasing from UDP port,x is the time stamp.and in the same time this graph can display several numbers to compare.

    how can i make a graph
    y is number(the blue wire)pasing from UDP port,
    x is the time stamp.
    plus in the same time this graph can display several differenr numbers to compare.

  • How can I plot multiple curves using the XY graph?

    Hai,
    I want to plot  XY graphs for 2 diffrent datas in a single XY graph , to compare both the graphs, how to do. i attached my file & vi
    thanks
    sasi  
    Attachments:
    vi3.zip ‏55 KB

    Okay...so if I descide on rewiring my layout and not saving the entire array, how big is the buffer? because I want to be able to see the whole graph and be able to zoom and return to full view during runtime (possible right now).
    Also, you mentioned I could plot the 2D data directly? without adding timestamps to each Y-value? Will it only buffer one timestamp instead of my solution right now that saves as many timestams as I have channels in an array? Maybe the best would be to keep my value-array and then just add timestamps to the last values and then pass it to the XYgraph? If the buffer can handle that many values that is.
    If I were to abandon buffering the entire array (would be real nice indeed, since it frees up a lot of memory), I then need something to call on excel to import my semicolon separated textfile at the end. (textfile logged separatly) Right now I just call a new sheet and insert my array values.
    (look at last 2 frames of VI)
    Attachments:
    Untitled 11.vi ‏273 KB

  • Including scaling information in binary file, which can be plotted in graph

    I need to plot a graph from a from a bin file, I am able to plot the graph using read binary file vi but the scaling is nowhere close to what it needs to be.
    Its in auto scaling mode, if I set the values manually by giving maximum and minimum values the graph disappears,
    I believe it has something to do with some missing header file not included in the binary file as of now.
    Can anyone help , I need to know , how to add header in the binary file so that I include the information of scales or units of measurements of the data which has to be plotted.

    Hi Shrikant,
    you include "header information" the same way as you include "data" in your binary file: You simply write that information to the file...
    When trying to plot "the file" you read both parts (header and data), one after the other!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How can I make waveform graph and/or excel file with two different dynamic DBL values?

    As the question describes, I have two dbl sources from a load cell and linear actuator (from firgelli). I want to make a load/displacement curve from the force readings from the load cell and the displacement readings from the linear actuator. The load cell outputs an analog signal that can be acquired by a DAQ and the actuator comes in with a board and VI program to control the speed and measure the displacement of the actuator to a sample rate of my choosing. Is there a way that I can make a VI where it continues to collect data and construct the graph I'm looking for?
    Solved!
    Go to Solution.

    A couple points about your application:
    1.  Synchronization.  Since you're ultimate goal is a stress/strain curve, it is vital that your force and displacement data be synchronized appropriately.  If your sampling is beyond a few times a second, this is not really possible without some form of hardware synchronization via either a trigger and/or sample clock.  Two NI DAQ boards can be synchronized this way easily, but it seems you're using 3rd party hardware for one of these processes.  Would need to know more about that board to know what options you have.  You could specify what your resolution is in distance, and how fast the article will be moving, to get an idea of how fast to acquire, and how well you'll need to synchronize the data.  Another option, since it appears each data stream will be sampled on a hardware-timed sample clock, they will be offset in time, but not skewed during the acquisition.  You may be able to identify a feature in the data set common to each and use that to remove the timing offset after the process is completed.
    2.  Display.  To display data during the acquisition process, I usually recommend at least one display that plots vs. time.  Much easier to spot irregularities with the acquisition process that way.  However, if you'd like to also plot force vs. displacement, you can use an XY Graph to plot parametrically. For Example, in your case you would use the Displacement data as the X coordinates, and the Force data as the Y coordinates.
    3.  Saving data to file.  I would recommend using the Save to Spreadsheet File.vi (File IO pallette) to save your data.  If you use a comma as the delimiter, and save the file with a *.csv extension, you will have a file that is easily read into excel.  The standard tab-delimited spreadsheet file is also fine, it will just require an extra step to read it into excel to specify to excel what the delimiter is.
    4.  Batch vs. Real-Time Recording (Data File).  If your process is short (< 30 sec) you may be better off acquiring the data, Storing it locally to the VI (Array - usually maintained in a shift register), and then writing the file with a header (acquisition parameters, test article information, data column headers) and the data all at once in batch mode to the file after the process is finished.  If, however, it is longer than that you would be better off starting a data file with a header and appending the data to the file as you go, so that if something happens during your test, you at least have data up to that point.
    Hope this Helps,
    Kurt

  • How can I plot Data in StripChart using ActiveX in LW/CVI

    I have a DAQ with multichannel, I use an external synchronisation and I like to display my Data in RT using CWGraphChart. When I use PlotChartXY I can only plot the width my graph and then it stop (no stripchart possible!!!). But when I make the same with PlotChartY without my external synchronisation, the STRIPCHART works but I have a problem with synchronisation�I hope you understand what I mean. If somebody can help me or send me an example using stripchart with ActiveX, I will be very thank.
    Alex

    duplicate post, answer here
    Bilal Durrani
    NI
    Bilal Durrani
    NI

  • Trying to organise video clips but can not find them in iphoto under Movies but do appear idvd under movies.How can I get into iphoto movies section to edit and organise the video clips

    In iphoto '08 in my Library section "Movies" doesn't show as a seperate folder so to find my video c;ips I have to go through 13,000 photos and yet in iDVD they do show up in the media area. How can I edit them and put them into specific files?

    Tell me if a video has been recorded on its side! or even upside down, can you turn it round the proper way?
    If you have Quicktime Pro you can rotate the video. There's a plugin for iMoive that can rotate clips.  Go to MacUpdate.com and do a search for "rotate video" and you'll find several apps that can do the job and the plugin: MacUpdate: Search for '+rotate +video'
    OT

  • How can I cache dvt graph results?

    Hello colleagues, I need some help regarding dvt graphs performance.
    In our application we have big amount of data which the user can filter by adding grouping options, time ranges, etc. For the graph to be updated (the query to be re-executed), the user has to press a "Refresh" button each time he changes the query parameters.
    Once the new results are displayed in the graph, the user can change the graph type by pressing either a pie, bar, line or table buttons. As a consequence of this, the query is re-executed and returns the same previous results. This obviously drops the performance of the application.
    So, how we can manage to refresh the type of graph (for example from pie to bar) without re-executing the query. Note that the "Refresh" button should always re-execute the query even if the parameters were not changed.
    I'll appreciate your help.
    Regards,
    Nicolas
    Edited by: 864814 on Oct 14, 2011 6:05 AM

    And by the way how are you switching the graph type? Are you using an af:graph tag and switching just the type? Or are you rendering a complete new graph on your page?

  • How can I save a graph in labview ?

    Hi
    1-I want to save a graph when I press save botton in front panel!
      Do  get image and export image method have this feature or not?
    2-How can i autozoom graph when it is stopped?
    tnx 
    Solved!
    Go to Solution.

    muks wrote:
    You can use a save button and put the save inside a case.I have already shown you how to save as image then.
     yessss.thnx  a lot  

  • How can I make a graph?

    I want to give a swing application x and y parameters and it should then draw a graph for me.
    x and only be positiv and y can be both positiv and negativ.
    I only give x1, y1, x2, y2, x3, y3, etc and it should draw a graph with the given parameter.
    is this possible?`
    and is there any finished code?

    what I already have is this code but here he draws the function x?, but how can I cange it that he only draws the coordinates i give him x1, y1, x2, y2, x3, y3, etc?
    // GraphDemo.java
    import java.awt.*;
    import javax.swing.*;
    public class GraphDemo extends JFrame {
    GraphDemo()
    // super("Resize me!");
    this.setTitle("Frame Title");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    getContentPane().add(new GraphPane());
    setSize(400,400);
    setVisible(true);
    public static void main(String[] args) {
    new GraphDemo();
    class GraphPane extends JPanel
    final int margin = 8;
    public void paintComponent(Graphics g)
    Dimension d = getSize();
    Rectangle r = new
    Rectangle(margin,margin,d.width-margin*2,d.height-margin*2);
    // background color
    g.setColor(new Color(255,255,255));
    g.fillRect(0,0,d.width,d.height);
    // grid color
    g.setColor(Color.lightGray);
    drawGrid(g,r,16,16);
    // line color
    g.setColor(Color.blue);
    drawFunction(g,r);
    private void drawGrid(Graphics g,Rectangle r,int w, int h)
    for(int y = 0;y <= h;y++) {
    int gy = ntrp(0,h,r.y,r.height,y);
    g.drawLine(r.x,gy,r.width,gy);
    for(int x = 0;x <= w;x++) {
    int gx = ntrp(0,w,r.x,r.width,x);
    g.drawLine(gx,r.y,gx,r.height);
    private void drawFunction(Graphics g,Rectangle r)
    boolean start = true;
    double epsilon = .01;
    double xa = -3.0;
    double xb = 3.0;
    int oldx = 0, oldy = 0;
    for(double x = xa;x <= xb; x += epsilon)
    // just a picturesque
    // sample function
    double y = Math.exp(-(x*x));
    int gx = ntrp(xa,xb,r.x,r.width,x);
    int gy = ntrp(0,1,r.height,r.y,y);
    if(!start) {
    g.drawLine(oldx,oldy,gx,gy);
    oldx = gx;
    oldy = gy;
    start = false;
    // interpolation routine
    private int ntrp(double xa,double xb,int ya,int yb, double x)
    return (int)((x-xa)/(xb-xa) * (yb-ya)) + ya;

  • How can i smooth my graph?

    hello guys.
    i want to smooth out my graph so i can distinguish big peaks (pitches) in it from other spurious smaller peaks.how can i do that?is there a way to make it more visual easy for someone to see the big peaks or to emphasize even more the biggest peak?the graph shows the pitch period of a segment of a speech signal using the cepstrum algo.
    cheers
    Attachments:
    untitled.JPG ‏20 KB

    My suggestion would be to perform curve fitting,  In function tools>> Mathematics>> Fitting you will find quite a few cure fitting vi's ( Linear, Exponential, general polynomial fit etc).
    Here is a brief introduction to curve fitting

Maybe you are looking for

  • COPA Documents not getting posted - Doc with unauthorized busi.trans SD00

    Dear Experts, COPA Documents are not getting posted, although billing /accounting documents are getting posted We are getting the below error message,  when KE4ST is executed Kindly share your inputs for this issue Document with unauthorized business

  • How can i download the Adobe flash player 11?

    I have tried downloading the adobe flash player 11 because if i dont have this i cant access the things I like doing on my computer. So i clicked on it and followed the indtructions but then it told me to close programs listed, so i did. After i did

  • History not working.

    When I watch a show at http://xfinitytv.comcast.net/ the progress bar is not shown. I attached a picture to better explain. I watched every show entirely. When I watched part of a show and stopped, the bar would show partial progress and I could resu

  • No Printers are installed / How to Installed printers in HFM (Urgent)

    Hi, we have 2 printers, both are working locally but not from HFM. After login/out it says no printers are installed. Thanks in Advance.

  • I am unable to complete re-install I-Tunes after I unistalled

    Hello Everyone Thank you, for the first time I had to un-install my I-tunes cause it began rebuffing repeatedly, I thought to un-install & just re-install as normal. once I get through the installation it gives you message Thank you for downloading y