Difference between revisions of "Template:DPL Example 103 barchart"

From FollowTheScore
Jump to: navigation, search
(New page: {{#ploticus: #proc getdata data: {{{data|}}} // render pie graph #proc bar datafield: 2 labelfmtstring: @@1 (@@2) labelmode: line+label outlinedetails: color=blue colors: dullyellow d...)
 
Line 5: Line 5:
 
{{{data|}}}
 
{{{data|}}}
  
// render pie graph
+
// set up plotting area using proc areadef
#proc bar
+
#proc areadef
datafield: 2
+
  rectangle: 1 1 3.5 2
labelfmtstring: @@1 (@@2)
+
  xrange: 0 125
labelmode: line+label
+
  yrange: 0 5
outlinedetails: color=blue
+
  title: {{{title|}}}
colors: dullyellow drabgreen pink powderblue lavender
+
  frame: color=0.8
labelfarout: 1.8
+
 
 +
// do x axis using proc xaxis
 +
#proc xaxis
 +
  stubs inc 25
 +
  axisline: none
 +
  tics: none
 +
  label: {{{labelX|}}}
 +
  grid: color=rgb(.6,1,.6)
 +
  stubformat: %g%%
 +
 
 +
// do bars using proc bars
 +
#proc bars
 +
  axis: x
 +
  lenfield: 2
 +
  color: pink
 +
  showvalues: yes
 +
  labelfield: 1
 +
  longwayslabel: yes
 +
  labeldetails: size=6
 +
  reverseorder: yes
 +
  outline: no
 +
 
 
}}
 
}}

Revision as of 11:37, 13 March 2009

{{#ploticus:

  1. proc getdata
 data:


// set up plotting area using proc areadef

  1. proc areadef
 rectangle: 1 1 3.5 2
 xrange: 0 125
 yrange: 0 5
 title: 
 frame: color=0.8

// do x axis using proc xaxis

  1. proc xaxis
 stubs inc 25
 axisline: none
 tics: none 
 label: 
 grid: color=rgb(.6,1,.6)
 stubformat: %g%%

// do bars using proc bars

  1. proc bars
 axis: x
 lenfield: 2
 color: pink
 showvalues: yes
 labelfield: 1
 longwayslabel: yes
 labeldetails: size=6 
 reverseorder: yes
 outline: no

}}