hw to plot a graph in java

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jyothik
    New Member
    • Jul 2007
    • 4

    #1

    hw to plot a graph in java

    i want a program that reads a file with 2 columns:
    - time in minutes for the x axis
    - value (e.g. temperature, heart freq.) for the y axis

    Plot the last m minutes, the y axis shall have a range from min...max.
    Start with parameter values m=5, speed s=1, min=20, max=120.
    After m=5 minutes, the graphical display shall plot the curve of the
    last 5 minutes. In other words, you have to implement a sliding window
    with a 5 minute history. This way of displaying measurements is common
    for many medical instruments.
    The speed s is useful for testing, 1=real time, 10=10 times faster.
    To implement the real time behaviour, you have to let the program wait the
    time interval between two values. The time interval is not constant.

    Out put can be seen in this link
    http://alf42.dyndns.or g/oost/temperature_dia gram_example.gi f

    Test data can be seen in this link
    http://alf42.dyndns.or g/oost/temp_testdata_2 007-06-21
  • prometheuzz
    Recognized Expert New Member
    • Apr 2007
    • 197

    #2
    Originally posted by jyothik
    i want a program that reads a file with 2 columns:
    ...
    The answer is the same as in the previous forum you posted:
    - try to do it yourself and ask specific questions on the forum;
    - you can use http://www.jfree.org/jfreechart/ (the site has examples!).

    Good luck.

    Comment

    • madhoriya22
      Contributor
      • Jul 2007
      • 251

      #3
      Originally posted by jyothik
      i want a program that reads a file with 2 columns:
      - time in minutes for the x axis
      - value (e.g. temperature, heart freq.) for the y axis

      Plot the last m minutes, the y axis shall have a range from min...max.
      Start with parameter values m=5, speed s=1, min=20, max=120.
      After m=5 minutes, the graphical display shall plot the curve of the
      last 5 minutes. In other words, you have to implement a sliding window
      with a 5 minute history. This way of displaying measurements is common
      for many medical instruments.
      The speed s is useful for testing, 1=real time, 10=10 times faster.
      To implement the real time behaviour, you have to let the program wait the
      time interval between two values. The time interval is not constant.

      Out put can be seen in this link
      http://alf42.dyndns.or g/oost/temperature_dia gram_example.gi f

      Test data can be seen in this link
      http://alf42.dyndns.or g/oost/temp_testdata_2 007-06-21
      Hi U can use JFreeChart for that...Its a free java library... just download it from here here. And start use it.......

      Thanks :)
      madhoriya

      Comment

      • prometheuzz
        Recognized Expert New Member
        • Apr 2007
        • 197

        #4
        Originally posted by madhoriya22
        Hi U can use JFreeChart for that...Its a free java library... just download it from here here. And start use it.......

        Thanks :)
        madhoriya
        Excellent suggestion, if I say so myself!
        ; )

        Comment

        • blazedaces
          Contributor
          • May 2007
          • 284

          #5
          I wish I had known about JFreeChart before writing a program to plot an array of polar points ... Ah well, at least I learned quite a lot figuring it out...

          This is a great program though from what I've seen of the site...

          Good luck to you,

          -blazed

          Comment

          Working...