Plotting from Databases

Help
2013-04-18
2013-04-18
  • Dietrich Daroch

    Dietrich Daroch - 2013-04-18

    Is there a way to plot the answer to some SQL queries directly?

    I would like to make multiple plots out of a single query, without relying on intermediate files or processing almost the same query multiple times to read the output from stdin using a hacky shell script.

    If it's not possible, I'd like to get some directions on how to implement this in order to achieve a nice syntax and avoid running heavy queries more than once.

    I'd like to achieve a syntax like this:

    table dataFromDB 'select * from slowestViewEver'
    table data2FromDB 'select * from insanelyLargeTable'

    plot \
    'dataFromDB' select 1:2,\
    'dataFromDB' select 1:3,\
    'data2FromDB' select 1:2

    or
    hold graphic ABC123
    plot 'dataFromDB' select 1:2
    plot 'dataFromDB' select 1:3
    plot 'data2FromDB' select 1:2
    release graphic ABC123

     
    Last edit: Dietrich Daroch 2013-04-18
    • Edoardo Pasca

      Edoardo Pasca - 2013-04-18

      you may get the output of a command line and plot it directly as

      plot "<yourcommand with parameters" u 1:2 w lines

      so the < is what you look for. However this won't save you making 2 SQL
      queries as the output isn't stored.

      Edo

      On Thu, Apr 18, 2013 at 3:41 AM, Dietrich Daroch dietr1ch@users.sf.netwrote:

      Is there a way to plot the answer to some SQL queries directly?

      I would like to make multiple plots out of a single query, without relying
      on intermediate files or processing almost the same query multiple times to
      read the output from stdin using a hacky shell script.

      If it's not possible, I'd like to get some directions on how to implement
      this in order to achieve a nice syntax and avoid running heavy queries more
      than once.

      I'd like to achieve a syntax like this:

      table dataFromDB 'select * from slowestViewEver'
      table data2FromDB 'select * from insanelyLargeTable'

      plot \ 'dataFromDB' select 1:2,\ 'dataFromDB' select 1:3,\ 'data2FromDB'
      select 1:2

      or
      hold graphic ABC123
      plot 'dataFromDB' select 1:2
      plot 'dataFromDB' select 1:3
      plot 'data2FromDB' select 1:2
      release graphic ABC123


      Plotting from Databaseshttps://sourceforge.net/p/gnuplot/discussion/5925/thread/73085970/?limit=25#8c1b

      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

       

Log in to post a comment.