One thing that annoys me to no end however is the inability to add labels to scatter plot points. If you have X and Y values your only choices for the labels are either the name of the series or the values themselves. Usually I got around this either by doing my graphs differently or using R to make these 'fancier' plots, but today I finally needed to make a chart like that in Excel, and it was Google (not Bing) time! Luckily someone, actually a lot of people, already had this issue and there was a MS knowledge base article on it. Apparently the 'easiest' solution (apart from setting each label by hand by clicking on it and filling in the formula) is to write a VB macro that adds the labels brute-force in a one-time run. Here is the kb article for your reference, the sample data and the graph it makes:
"How to use a macro to add labels to data points in an xy scatter chart or in a bubble chart in Excel"
If you have data like such:
| Residue | Price | Effective Pixels (millions) |
| Canon EOS 1D Mark III | $4,160.00 | 10.1 |
| Canon EOS 5D Mark II | $2,629.00 | 21 |
| Canon EOS 10D | $324.00 | 6.3 |
| Canon EOS 40D | $917.00 | 10.1 |
| Canon EOS 50D | $1,213.00 | 15.1 |
You can get a chart like this:
Sure it's not the pretties chart in the world, but it does the job. And with that, my love/hate relationship with Excel continues...data from dpreview.com
0 comments:
Post a Comment