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: Bar graph: bar colors across -by()- and -over() graphs do not match


From   Marco Antonielli <[email protected]>
To   statalist <[email protected]>
Subject   st: Bar graph: bar colors across -by()- and -over() graphs do not match
Date   Thu, 23 May 2013 17:21:46 +0200

Hi,
My name is Marco.

I am doing a bar graph using the options -over()- and - by()-. Follows
the code I am using:

graph bar (asis) comp_share_Rank1  comp_share_Rank2 comp_share_Rank3
comp_share_Rank4 ///
comp_share_Rank5 comp_share_Rank6 comp_share_Rank7 comp_share_Rank8
comp_share_Rank9 ///
comp_share_Others if marketshare==1 & year==2010 & category==1, ///
over(country) stack cw by(subcategory) ///
bar(1, color(navy)) bar(2, color(navy*0.9)) ///
bar(3, color(navy*0.8)) bar(4, color(navy*0.7)) bar(5,
color(navy*0.6)) bar(6, color(navy*0.5)) ///
bar(7, color(navy*0.4)) bar(8, color(navy*0.3)) bar(9,
color(navy*0.2)) bar(10, color(navy*0.1))

I have then 5 bar graphs. However the colors of the 10 columns in the
5 graphs is not consistent, ie the second graph has softer colors than
the first on and so on.

Any suggestion on how to solve the issue?
Thank you!
*
*   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