Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Histogram Question About Placement of Bars

From   "Oleg Badunenko, EUV" <>
Subject   Re: st: Histogram Question About Placement of Bars
Date   Wed, 06 Oct 2004 18:15:34 +0200

Hi Alan,

'tw hist' instead of 'hist' should work.



Alan Neustadtl wrote:

I am trying to produce a histogram of a variable with only two possible responses, 1 and 2. The graphic looks like I intended except for the large gap between the y-axis and the first bar. I would like to shift both bars to the left or begin the bars closer to the y-axis.
I have posted a jpeg of the histogram at and am using the following code:

hist prayer, percent discrete gap(20) ///
title("Approve of Supreme Court Decision Prohibiting Requiring the" ///
"Recitation of the Lord's Prayer in Public Schools") ///
subtitle("(n=1,775)") ///
xlabel(1 "Approve" 2 "Disapprove") ///
xtitle("") ///
ylabel(,angle(0)) ///
bfcolor(olive_teal) blcolor(teal) ///
note("Source: General Social Survey 2000")


* For searches and help try:

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index