Plotting


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: Plotting

  1. #1
    Join Date
    Mar 2005
    Posts
    96

    Plotting

    I have a channel with 75,000 points in it that i need to plot in VB. I am using MSChart to plot this graph. I can plot the graph just fine but it is awfully slow. Does anyone know how i can make it any faster?

    Any input will be appreciated.

  2. #2
    Join Date
    Mar 2005
    Posts
    96
    Alternately, does anyone know how to plot ~75000 points faster in VB? I have only tried MSChart function and that is quite slow.

  3. #3
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    how do you pass the point to the chart control?
    Marco
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

  4. #4
    Join Date
    Mar 2005
    Posts
    49
    Hi svn,

    Even I have about 80000 points to plot. But when I use Mschart "VtChChartType2dXY", the entire plot is displayed as a thin strip. Could you please tell me how you are plotting ur 75000 point plot using Mschart. What chart type are you using?

    Thanks

  5. #5
    Join Date
    Mar 2005
    Posts
    96
    1. I am reading in a binary file with points into an array and passing that array as the data that goes to the chart. Something like:

    For i = 1 To Val(NumPts)
    PltVals(i, 1) = ChnVals(i, t2)
    Next

    Plot.Chart.ChartData = PltVals

    2. I am using VtChChartType2dLine.

  6. #6
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    did you do some benchmark to see which part is the slowest: reading, preparing the data, or displaying it. 75000 points is a heck lot of data, that cannot be displayed all together in a normal monitor (you can get as much as 1600 pixels of horizontal resolution).
    One possibility is to break the data in chunks of let's say 1000 points, adding a scrollbar or something to select the active range. If you need a zoom out view, I suggest to compress the data (1000 points or so) before sending it to the chart. When compressing, let's say 100 points into one, you can select the average, minimum or maximum of those 100 points. You have a lot of flexibility in this way.
    Marco
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center