Menu

Seismograph plot

Help
Carnifix
2015-04-27
2015-04-30
  • Carnifix

    Carnifix - 2015-04-27

    Hello everyone,

    I´d like to make a graph for my Seismometer.

    At the moment i am plotting my data in realtime. I plot the time on the x-axis and the data on the y-axis.
    And i would like to upgrade my current plot to show the minutes[0:59] on the x-axis the and and the hours[0-23] on the y-axis.

    I am currently saving the data of my Seismometer in a file that is build like this:

    hour:minute:second data
    14:44:36 +1580
    14:44:36 -860

    Here´s the current plot code:


    set title "Seismometer"
    set xdata time
    set xlabel "Time"
    set timefmt "%H:%M:%S"
    set format x "%H:%M"

    plot "file" using 1:2

    pause 1
    reread


    I appreciate your help.

     
    • Edoardo Pasca

      Edoardo Pasca - 2015-04-27

      In these cases I generally suggest to prepare the data with awk before
      feeding the data to gnuplot.

      I'd do something like this

      plot "<awk -F[:\s] '{print $1 " " $2} file" u 1:2

      awk gets the numbers you want and formats an easy dataset for gnuplot

      Edo

      On Mon, Apr 27, 2015 at 4:03 PM, Carnifix carnifix@users.sf.net wrote:

      Hello everyone,

      I´d like to make a graph for my Seismometer.

      At the moment i am plotting my data in realtime. I plot the time on the
      x-axis and the data on the y-axis.
      And i would like to upgrade my current plot to show the minutes[0:59] on
      the x-axis the and and the hours[0-23] on the y-axis.

      I am currently saving the data of my Seismometer in a file that is build
      like this:

      hour:minute:second data
      14:44:36 +1580
      14:44:36 -860

      Here´s the current plot code:

      set title "Seismometer"
      set xdata time
      set xlabel "Time"
      set timefmt "%H:%M:%S"
      set format x "%H:%M"

      plot "file" using 1:2

      pause 1
      reread


      I appreciate your help.

      Seismograph plot
      https://sourceforge.net/p/gnuplot/discussion/5925/thread/910f1096/?limit=25#a29b


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/gnuplot/discussion/5925/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      Edo
      weblog http://edo.imanetti.net/wordpress
      podcast http://sieegiueeaccaso.blogspot.com
      cooking http://edo.imanetti.net/cucina
      :wq

       
  • Carnifix

    Carnifix - 2015-04-30

    Thank you for you help.

    My current data format looks like this

    HH MM:SS data

    im multiplying the data with a factor and then add the hour to it to plot everything on the right place

    set title "Seismometer"
    set xdata time
    set ylabel "Hour"
    set xlabel "Minute"
    set yrange[0:24]
    set timefmt "%M:%S"
    set format x "%M:%S"
    set ytics 1
    set style data dots

    plot "/bla" using ($2):($3/factor+$1)

    pause 1
    reread

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.