Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: RE: Extending axis when using -catplot-


From   Lucie Vlach <Lucie.Vlach@albertahealthservices.ca>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Extending axis when using -catplot-
Date   Thu, 29 Mar 2012 15:20:29 -0600

I think I made this work with:    ylabel(0(10)50, labsize(small))

I hope that is correct, at least it looks ok to me so far.



________________________________________
From: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu] On Behalf Of Lucie Vlach
Sent: March 29, 2012 2:58 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: Extending axis when using -catplot-

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

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/

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/


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