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

st: RE: bar semi-shadedness - a limitation, or not?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: bar semi-shadedness - a limitation, or not?
Date   Mon, 16 Dec 2002 11:16:19 -0000

Lee Sieswerda
> 
> For as long as I've used Stata, a limitation that I thought 
> insuperable was
> the production of a fully shaded bar graph. So, for a long 
> time, I've
> produced graphs at the darkest semi-shaded level available 
> (4), and then
> opened them in a graphics program where I could replace the 
> shading with
> something darker. Alternatively, I'm sad to say, I made my 
> graphs in Excel
> after producing the appropriate data in Stata. An 
> irritation, to be sure,
> but one I've grown accustomed to. Well, I was quite 
> surprised this morning
> when I tried Nick Cox's fabulous program -tabhbar- and 
> discovered that when
> I specify the option -shading(4)- I get bars that are 
> actually fully shaded.
> After a bit of testing, here is the relationship that I found:
> 
> tabhbar, shading(2) = graph, shading(3)
> tabhbar, shading(3) = graph, shading(4)
> tabhbar, shading(4) = no equivalent using -graph-
> 
> So, my question: is it just me, or do others get the same results? 
> 

My inclination is the other way round, 
as I like totally unshaded bars, a lot! 
(Or even no bars at all, but that is a different story.) 

Note that -tabhbar- is a wrapper 
for -hbar- which for bar shadings just calls 

	gph box ... <shading> 

The documentation for -gph- refers 
to shadings 0 1 2 3 4. 

The documentation for -grcolor- 
refers to shadings 1 2 3 4. 

At least with Stata 7 for Windows XP, 
on what I think is a fairly standard PC, 
I agree with Lee that 

	gph box ... 4 

is darker than you get with 

	graph ... bar sh(4) 

I conjecture that 

shading to -gph- = (shading to -graph, bar()-) - 1 

and that the very darkest 
shading available via -gph- is not used 
by -graph, bar()-. 

At the opposite end, -hbar- and thus 
-tabhbar- allows a shading of . (think 
missing) which gives you an unshaded bar. 
This is implemented with -hbar- as just 
drawing the 4 bounding lines defining 
a rectangle and is idiosyncratic to -hbar-. 

This isn't clear from the help file for 
-hbar- as read in Stata 7, as Stata 7 (for 
once) misreads the help file written 
for Stata 6. 

Nick 
[email protected] 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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