4

I've been trying the most simple of things, creating a scatter plot in excel. I have one x-values and on set of y-values. Yet somehow excel thinks it knows better and creates its own set of x-values ranging between 0-10. Whereas my x-values range between 40-140. Manually changing the limits of the x-axis to 40 - 140 simply makes it so I don's see my data points any more, since excel change my x-values.

Label   X   Y
A       47  3.5
B       95  40.5
C       47  10.5
D       95  21.5
E       91  21.5
F       45  18.5
G       91  61.5
H       45  0.5
I       130 40.5
J       90  10.5

See picture for clarification. How do I fix this!?

scatter plot

scatter plot 2

7
  • Sounds like you might be creating a line plot instead of a scatter plot? Oct 23, 2017 at 3:11
  • 1
    How is the data formatted? I just added your data, and it's showing X-Axis values from 0 to 140. How's the X-Axis formatted in the chart? Mine the X axis have min/max bounds of 0 and 140, and are formatted as "General"
    – BruceWayne
    Oct 23, 2017 at 3:11
  • When you select the series and edit the series what does it show? I have to agree with Tim Williams that the results look like a line plot not a scatter x y plot.
    – Forward Ed
    Oct 23, 2017 at 3:14
  • 1
    Valid question Mr Batman. Format: Number. However, even if I change it to number, it does not change the plot.
    – J.A.Cado
    Oct 23, 2017 at 3:15
  • 1) I have added a second picture to show how the series look. 2) It is definitely a scatter plot.
    – J.A.Cado
    Oct 23, 2017 at 3:21

4 Answers 4

7

When copying and pasting data into a column it is important to ensure your data is coming across in the right format to be recognized by Excel. Simply setting the format in the ribbon to numeric from general does not change the way the data is stored. It merely changes the way the data is displayed.

When excel gets data in an unexpected format, strange things happen. Scatter plots become line plots because its seeing the X-axis as text instead of numbers. One way to spot this is if the numbers are not on the right side of the cell when no formatting has been applied to the cell. Another test would be to use a formula like the ones below assuming your data is in cell C3:

=ISTEXT(C3)

or

=ISNUMBER(C3)

On a side note, any number stored as text that is sent through a math operation will be converted to a number for the calculation. So one trick to convert a number stored as text is to use something like:

=C3+0
=C3*1
=--C3

Another option for converting columns of numbers stored as text is to use the Text-to-columns feature in the ribbon. On the last step it will give you the option to format the expected output to something excel will usually handle. This is really good for bringing across dates that are text and need to be converted, or numbers containing thousand separators like , or [space].

1
  • Thank you so much! great explanation. It was indeed an issue of having my x values NOT stored as a number. Once I changed all the values to format number (by reentering them), the issue was fixed.
    – J.A.Cado
    Oct 23, 2017 at 4:01
0

The most reliable method that I have found to ensure that the data to be plotted is numeric is to insert a 1 in an empty cell, copy it with ctrl-C, select the columns and choose Paste Special > Multiply. Any text data becomes numeric.

0

After verifying all my X (any Y) values were actually numbers, I found a solution: Right click on plot, Change Chart Type (FYI: Scatter with Straight lines was already selected), Change to Line Type.

Now repeat. Right click on plot, Change Chart Type, Change back to Scatter

You will lose the X axis Minimum and Maximum Bounds and the "Vertical axis crosses" value, but at least this works!

-2

FINALLY I FOUND AN ANSWER THAT HELPS HERE.

use =VALUE(cell reference) to make sure the xAxis values are seen by excel as numbers. Until this was done, my xAxis numbers were just spaced evenly across the axis.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.