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

Bug in #proc legendentry or #proc bars?

Expand Messages
  • nenchichius
    Hi, I m trying to get horizontal bars with data driven formatting. The script below is pretty much exactly from the ploticus handbook. But ploticus doesn t
    Message 1 of 1 , Dec 5, 2007
    • 0 Attachment
      Hi,

      I'm trying to get horizontal bars with data driven formatting.

      The script below is pretty much exactly from the ploticus handbook.
      But ploticus doesn't seem to like "sampletype: line" used from "#proc
      bars". The error messages are:
      -
      $ pl -png ddhbars.plo
      pl proc bars: error 12001: Color not defined (color=red)
      pl proc bars: error 12001: Color not defined (style=1)
      -

      What am I doing wrong? Please help.

      /Leonard


      ddhbars.plo
      -----------
      // get the data..
      #proc getdata
      data:
      7 r
      10 r
      5 b
      7 b
      8 g
      12 g

      // set up plotting area..
      #proc areadef
      rectangle: 1 1 3 2
      xrange: 1 8
      yrange: 0 15

      // define legend explicitly, 3 entries..
      #proc legendentry
      label: Red bars
      sampletype: line
      details: color=red
      tag: r

      #proc legendentry
      sampletype: line
      label: Blue bars
      details: style=1 dashscale=1 color=blue
      tag: b

      #proc legendentry
      sampletype: line
      label: Green bars
      details: style=1 dashscale=2 color=green
      tag: g


      // render the bar graph..
      #proc bars
      axis: x
      outline: no
      lenfield: 1
      colorfield: 2

      // display the legend..
      #proc legend
      location: 3.5 max-.75
      colortext: yes
    Your message has been successfully submitted and would be delivered to recipients shortly.