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

Assign legendlabel from csv file header

Expand Messages
  • supra89ta
    Here is my data: Date,VTL1-Capacity,VTL1-Used,VTL2-Capacity,VTL2-Used,VTL3-Capacity,VTL3-Used 04/14/08,119264,3500,119264,89643,119264,17 How can I assign a
    Message 1 of 3 , Apr 21, 2008
    • 0 Attachment
      Here is my data:

      Date,VTL1-Capacity,VTL1-Used,VTL2-Capacity,VTL2-Used,VTL3-Capacity,VTL3-Used
      04/14/08,119264,3500,119264,89643,119264,17


      How can I assign a legendlabel in a curvefit that feeds automatically
      off of the column header, so that the label for column3 is
      "VTL1-Used", without me assigning:

      #proc curvefit
      xfield: 1
      yfield: 3
      curvetype: interpolated
      linedetails: color=blue width=1
      legendlabel: VTL1-Used <----
      maxinpoints: 500000


      in the config file?


      Im getting set to automate a ton of monthly data collection, and
      because the data isnt always in the same column as last month, it
      would save a looooot of time.

      Thanks!
    • Stephen C. Grubb
      Hello, sorry for the delay in responding.. Here s an example script that uses the $fieldname() function to get the field name associated with the integer field
      Message 2 of 3 , Aug 1, 2008
      • 0 Attachment
        Hello,

        sorry for the delay in responding.. Here's an example script that uses the
        $fieldname() function to get the field name associated with the integer
        field number (see http://ploticus.sourceforge.net/doc/functions.html )

        #proc getdata
        delim: comma
        fieldnameheader: yes
        file: fieldnames.dat

        #set top = 8
        #for yfield in 3,4,5

        #set fname = $fieldname( @yfield )

        #set bot = $arith( @top-1.5 )
        #proc areadef
        title: @fname
        rectangle: 2 @bot 5 @top
        xscaletype: date mm/dd/yy
        xautorange: datafield=1
        yautorange: datafield=@yfield
        yaxis.stubs: inc
        xaxis.stubs: datematic

        #proc lineplot
        xfield: 1
        yfield: @yfield
        label: @fname

        #set top = $arith( @top-2.5 )

        #endloop

        ---------

        Here's the data file:

        Date,VTL1-Capacity,VTL1-Used,VTL2-Capacity,VTL2-Used,VTL3-Capacity,VTL3-Used
        04/14/08,119264,3500,119264,89643,119264,17
        04/15/08,120000,3600,120000,90000,120000,18
        04/16/08,121000,3700,121000,92000,122000,19



        -Steve


        On Mon, 21 Apr 2008, supra89ta wrote:

        > Here is my data:
        >
        > Date,VTL1-Capacity,VTL1-Used,VTL2-Capacity,VTL2-Used,VTL3-Capacity,VTL3-Used
        > 04/14/08,119264,3500,119264,89643,119264,17
        >
        >
        > How can I assign a legendlabel in a curvefit that feeds automatically
        > off of the column header, so that the label for column3 is
        > "VTL1-Used", without me assigning:
        >
        > #proc curvefit
        > xfield: 1
        > yfield: 3
        > curvetype: interpolated
        > linedetails: color=blue width=1
        > legendlabel: VTL1-Used <----
        > maxinpoints: 500000
        >
        >
        > in the config file?
        >
        >
        > Im getting set to automate a ton of monthly data collection, and
        > because the data isnt always in the same column as last month, it
        > would save a looooot of time.
        >
        > Thanks!
        >
        >


        Stephen C. Grubb scg@... x-6633
        Scientific Software Engineer, The Jackson Laboratory
        600 Main Street Bar Harbor, Maine 04609 USA
      • Jeff Mohler
        Thanks for the reply, hopefully someone can determine why I cant use Ploticus anymore because it wont accept my dataset size. I have other (old) posts on this.
        Message 3 of 3 , Aug 1, 2008
        • 0 Attachment
          Thanks for the reply, hopefully someone can determine why I cant use
          Ploticus anymore because it wont accept my dataset size.

          I have other (old) posts on this.

          On Fri, Aug 1, 2008 at 10:58 AM, Stephen C. Grubb <scg@...> wrote:
          > Hello,
          >
          > sorry for the delay in responding.. Here's an example script that uses the
          > $fieldname() function to get the field name associated with the integer
          > field number (see http://ploticus.sourceforge.net/doc/functions.html )
          >
          > #proc getdata
          > delim: comma
          > fieldnameheader: yes
          > file: fieldnames.dat
          >
          > #set top = 8
          > #for yfield in 3,4,5
          >
          > #set fname = $fieldname( @yfield )
          >
          > #set bot = $arith( @top-1.5 )
          > #proc areadef
          > title: @fname
          > rectangle: 2 @bot 5 @top
          > xscaletype: date mm/dd/yy
          > xautorange: datafield=1
          > yautorange: datafield=@yfield
          > yaxis.stubs: inc
          > xaxis.stubs: datematic
          >
          > #proc lineplot
          > xfield: 1
          > yfield: @yfield
          > label: @fname
          >
          > #set top = $arith( @top-2.5 )
          >
          > #endloop
          >
          > ---------
          >
          > Here's the data file:
          >
          > Date,VTL1-Capacity,VTL1-Used,VTL2-Capacity,VTL2-Used,VTL3-Capacity,VTL3-Used
          > 04/14/08,119264,3500,119264,89643,119264,17
          > 04/15/08,120000,3600,120000,90000,120000,18
          > 04/16/08,121000,3700,121000,92000,122000,19
          >
          > -Steve
          >
          > On Mon, 21 Apr 2008, supra89ta wrote:
          >
          >> Here is my data:
          >>
          >>
          >> Date,VTL1-Capacity,VTL1-Used,VTL2-Capacity,VTL2-Used,VTL3-Capacity,VTL3-Used
          >> 04/14/08,119264,3500,119264,89643,119264,17
          >>
          >>
          >> How can I assign a legendlabel in a curvefit that feeds automatically
          >> off of the column header, so that the label for column3 is
          >> "VTL1-Used", without me assigning:
          >>
          >> #proc curvefit
          >> xfield: 1
          >> yfield: 3
          >> curvetype: interpolated
          >> linedetails: color=blue width=1
          >> legendlabel: VTL1-Used <----
          >> maxinpoints: 500000
          >>
          >>
          >> in the config file?
          >>
          >>
          >> Im getting set to automate a ton of monthly data collection, and
          >> because the data isnt always in the same column as last month, it
          >> would save a looooot of time.
          >>
          >> Thanks!
          >>
          >>
          >
          > Stephen C. Grubb scg@... x-6633
          > Scientific Software Engineer, The Jackson Laboratory
          > 600 Main Street Bar Harbor, Maine 04609 USA
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.