Examples - 'compare' prefab


Version 2.42 May2013

Prefabs


These examples all use the compare prefab. All of these examples are included in the distribution (./pltestsuite/testpf_compare). Gallery of ALL prefab examples

The compare prefab computes means and standard deviations from your data set, and then displays them as a collection of bars with error bars.


Examples 1 thru 5 use the dexa.dat data file which looks like this (sample). Field 1 identifies the category, and field 2 (sex) identifies the subcategory. The other fields are variables that can be plotted.

strain sex bw RFbmc LFbmc RFbmd LFbmd
129S1/SvImJ f 20.5 0.0265 0.0313 0.0647 0.0695
129S1/SvImJ f 20 0.0326 0.0351 0.0739 0.0741
129S1/SvImJ f 19.3 0.0249 0.0302 0.0682 0.0686
129S1/SvImJ m 24.1 0.0285 0.0340 0.0720 0.0762
129S1/SvImJ m 20.6 0.0260 0.0270 0.0635 0.0670
129S1/SvImJ m 22.9 0.0322 0.0374 0.0730 0.0785
A/J f 21.6 0.0227 0.0257 0.0644 0.0691
A/J f 21.1 0.0229 0.0284 0.0608 0.0674
A/J f 23.4 0.0242 0.0259 0.0630 0.0687
A/J m 25.1 0.0284 0.0315 0.0669 0.0661
A/J m 27.3 0.0248 0.0296 0.0638 0.0696
A/J m 24.6 0.0229 0.0227 0.0628 0.0682
....

example 1 - comparison of one variable

pl -prefab compare data=dexa.dat header=yes catfields=strain \ 
  y=RFbmc stubvert=yes barwidth=0.1 \ 
  "title= Comparison of one variable" "titledet= adjust=0,+0.4" 



example 2 - comparison of two variables, no subcats

pl -prefab compare data=dexa.dat header=yes catfields=strain \ 
  y=RFbmc y2=LFbmc stubvert=yes barwidth=0.1 \ 
  "title= Comparison of two variables, no subcats" "titledet= adjust=0,+0.4" 



example 3 - comparison of four variables, no subcats

pl -prefab compare data=dexa.dat header=yes catfields=strain \ 
  y=RFbmc y2=LFbmc y3=RFbmd y4=LFbmd  stubvert=yes \ 
  "title= Comparison of four variables, no subcats" \ 
  "titledet= adjust=0,+0.4" 



example 4 - comparison of two variables, with f & m subcats

pl -prefab compare data=dexa.dat header=yes catfields=strain,sex \ 
  y=RFbmc y2=LFbmc leftsub=f rightsub=m stubvert=yes \ 
  "title= Comparison of two variables, with f & m subcats" \ 
  "titledet= adjust=0,+0.4" 



example 5 - comparison of four variables, with f & m subcats

pl -prefab compare data=dexa.dat header=yes catfields=strain,sex \ 
  "rectangle= 1 2 8 4"  -pagesize 9,5 \ 
  y=RFbmc y2=LFbmc y3=RFbmd y4=LFbmd leftsub=f rightsub=m stubvert=yes \ 
  "title= Comparison of four variables, with f & m subcats" \ 
  "titledet= adjust=0,+0.4" 



example 6 - comparison of four conditionally-selected variables

 pl -prefab compare data=data28 header=yes catfields=strain \ 
    "rectangle=1 2 6 5"  \ 
    y=pct_mac y2=pct_mac y3=pct_mac y4=pct_mac  \ 
    "ptselect= @sactime = 0 && @inj = trt" \ 
    "ptselect2= @sactime = 24 && @inj = trt" \ 
    "ptselect3= @sactime = 48 && @inj = trt" \ 
    "ptselect4= @sactime = 72 && @inj = trt" \ 
     ptselecttags=0,24,48,72 \ 
    stubvert=yes erroneway=yes  



data display engine  
Copyright Steve Grubb


Ploticus is hosted at http://ploticus.sourceforge.net   Get ploticus data display engine at SourceForge.net. Fast, secure and Free Open Source software downloads