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

re: hbars problem

Expand Messages
  • Stephen C. Grubb
    I ve modified your script .. it runs here but not sure about v 1.34 key is to use categories for the Y axis Steve // here is our example script. each option
    Message 1 of 1 , Aug 1, 2003
      I've modified your script ..

      it runs here but not sure about v 1.34

      key is to use categories for the Y axis

      Steve


      // here is our example script. each option for the question would have
      // one plot showing the distribution of answers according to the answer
      // to another question.

      // specify data using proc getdata
      #proc getdata
      file: CSplot.dat
      select: @@1 = 2
      showresults: yes

      // here the data file is prenamed. but the selection is tricky.
      // we want the outer-loop data here, column N where N is the column
      // for the outer answer value 2. oa is going to be 1 or 3.
      // v is going to be each of its variants.


      // set up plotting area using proc areadef
      #proc areadef
      title: Male
      rectangle: 4 1 6 3.5
      ycategories: datafield=4
      yscaletype: categories
      xrange: 0 2177


      // ansct is the count of answers for the inner q.
      // resct is the max count of respondents for each answer.

      // more substitutions here.

      // render bars using proc bars
      #proc bars
      horizontalbars: yes
      color: rgb(0,0.5,0.8)
      locfield: 4
      lenfield: 5
      // barwidth: 0.25
      barwidth: 0.08
      labeldetails: adjust=0,-0.03 color=rgb(0,0.5,0.8)
      colorlist: 4 red
      showvalues: yes

      // render yaxis last so it is not obliterated, using proc yaxis
      // #proc yaxis:
      #proc yaxis
      // stubs: datafields 1
      stubs: usecategories
      tics: none
      axisline: none
      // stubdetails: align=L adjust=0.17,0.15
      stubdetails: align=R
    Your message has been successfully submitted and would be delivered to recipients shortly.