Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. Efficient Real-Time X-Y Plotting/Graphing

Efficient Real-Time X-Y Plotting/Graphing

Scheduled Pinned Locked Moved WPF
csharpwpfdata-structuresregextutorial
3 Posts 2 Posters 9 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jlgeris
    wrote on last edited by
    #1

    I could have asked this in a number of sections, I know, but the following is using WPF.. I'm working on an application that graphs data for given time intervals. For example, I could be collecting data in real time, and i'm graphing the last 5 minutes of the data up to the current point. When I have multiple axes, the number of points for each axis can become large fast. I have to go though and process all of these points every time I update the graph. When I have points that are in a pattern, or straight line, it doesn't make since to keep all of the ones in the middle. Does anyone know of any algorithms/data structures to efficiently process a large number of coordinates? Thanks!

    C 1 Reply Last reply
    0
    • J jlgeris

      I could have asked this in a number of sections, I know, but the following is using WPF.. I'm working on an application that graphs data for given time intervals. For example, I could be collecting data in real time, and i'm graphing the last 5 minutes of the data up to the current point. When I have multiple axes, the number of points for each axis can become large fast. I have to go though and process all of these points every time I update the graph. When I have points that are in a pattern, or straight line, it doesn't make since to keep all of the ones in the middle. Does anyone know of any algorithms/data structures to efficiently process a large number of coordinates? Thanks!

      C Offline
      C Offline
      Christoph Menge
      wrote on last edited by
      #2

      Hi, somehow, I don't see why you posted this to the WPF Forum: You are asking for a data structure or an algorithm. This is independent from the way you display it. Next, why do you have to process all points every time you update? Do you need real-time averages or something? Just moving the graph can certainly be accomplished in a smarter way. Concerning patterns/straight lines: Are you sure that your data will ever show up something like that? Measurement data is almost never precise enough. There are, however, interpolation and approximation algorithms using polynomials, splines, etc. But this is not exact anymore, and if the algorithm screws up, you might not notice that (e.g. you data jiggles wildly but the interpolation comes up with an almost straight line). In general, if this is measurement data, you should keep the original input somewhere or have your algorithm determine the interpolation/approximation error. It really depends on what you're up to. Note that these algorithms are usually computationally expensive, so it is probably not a good idea to apply them in real time. Are you sure you will have so many points that memory will be the bottleneck? Cheers, Chris

      "Obstacles are those frightening things you see when you take your Eyes off your aim" - Henry Ford
      Articles  Blog

      J 1 Reply Last reply
      0
      • C Christoph Menge

        Hi, somehow, I don't see why you posted this to the WPF Forum: You are asking for a data structure or an algorithm. This is independent from the way you display it. Next, why do you have to process all points every time you update? Do you need real-time averages or something? Just moving the graph can certainly be accomplished in a smarter way. Concerning patterns/straight lines: Are you sure that your data will ever show up something like that? Measurement data is almost never precise enough. There are, however, interpolation and approximation algorithms using polynomials, splines, etc. But this is not exact anymore, and if the algorithm screws up, you might not notice that (e.g. you data jiggles wildly but the interpolation comes up with an almost straight line). In general, if this is measurement data, you should keep the original input somewhere or have your algorithm determine the interpolation/approximation error. It really depends on what you're up to. Note that these algorithms are usually computationally expensive, so it is probably not a good idea to apply them in real time. Are you sure you will have so many points that memory will be the bottleneck? Cheers, Chris

        "Obstacles are those frightening things you see when you take your Eyes off your aim" - Henry Ford
        Articles  Blog

        J Offline
        J Offline
        jlgeris
        wrote on last edited by
        #3

        Thanks Chris, I understand that the there are other places i could have posted it, but since i'm utilizing WPF, i thought there might be some features or anything else i didn't know about. Oh well. I agree, measurement data would be too difficult to find patterns. I'm displaying the data in real-time (say 10 points/sec), and could have up to 6 axes. I'm using the Polyline in WPF, and it's just something that could potentially be a processing/memory bottleneck. Thanks for the help though

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups