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: Extending axis when using -catplot-
From
Lucie Vlach <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: Extending axis when using -catplot-
Date
Thu, 29 Mar 2012 14:58:33 -0600
Hello everyone!
I am creating two graphs and then combining them into one for easy viewing. James data vs. everyone's data, in percentages.
I like the look of -catplot- for these. (-catplot- is a user-written package by Nicholas J. Cox available from SSC)
When I combine the two graphs, one ends the axis at 30% because the data has the highest bar reaching only max 30% and the second one ends at 40%, based on its data.
Is there a way to extend the 30% scale to 40% on my shorter graph so that both graphs have the same length of the axis?
Something like -xscale- etc? I cannot get this to work. I need to have the 'james' graph displaying scale that reaches at least 40%, even though data only goes to 30%.
Thank you very much for any help!
============
catplot abc_groups, by(james) percent(james) ysize(2.5) ytitle("James in percent") blabel(bar, format(%4.1f))
graph save Graph "james.gph"
catplot abc_groups, by(everyone) percent(everyone) ysize(2.5) ytitle("everyone in percent") blabel(bar, format(%4.1f))
graph save Graph "everyone.gph"
grc1leg "james.gph" "everyone.gph", cols(1)imargin(0 0 0 0) ycommon xcommon legendfrom("james.gph")
=============
Lucie
Lucie
This message and any attached documents are only for the use of the intended recipient(s), are confidential and may contain privileged information. Any unauthorized review, use, retransmission, or other disclosure is strictly prohibited. If you have received this message in error, please notify the sender immediately, and then delete the original message. Thank you.
*
* 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/