Excel plots too many x axis entries (more than inserted data)

99 Views Asked by At

I'm on MS Excel 365, trying to plot a simple plot, but after inserting a total of only 8 numbers as a data source for the plot (by selecting the appropriate cells), I get 50 entries on the x axis...

I tried to format the x axis to exactly 8 entries by editing the data source of the x axis to ={"1","1.5","2","2.5","3","3.5","4"}, but then it just leaves the other 42 blank.

This is how it looks like before I Formatted The X Axis: The Plot Before Formatting The X Axis

And this is what happens after I formated the x axis to ={"1","1.5","2","2.5","3","3.5","4"}: After Formatting the X Axis

I also tried formatting the axis to a text axis instead of Auto, but it doesn't let me edit the text on the axis for some reason.. Anyway, I don't want to go this path, I prefer to understand why the straight forward way didn't work and how to resolve it.

Appreciate any help, thanks!


Added information following a comment:

My data are numbers on my sheet, I selected 8 cells, each of them is a number from 61.77 to 84.36 as you can see in the attached screenshots. I didn't have numbers for the X axis and for some reason Excel decided that the X axis will be 50 entries of numbers from 1 to 50, so I tried to edit that through Select Data->Edit Horizontal Axis: edit axis - in this screenshot you can see where I've edited this - I tried writing 1,1.5,2,2.5,3,3.5,4 and hit enter and then instead of replacing 50 entries with these 8, it replaced the first 8 as intended but left 42 blank ones as I mentioned before and you can see here: screenshot with blanks. Then I opened this editing window again and saw that Excel wrote it as {"1","1.5","2","2.5","3","3.5","4"}, meaning a set of strings instead of the list of numbers I wrote before (I didn't write it like this before).

Hope this clarifies the confusion I made.

Thank you!!


Another update - I tried creating a set of values on seperate cells according to a suggestion here, unfortunately the problems remains: problem remains after using separate cells. I suspected it's not the problem since I've created another chart the same way I created this one and the X axis was fine (Excel created 4 X axis entries according to the 4 Y Axis entries I selected from 4 different cells - as oppose to this chart where I selected 8 cells and got 50 X axis entries for some reason...)

2

There are 2 best solutions below

1
MGonet On

To make a scatter (XY) chart you need numerical data for both axes. And the number of data should be equal. In your example you have 8 values for y an only 7 values for x.
Maybe this is a source of your problem?

XY chart

If you mark only y values you get a chart with x values equal to 1, 2, 3, ...

xy chart2

0
DataBunny On

It will help if we could see how the data is arranged in the sheet. I could see only a peek of your underlying data, but it seems that your X and Y values are not side by side on the same rows. Try rearranging them in two adjacent columns and see what happens.