Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: Graph titles and labels with by()


From   Thomas Masterson <[email protected]>
To   [email protected]
Subject   Re: st: RE: Graph titles and labels with by()
Date   Thu, 10 May 2007 16:53:45 -0400

Thanks for the quick response.
I actually have 48 categories
and 2 groups. I simplified for
the sake of clarity. I'll consider
your suggestions anyway, though.
Thanks again,
tom

Nick Cox wrote:
Not your question, but in most situations a reduction to four box plots is just throwing away a lot of detail that might be interesting or useful -- and would not be confusing if presented carefully. You might see much, much more on other plots.
Box plots, in my not so humble opinion, are perhaps optimal for (say) 30 or 100 groups when you desperately need severe reduction
to see the wood for the trees -- but vastly overused for comparisons
with a very few groups (to say nothing of their over-use for single distributions).
For just four groups, dot plots, strip plots, beam plots, quantile plots, whatever can show much, much more.
John Tukey himself (Exploratory data analysis, Addison-Wesley, Reading, MA, 1977), who re-invented the box plot, used Rayleigh's original data (which led to the discovery of argon and a Nobel Prize) to show the limitations of box plots. This dataset is bimodal (which turns out to be the key point) but a box plot utterly obscures that.
Nick [email protected]
Thomas Masterson

I'm running in to a problem producing the graph I want.
Running two separate box plots and combining them gives
me a graph with one title, but a lot of space taken up
with category labels. Using the by() option seems like
it should be the answer.
Here's what I think is the right code:

. graph hbox lnw [fw=wgt], over(cat) by(group, noiy) title("Title")

here's what I get:

	Title           Title
	group1		group2
      |               |
cat1 |  box     cat1 |  box
      |               |
cat2 |     box  cat1 |     box
      |_________      |___________
	scale            scale

and here's what I want it to look like:

		Title
	group1		group2
      |               |
cat1 |   box         |   box
      |               |
cat2 |      box      |      box
      |___________    |____________
	scale            scale

Can anybody see what I'm doing wrong?
I also tried the -noiyl- in the -by()-
options, but got the same output.
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
--
**********************************
* Thomas Masterson               *
* Research Scholar               *
* Levy Economics Institute       *
* Bard College                   *
* Annandale-on-Hudson, NY  12504 *
* (845) 758-7715                 *
**********************************
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index