Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Problem with bar chart


From   Merve Akbas <[email protected]>
To   [email protected]
Subject   st: Problem with bar chart
Date   Fri, 12 Apr 2013 09:41:41 -0400

Dear statalist members,
I have a very simple dataset (the one below)
And I want to create a barchart that compares the means of the
variable "avrpercr_b" between Gain and Loss, for each block.

I use this command in stata

graph bar avrpercr_b, over(condition, gap(0))  over(block)


Which does the job, but it doesn't make the Gain and Loss  bar colors different.


They both are blue and when I try to change the color of one bar - it
dyes all of the bars.


If you could help me figure out what is wrong, it would be so highly
appreciated!

Thanks in advance!

Merve Akbas




subid blockcondition avrpercr_b
101 1 Gain .74
101 2 Gain .78
101 3 Gain .52
101 4 Gain .78
102 1 Gain .48
102 2 Gain .58
102 3 Gain .54
102 4 Gain .58
201 1 Loss .5
201 2 Loss .62
201 3 Loss .64
201 4 Loss .62
202 1 Loss .9
202 2 Loss .86
202 3 Loss .82
202 4 Loss .86
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index