Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Restricting range of values in a graph


From   sjsamuels@gmail.com
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Restricting range of values in a graph
Date   Thu, 16 Jul 2009 06:22:17 -0400

--
Try the -nooutside- option or switch to another scale and show
everything. See: Nick Cox's FAQ at
http://www.stata.com/support/faqs/graphics/boxandlog.html .   What he
demonstrates can apply to scales other than the log.

If you want to show some of the outside points, but not all, you will
have to Winsorize the points you want to hide.  Replace them with a
value at the upper end of your desired graph range and give them an
invisible marker symbol.  This will leave the rest of the boxplot
unchanged.  You can add text at that value to show the number of
higher points excluded.

This problem comes up for other  commands in which Stata computes the
plotting points; -stcurve- is an example.   Stata has a -range- option
for axes, but it can only expand, not contract, the plotting range.

-Steve

On Thu, Jul 16, 2009 at 3:09 AM, Dana Chandler<dchandler@gmail.com> wrote:
> I am preparing some graphs with simple boxplots over various groups.
> Thus on my x-axis, I have categorical variables for population groups.
> My y-axis has # of businesses of a certain type within each population
> group.
>
> Unfortunately, I would like to be able to only show the y-axis within
> a certain range (so as to not have outliers distort the picture). One
> idea I had was to simply do the graph and add "IF #businesses < 50".
> This will make the graph visible, but will distort the IQR of the
> boxplot. The "yscale(r(0 25))" command does not seem to work and seems
> only to "extend" a range of y-values rather than restrict it. Does
> anyone have a suggestion for how to construct a graph for the entire
> range of data but only display it over a specific range?
>

Steven Samuels
sjsamuels@gmail.com
18 Cantine's Island
Saugerties NY 12477
USA
845-246-0774
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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