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]
RE: st: Graphing
Nick Cox <firstname.lastname@example.org>
RE: st: Graphing
Mon, 23 Jul 2012 18:34:23 +0100
This question is reminiscent of the thread started by Miles Witthaus on Friday. Start with
For problems like this, I prefer -tabplot- (SSC) or -catplot- (SSC).
SJ-4-2 gr0004 . Speaking Stata: Graphing categorical and compositional data
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N. J. Cox
Q2/04 SJ 4(2):190--215 (no commands)
discusses graphical possibilities for categorical and
My bottom line is that stacking is often chosen, but rarely optimal. One disadvantage of stacking is that it imposes dependence on a key or legend.
See also William S. Cleveland's books, especially
Have you looked at the help file for - graph bar - or - graph hbar - yet? They should be able to explain things clearly enough so you can get the exact graph that you would like easily.
On Jul 23, 2012, at 9:33, "Shittu, Aminu" <email@example.com> wrote:
I have a qualitative data where 8 diseases ranked (1 (most-important) to 5 (least important)) based on perception - 37 subjects were interviewed so 37 records in the dataset. Please what Stata command should I use to plot a bar chart showing the count of responses per category for each disease. I will place diseases on my x-axis and disease ranks on the y-axis (starting with 5, 4, 3, 2 and 1 from bottom to the top of the axis), and then stack 5 bars per disease showing the total counts on the top of each bar? I am also interested in the alternative plot of using a single multi-coloured bar per disease (y-axis), and the number of counts (x-axis), and then incorporate a key defining each of the colour.
* For searches and help try: