<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>I'm using Anthony Phan's statsmac package. </div><div><br></div><div><a href="http://www-math.univ-poitiers.fr/~phan/">http://www-math.univ-poitiers.fr/~phan/</a></div><div><br></div><div><a href="http://www-math.univ-poitiers.fr/~phan/downloads/metapost/mps.tar.gz">mps.tar.gz</a></div><div><br></div><div>I'm trying to do a barchart with categorical data. I've tried:</div><div><br></div><div><div>input statsmac;</div><div><br></div><div>data(poll)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>"Yes", 30,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>"No", 20,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>"Undecided", 50;</div><div><br></div><div>beginfig(0);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>usedata(poll, response$, n);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>setrange(0,3,5cm,0,50,3cm);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>weight reponse, n;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>barchart(response);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div>endfig;</div><div><br></div><div>end.</div><div><br></div><div>And:</div><div><br></div><div><div>input statsmac;</div><div><br></div><div>data(poll)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>"Yes","No","Yes","No","Yes","No","Yes","No";</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div>beginfig(0);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>usedata(poll, response$);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>setrange(0,3,5cm,0,50,3cm);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>barchart(response);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div>endfig;</div><div><br></div><div>end.</div><div><br></div><div>But no luck. I'm struggling a bit with this as the manual mentions "When plotting a barchart of a non-numeric variable," but I can find no example of this in the disribution.</div><div><br></div><div>Has anyone tried this?</div><div><br></div><div>David.</div></div></div></body></html>