Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

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

From |
Nick Cox <n.j.cox@durham.ac.uk> |

To |
"'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: problem using catplot to graph vertical bars |

Date |
Tue, 26 Oct 2010 13:11:50 +0100 |

Adelaine is using -catplot- 2.0.0 from SSC. As the FAQ advises http://www.stata.com/support/faqs/res/statalist.html#stata "Say what command(s) you are using. If they are not part of official Stata, say where they come from: the STB/SJ, SSC, or other archives." This is so that people who might answer the question have a much clearer notion of what is being asked -- and so that people who might not answer the question have a chance to learn about something -- and so that people who ask the question get good answers faster. There are three ways of understanding what is going on here. 1. Logic. If -catplot- understands that -group-, the first thing named, is a variable, then by the same logic -catplot- expects that -bar-, the first thing named, should be a variable. But Adelaine has no such variable, which is precisely why -catplot- complains and issues an error message. 2. Reading the help file. This explains that -recast(bar)- is the option that Adelaine is seeking. Reading the help is often a good idea. Perhaps Adelaine is guessing at appropriate syntax by analogy with -graph bar-, but -catplot- 2.0.0, although calling -graph {bar|hbar|dot}, uses its own syntax. 3. Historical research. Perhaps Adelaine is confusing old and new syntaxes for -catplot-, but they differ. See http://www.stata.com/statalist/archive/2010-06/msg00431.html for one explanation. Nick n.j.cox@durham.ac.uk Leung, Adelaine K.W. I'm trying to make a simple categorical graph using catplot. The following command works and draws the bars horizonally catplot group courted if enflp==272 & group!=0 & group!=2 & gal4line==1, percent(courted) However, I would like the same graphs drawn with vertical bars using the following command: catplot bar group courted if enflp==272 & group!=0 & group!=2 & gal4line==1, percent(courted) I get an error: variable bar not found Any advice will be great! Thanks in advance. * * 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/

**Follow-Ups**:**Re: st: RE: problem using catplot to graph vertical bars***From:*"Leung, Adelaine K.W." <Adelaine_Leung@hms.harvard.edu>

**References**:**st: problem using catplot to graph vertical bars***From:*"Leung, Adelaine K.W." <Adelaine_Leung@hms.harvard.edu>

- Prev by Date:
**st: What's wrong with my differentiation?** - Next by Date:
**st: Pseudo Panels (Repeated Cross-sections with time series)** - Previous by thread:
**st: What's wrong with my differentiation?** - Next by thread:
**Re: st: RE: problem using catplot to graph vertical bars** - Index(es):