Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Fwd: Changing the yaxis for multiple graphs generated with "graph box" with a "by"
From
Ludovico Zaraga <[email protected]>
To
statalist <[email protected]>
Subject
st: Fwd: Changing the yaxis for multiple graphs generated with "graph box" with a "by"
Date
Wed, 9 Oct 2013 12:27:58 -0500
Hello stata users,
I have a large dataset where I have a distribution of prices for a
number of countries. I display this graphically with the following
command:
graph box prices, by(Country)
The issue is that some countries have some outliers which make so that
the yaxis goes to very large values. While this is not an issue for
the few countries with outliers, the command above uses the same yaxis
for all the graphs shown.
Ideally I would like each "Country" graph shown to have a yaxis
spanning the minimum and maximum for that specific country, instead of
the min/max over all countries as stata does.
A less ideal solution, would be to change the yaxis for all graphs
plotted. I tried the following to do this:
graph box prices, by(Country) yscale(range(-1,1))
but stata ignores the yscale option completely.
Any help would be appreciated.
Thanks,
Ludovico
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/