Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Labels on Excel X-Y Graphs

Status
Not open for further replies.

DQR

Technical User
Dec 18, 2002
30
0
0
GB
Is there a way to create an X-Y scatterplot in Excel which has a label assigned to each point in the graph, other than by manually changing every single one? The graph wizard gives you the options of labelling the points with either the X values or the Y values, but I want to assign a set of labels. For example, I've got a table that reads:

X Y
AAA 1 2
BBB 5 7
CCC 2 9

I want the point (1,2) labelled with "AAA", the point (5,7) labelled with "BBB" and the point (2,9) labelled with "CCC".

Lotus 123 includes this facility as standard, but unless I'm missing something, Excel doesn't. Am I mistaken?

Cheers,
DQR
 
Right click on one of your points and select 'Format Data Series'. Then look at the data labels tab.
 
Thank you, but I'm afraid that isn't quite what I'm trying to do: the labelling tab only gives me access to the X values or the Y values as labels. "Show Value" gives me the Y values of the graph, whereas "Show Label" gives me the X values. I want a set of text labels contained in a third column, usually (but not necessarily) adjacent to the other two columns.

At present I'm doing what you've described, but then having to overwrite each label in turn with the label that I actually want it to be. I'm trying to find a way to avoid having to do this.

Cheers,
DQR
 
I used your data in your first post to do exactly what you asked using the chart wizard. When selecting the data, be sure to include the colum with the AAA, etc.

Alternatively, after the fact, right click on an empty area of the chart and select 'Source Data...' and redefine the source data to include the AAA, etc. labels.

Then follow my earlier post to 'show label'.
 
If I include the column of labels in the source data, the chart the wizard generates is not an X-Y scatterplot in which Y is plotted against X. Instead, it's a chart of both the X and Y values against the numbers 1, 2 and 3. I've also tried your suggestion of redefining the source data after the chart is created, but without success.

I didn't mention earlier that I'm running Excel 97: could this be relevant?
 
I see that the labels I put on top of the table in my original posting have been "moved" because the message was written in Courier, but posted in Arial. The X and Y headings are actually positioned above the two columns of numbers: my apologies if this has caused any confusion.
 
You're right about the points not being X vs. Y. When I tried what I wrote, I saw the labels come up and didn't pay any attention to what the chart actually looked like. Sorry about that. But I agree that there should be some way to to this - unfortunately, I don't know what it is.
 
Ah well - at least I'm not missing an obvious trick. Many thanks for your time on this one.

Have a good weekend,
DQR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top