<html><h1>mouse</h1><img src="mouse.gif"><p>
<a href="gall.using.html">How to download and try this example</a><br>
<pre><b>Usage: pl -gif -map clickmap_mouse.htm
Uses data file <a href="mouse.dat">mouse.dat</a>.
<hr></b>
#setifnotgiven CGI = "http://ploticus.sourceforge.net/cgi-bin/showcgiargs"
///////////// get plot data
#proc getdata
file: mouse.dat
fieldnames: strain sex var mean stderr n stddev
#endproc
///////////// no data.. exit
#if @NRECORDS = 0
#proc annotate
location: 3 3
text: No data found that
corresponded to your request.
#exit
#endif
///////////// set up plotting area for strains comparison bars
#proc areadef
clickmapurl: @CGI?strain=@@XVAL
rectangle: 1 1 8 3
autowidth: 0.1 3.5 15
xscaletype: categories
xcategories: datafield=1
catcompmethod: exact
xaxis.axisline: none
xaxis.stubs: usecategories
xaxis.stubvert: yes
xaxis.gridblocks: gray(0.9) white
xaxis.gridlineextent: min-0.5 max
xaxis.stubslide: -0.5(s)
xaxis.stubdetails: adjust=0,0.1 size=6
xaxis.tics: none
xaxis.clickmap: grid
xaxis.clickmapextent: min-0.5 max
yautorange: datafield=mean
yaxis.stubs: inc
yaxis.stubcull: yes
yaxis.stubdetails: size=6
yaxis.labeldetails: adjust=-0.1,0 size=8
/////////// do overall mean and sd for background
#proc rangebar
meanmode: yes
datafield: mean
statsonly: yes
// +/- 1 SD line (thin)
#proc line
notation: locval
linedetails: color=teal width=0.3 style=1
points: min @RANGEBARMAX(s) max @RANGEBARMAX(s)
min @RANGEBARMIN(s) max @RANGEBARMIN(s)
// overall mean line (thicker)
#proc line
notation: locval
linedetails: color=teal width=1 style=1
points: min @RANGEBARMEAN(s) max @RANGEBARMEAN(s)
// legend entry for the mean and +/- 1 SD line
#proc legendentry
sampletype: line
details: color=teal width=1 style=1
label: Overall mean and +/- 1 SD
//////////// blue bars for males..
// always since it is #saved for later cloning (but may not always draw)
#proc catslide
axis: x
amount: -0.65
#proc bars
locfield: strain
lenfield: mean
errbarfields: stderr
ticlen: 0.03
select: @@sex like m*
tails: 0.03
thinbarline: color=blue width=0.4
truncate: yes
legendlabel: Male
#saveas B
// do mean tics in a separate step to allow for means-only data sets e.g. mogil pain
#proc scatterplot
xfield: strain
select: @@sex like m*
yfield: mean
linelen: 0.04
linedetails: color=blue width=0.4
////////////// red bars for females..
#proc catslide
axis: x
amount: -0.35
#proc bars
#clone B
select: @@sex like f*
thinbarline: color=red width=0.4
legendlabel: Female
#proc scatterplot
xfield: strain
select: @@sex like f*
yfield: mean
linelen: 0.04
linedetails: color=red width=0.4
////////////////// now display the legend..
#proc legend
location: min+0.5 max+0.2
format: singleline
sep: 0.7
seglen: 0.25
textdetails: size=6
syntax highlighted by Code2HTML, v. 0.9.1