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

st: RE: bug in color(black) for twoway bar ?


From   David Airey <[email protected]>
To   [email protected]
Subject   st: RE: bug in color(black) for twoway bar ?
Date   Wed, 31 Aug 2005 11:04:01 -0500

.

My apologies for assuming what I could not figure out in over an hour must be something wrong with Stata rather than me (!). Your advice was easier to implement that that of the Stata's tech help, which was rapidly in by inbox and also works, but there was a complication.

In your command,

graph twoway bar y x, barwidth(0.5) bstyle(none) color(black) ylabel(0 (25)100)

does not give filled black for me. I must instead say

graph twoway bar y x, barwidth(0.5) bstyle(none) bfcolor(black) ylabel (0(25)100)

neither color(black) nor blcolor(black) are paid attention to.

-Dave




Dear David,

The intensity level of the bar color in -twoway bar- is set at 80% and the
line intensity is set at 100%. I believe this is done in order to
differentiate between the bars (since -twoway bar- places the bars right next
to each other by default).

While the -graph bar- command allows for an -intensity- option, the -twoway
bar- command does not. The intensity level is set in the scheme file, so you
would need to alter the scheme in order to change this behavior. If you want
to go to the trouble, you could change the following line in the
scheme-s2color.scheme (the s1color scheme uses settings in s2color) file:

change

intensity p inten80

to

intensity p inten100

Then, when you issue your -twoway bar- command with the -bfcolor (black)-
option your bars will turn out as black as the bars in -graph bar-.

Derek Wagner


This is neither platform-specific nor a bug - it is a "feature"

The default intensity for all shaded areas in twoway plots is 80%. You can override this by removing the style before applying the colour...

graph twoway bar y x, barwidth(0.5) bstyle(none) color(black) ylabel (0(25)100)

David

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of David Airey
Sent: 31 August 2005 01:22
To: [email protected]
Subject: st: bug in color(black) for twoway bar ?

.

On OS X Stata 9, it seems impossible to get black bars for twoway bar
graphs. It is possible in graph bar.

For example,

clear

set scheme s1color

input y x
35 1
45 2
55 3
end

// produce dark gray bars
graph twoway bar y x, barwidth(0.5) color(black) ylabel(0(25)100)


// produces black bars
graph bar y x, bar(1, color(black)) bar(2, color(black))




/* about produces

Stata/SE 9.0 for Macintosh
Born 05 Jul 2005
Copyright (C) 1985-2005

*/
*
*   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