Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: bar chart fill patterns? use tabplot


From   "Richard Zijdeman" <r.l.zijdeman@uu.nl>
To   statalist@hsphsun2.harvard.edu
Subject   st: bar chart fill patterns? use tabplot
Date   Thu, 17 Jul 2008 09:46:19 +0200

Dear all,

I had a question on how to provide patterns on bars in bar charts, in
order to differentiate between different categories, when bars are
printed in grayscale. This issue has been addressed on the statalist
(see below), and it is recommended that you should look for another
type of graph. For those who will also need to deal with this issue, I
would like to add the following to that discussion:

(1) The command "tabhbar" actually does provide such a graph with
different patterned bars in color. (You can obtain it by typing:  "ssc
install tabhbar" on the command line.) But you will find it still
difficult to interpret in grayscale, with more than 4 categories.

(2) I am really convinced now, that you should indeed use another type
of graph, and that "tabplot" is actually what you might be looking
for. ("ssc install tabplot").

I have a number of occupations, that are categorized in 7 groups:
occ7. I also have three class schemes (class1-class3) in which all of
these occupations are categorized according to "social economic
class". I wanted to show, to what the degree the 7 occupational groups
are categorized similarily over the three class schemes. Here's how to
do it:

tabplot occ7 class1, name(g_class1, replace)
tabplot occ7 class2, name(g_class2, replace)
tabplot occ7 class3, name(g_class3, replace)
graph combine g_class1 g_class2 g_class3, row(1) xcommon
* the row(1) makes sure that the graphs are put in 1 row, while
xcommon makes sure that the classes have the same xaxis.

For more info on tabplot and similar commands dealing with categorizations:
http://www.stata-journal.com/sjpdf.html?articlenum=gr0004

Thank you for tabplot and for the earlier responses on the statalist
on this matter.

Cheers,

Richard

-- Earlier postings on the statalist addressing this issue.
*st: Fill patterns in stata8 hbar graph, Eric Magar (Fri Sep 23 17:00:14 2005)
**Re: st: Fill patterns in stata8 hbar graph, Eric G. Wruck (Fri Sep
23 17:40:29 2005)
***Re: st: Fill patterns in stata8 hbar graph, Michael Blasnik (Fri
Sep 23 18:40:04 2005)
*RE: st: Fill patterns in stata8 hbar graph, Nick Cox (Sun Sep 25 10:40:05 2005)
*st: RE: Making bar charts readable in a grayscale photocopy (Fri, 24
Oct 2003 16:59:13 -0400)
*st: Bar graph (Wed, 29 Oct 2003 12:17:21 -0500)

--
Richard L. Zijdeman
Ph.D. Student
ICS / Utrecht University
Phone: +31 30 253 1967
Fax: +31 30 253 4405
Mobile: +31 6 2903 1953
Skype: rlzijdeman
*
*   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   |   What's new   |   Site index