Statalist


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

st: RE: to intersect an catplot in single graphs


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: to intersect an catplot in single graphs
Date   Sun, 23 Aug 2009 17:26:48 +0100

-catplot- is a user-written command from SSC. Please remember to specify
where user-written commands you refer to come from. 

I guess one answer is to read the graph into the Graph Editor repeatedly
and delete the unwanted parts. That's not very attractive. 

More positive is to work out how to re-create the graphs for yourself. 

Some variation on 

sysuse auto, clear
contract foreign rep78, zero nomiss
egen percent = pc(_freq), by(foreign)
forval i = 1/5 {
	graph bar (asis) percent if rep78 == `i', ///
	over(foreign) blabel(bar, position(outside) format(%2.1f)) ///
subtitle(`i') ytitle(percent) 
}

Alternatively, look inside -catplot- to see how it was done. 

Nick 
[email protected] 

Joerg Eulenberger

if there a way to save the particular Graphs from the by-option in the 
following catplot as single graphs (with the barlabels from the
catplot)?
I need the single graphs to use them with other Graphs (graph combine).

*****************************
sysuse auto
drop if  rep78==.
catplot bar   foreign,  by( rep78) percent(foreign)  blabel(bar, 
position(outside) format(%3.1f))
*****************************

I want 5 bar graphs with values from the catplot. Is this possible?


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index