You are not logged in. You can browse but not post. Login or Register by clicking 'Login or Register' at the top-right of this page. For more information on Statalist, see the FAQ.
Ivica Rubil is bang on. The only way to get that kind of bar shading is with community-contributed code. The code mentioned is from 2008 and may or may not have been broken since by changes in official code.
Personal opinion: The example chart seems perfectly clear without any kind of special fill. (I can't read Chinese, but trust that is not an issue here.)
Dear @Nick Cox, this is just a simple example.and It shows what I want to ask.in fact ,the graph what I want to plot has more than 1 category.
Many journals often ask us to provide black-and-white graph.so I have to fill special fills.
We do rely on the examples you give. Besides, in your example it's the same shading for each bar so far as I can see.
There are many solutions if journals don't support full colour. (The Stata Journal is one such.)
1. It is a poor journal that won't support different grey scales, minimally solid black for an important single category and white for everything else.
2. Bar charts don't have to be differentiated by colour. You can show groupings, use text to differentiate, and so on.
3. You can use dot charts and so different symbols.
As Naomi Robbins says somewhere, you wouldn't want to use a different colour for each word in a sentence. Why do you need to use a different colour for each bar?
Sorry for my poor English.
1.The Chinese characters is not an issue here.
2.When there are many categories,such as 8 categories, use different grayscale is not a good idea and is different to read.
3.Yes,I know I can use dot charts and different symbols, but I want to know if I can use bar charts here.
4.I don't need to use a different color for each bar,I want to use different pattern fills for different categories.
When you have say 8 or more categories, different colours or pattern fills for each usually create, in my view, a confusing mess. If people won't read the text saying which is which, that;s their call.
The reluctance of StataCorp to provide different fills is not of course my responsibility, but I approve nevertheless.
If the journal's requirements are designed for and most easily met using Excel, then perhaps using Stata to prepare the appropriate summary data for plotting, and then exporting that data to Excel and using Excel to produce the plots would be the most efficient approach.
Comment