Loading ...
Sorry, an error occurred while loading the content.

expanding dataset

Expand Messages
  • equick25
    Hi, I m trying to produce a bar chart which has a date xscaletype and plots the last 14 days eventhough my data file has a growing number of records which will
    Message 1 of 5 , Jun 4, 2003
    • 0 Attachment
      Hi,

      I'm trying to produce a bar chart which has a date xscaletype and
      plots the last 14 days eventhough my data file has a growing number
      of records which will eventually go over 14 days. Unfortunately at
      the moment it plots all the days from my datafile which is becoming a
      problem now because they won't all fit on to the graph. Can anyone
      help me out please?

      Here's my script:

      #proc page
      #if @DEVICE in png,gif
      scale: 0.7
      #endif

      #proc getdata
      file: /www/postfix/data/history.data
      fieldnameheader yes

      #proc areadef
      title: Number of Emails Sent and Received over the last Fortnight
      titledetails: size=14 align=C adjust=0,0.25
      rectangle: 1 2 8 5
      xscaletype: date yyyymmdd
      xautorange: datafields=date
      yautorange: datafields=sent,rcvd,deferred,bounced
      clickmapurl: JavaScript:historytable()


      #proc xaxis
      stubs: inc 1 day
      stubvert: yes
      label: Date (yyyymmdd)
      labeldetails: adjust=0,-0.6


      #proc yaxis
      stubs: inc 0
      label: Number
      labeldetails: adjust=-0.3,0
      gridskip: min

      #proc curvefit
      curvetype: bspline
      xfield: date
      yfield: sent
      order: 5
      linedetails: color=red width=0.5

      #proc curvefit
      curvetype: bspline
      xfield: date
      yfield: rcvd
      order: 5
      linedetails: color=green width=0.5


      #proc bars
      axis: y
      locfield: date
      lenfield: sent
      barwidth: 0.08
      legendlabel: Sent
      color: red
      cluster: 1 / 4

      #proc bars
      axis: y
      locfield: date
      lenfield: rcvd
      barwidth: 0.08
      legendlabel: Received
      color: green
      cluster: 2 / 4

      #proc bars
      axis: y
      locfield: date
      lenfield: deferred
      barwidth: 0.08
      legendlabel: Deferred
      color: yellow
      cluster: 3 / 4

      #proc bars
      axis: y
      locfield: date
      lenfield: bounced
      barwidth: 0.08
      legendlabel: Bounced
      color: purple
      cluster: 4 / 4

      #proc legend
      location: 9 5
      seglen: 0.2

      and here's the data file:
      date sent rcvd deferred bounced
      20030517 12930 14373 1298 450
      20030518 13454 10354 771 396
      20030519 181378 55020 13816 4707
      20030530 62634 42192 7326 3149
      20030531 10415 10276 648 297
      20030601 327656 46188 24821 15113
      20030602 93965 51559 7071 6175
      20030603 368829 137156 98035 57533
    • Stephen C. Grubb
      One way to limit to a certain time window is to limit the data as read, like this: #call $setdatefmt( yyyy/mm/dd ) #set today = $todaysdate() #set xmin =
      Message 2 of 5 , Jun 5, 2003
      • 0 Attachment
        One way to limit to a certain time window is to limit the data as read,
        like this:

        #call $setdatefmt( "yyyy/mm/dd" )
        #set today = $todaysdate()
        #set xmin = $dateadd( @today, -14 )

        #proc getdata
        fieldnames: dt
        file: dates.dat
        select: $daysdiff(@@dt,@xmin) >= 0
        showresults: yes

        This gets the current date, computes the 14-day-ago date, then selects
        only records having a date >= that.

        Steve


        On Wed, 4 Jun 2003, equick25 wrote:

        > Hi,
        >
        > I'm trying to produce a bar chart which has a date xscaletype and
        > plots the last 14 days eventhough my data file has a growing number
        > of records which will eventually go over 14 days. Unfortunately at
        > the moment it plots all the days from my datafile which is becoming a
        > problem now because they won't all fit on to the graph. Can anyone
        > help me out please?
        >
        > Here's my script:
        >
        > #proc page
        > #if @DEVICE in png,gif
        > scale: 0.7
        > #endif
        >
        > #proc getdata
        > file: /www/postfix/data/history.data
        > fieldnameheader yes
        >
        > #proc areadef
        > title: Number of Emails Sent and Received over the last Fortnight
        > titledetails: size=14 align=C adjust=0,0.25
        > rectangle: 1 2 8 5
        > xscaletype: date yyyymmdd
        > xautorange: datafields=date
        > yautorange: datafields=sent,rcvd,deferred,bounced
        > clickmapurl: JavaScript:historytable()
        >
        >
        > #proc xaxis
        > stubs: inc 1 day
        > stubvert: yes
        > label: Date (yyyymmdd)
        > labeldetails: adjust=0,-0.6
        >
        >
        > #proc yaxis
        > stubs: inc 0
        > label: Number
        > labeldetails: adjust=-0.3,0
        > gridskip: min
        >
        > #proc curvefit
        > curvetype: bspline
        > xfield: date
        > yfield: sent
        > order: 5
        > linedetails: color=red width=0.5
        >
        > #proc curvefit
        > curvetype: bspline
        > xfield: date
        > yfield: rcvd
        > order: 5
        > linedetails: color=green width=0.5
        >
        >
        > #proc bars
        > axis: y
        > locfield: date
        > lenfield: sent
        > barwidth: 0.08
        > legendlabel: Sent
        > color: red
        > cluster: 1 / 4
        >
        > #proc bars
        > axis: y
        > locfield: date
        > lenfield: rcvd
        > barwidth: 0.08
        > legendlabel: Received
        > color: green
        > cluster: 2 / 4
        >
        > #proc bars
        > axis: y
        > locfield: date
        > lenfield: deferred
        > barwidth: 0.08
        > legendlabel: Deferred
        > color: yellow
        > cluster: 3 / 4
        >
        > #proc bars
        > axis: y
        > locfield: date
        > lenfield: bounced
        > barwidth: 0.08
        > legendlabel: Bounced
        > color: purple
        > cluster: 4 / 4
        >
        > #proc legend
        > location: 9 5
        > seglen: 0.2
        >
        > and here's the data file:
        > date sent rcvd deferred bounced
        > 20030517 12930 14373 1298 450
        > 20030518 13454 10354 771 396
        > 20030519 181378 55020 13816 4707
        > 20030530 62634 42192 7326 3149
        > 20030531 10415 10276 648 297
        > 20030601 327656 46188 24821 15113
        > 20030602 93965 51559 7071 6175
        > 20030603 368829 137156 98035 57533
        >
        >
        >
        >
        > To unsubscribe from this group, send an email to:
        > ploticus-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        >
        >
        >


        Stephen C. Grubb scg@...
        Scientific Software Engineer, The Jackson Laboratory
        600 Main Street Bar Harbor, Maine 04609 USA
      • J S
        Steve, Thanks. That worked really well. Just one other question I had was, can you set the stubs to increment in weeks ? JS. ...
        Message 3 of 5 , Jun 6, 2003
        • 0 Attachment
          Steve,

          Thanks. That worked really well.
          Just one other question I had was, can you set the stubs to increment in
          weeks ?

          JS.

          >
          >One way to limit to a certain time window is to limit the data as read,
          >like this:
          >
          >#call $setdatefmt( "yyyy/mm/dd" )
          >#set today = $todaysdate()
          >#set xmin = $dateadd( @today, -14 )
          >
          >#proc getdata
          > fieldnames: dt
          > file: dates.dat
          > select: $daysdiff(@@dt,@xmin) >= 0
          > showresults: yes
          >
          >This gets the current date, computes the 14-day-ago date, then selects
          >only records having a date >= that.
          >
          > Steve
          >
          >
          >On Wed, 4 Jun 2003, equick25 wrote:
          >
          > > Hi,
          > >
          > > I'm trying to produce a bar chart which has a date xscaletype and
          > > plots the last 14 days eventhough my data file has a growing number
          > > of records which will eventually go over 14 days. Unfortunately at
          > > the moment it plots all the days from my datafile which is becoming a
          > > problem now because they won't all fit on to the graph. Can anyone
          > > help me out please?
          > >
          > > Here's my script:
          > >
          > > #proc page
          > > #if @DEVICE in png,gif
          > > scale: 0.7
          > > #endif
          > >
          > > #proc getdata
          > > file: /www/postfix/data/history.data
          > > fieldnameheader yes
          > >
          > > #proc areadef
          > > title: Number of Emails Sent and Received over the last Fortnight
          > > titledetails: size=14 align=C adjust=0,0.25
          > > rectangle: 1 2 8 5
          > > xscaletype: date yyyymmdd
          > > xautorange: datafields=date
          > > yautorange: datafields=sent,rcvd,deferred,bounced
          > > clickmapurl: JavaScript:historytable()
          > >
          > >
          > > #proc xaxis
          > > stubs: inc 1 day
          > > stubvert: yes
          > > label: Date (yyyymmdd)
          > > labeldetails: adjust=0,-0.6
          > >
          > >
          > > #proc yaxis
          > > stubs: inc 0
          > > label: Number
          > > labeldetails: adjust=-0.3,0
          > > gridskip: min
          > >
          > > #proc curvefit
          > > curvetype: bspline
          > > xfield: date
          > > yfield: sent
          > > order: 5
          > > linedetails: color=red width=0.5
          > >
          > > #proc curvefit
          > > curvetype: bspline
          > > xfield: date
          > > yfield: rcvd
          > > order: 5
          > > linedetails: color=green width=0.5
          > >
          > >
          > > #proc bars
          > > axis: y
          > > locfield: date
          > > lenfield: sent
          > > barwidth: 0.08
          > > legendlabel: Sent
          > > color: red
          > > cluster: 1 / 4
          > >
          > > #proc bars
          > > axis: y
          > > locfield: date
          > > lenfield: rcvd
          > > barwidth: 0.08
          > > legendlabel: Received
          > > color: green
          > > cluster: 2 / 4
          > >
          > > #proc bars
          > > axis: y
          > > locfield: date
          > > lenfield: deferred
          > > barwidth: 0.08
          > > legendlabel: Deferred
          > > color: yellow
          > > cluster: 3 / 4
          > >
          > > #proc bars
          > > axis: y
          > > locfield: date
          > > lenfield: bounced
          > > barwidth: 0.08
          > > legendlabel: Bounced
          > > color: purple
          > > cluster: 4 / 4
          > >
          > > #proc legend
          > > location: 9 5
          > > seglen: 0.2
          > >
          > > and here's the data file:
          > > date sent rcvd deferred bounced
          > > 20030517 12930 14373 1298 450
          > > 20030518 13454 10354 771 396
          > > 20030519 181378 55020 13816 4707
          > > 20030530 62634 42192 7326 3149
          > > 20030531 10415 10276 648 297
          > > 20030601 327656 46188 24821 15113
          > > 20030602 93965 51559 7071 6175
          > > 20030603 368829 137156 98035 57533
          > >
          > >
          > >
          > >
          > > To unsubscribe from this group, send an email to:
          > > ploticus-unsubscribe@yahoogroups.com
          > >
          > >
          > >
          > > Your use of Yahoo! Groups is subject to
          >http://docs.yahoo.com/info/terms/
          > >
          > >
          > >
          >
          >
          > Stephen C. Grubb scg@...
          > Scientific Software Engineer, The Jackson Laboratory
          > 600 Main Street Bar Harbor, Maine 04609 USA
          >

          _________________________________________________________________
          Stay in touch with absent friends - get MSN Messenger
          http://www.msn.co.uk/messenger
        • Stephen C. Grubb
          ... These gallery examples illustrate: http://ploticus.sourceforge.net/gallery/sa5.htm http://ploticus.sourceforge.net/gallery/sa5a.htm
          Message 4 of 5 , Jun 6, 2003
          • 0 Attachment
            > Just one other question I had was, can you set the stubs to increment in
            > weeks ?

            These gallery examples illustrate:

            http://ploticus.sourceforge.net/gallery/sa5.htm
            http://ploticus.sourceforge.net/gallery/sa5a.htm
          • J S
            ... Of course - increment 7 days Thanks! _________________________________________________________________ Tired of 56k? Get a FREE BT Broadband connection
            Message 5 of 5 , Jun 6, 2003
            • 0 Attachment
              >
              > > Just one other question I had was, can you set the stubs to increment in
              > > weeks ?
              >
              >These gallery examples illustrate:
              >
              >http://ploticus.sourceforge.net/gallery/sa5.htm
              >http://ploticus.sourceforge.net/gallery/sa5a.htm
              >

              Of course -> increment 7 days

              Thanks!

              _________________________________________________________________
              Tired of 56k? Get a FREE BT Broadband connection
              http://www.msn.co.uk/specials/btbroadband
            Your message has been successfully submitted and would be delivered to recipients shortly.