Swap x and y axis without manually swapping values
Asked Answered
C

5

21

So I have a set of data that has conditional formatting. Basically it's a set of photometric measurements of stars that I want to put on a chart with different colors for stars in different ranges of Color Index (basically color them by their spectral class). So my data looks like this: Stars Data

  • The first column is the Absolute Magnitude (M) of the star - I want this on the X axis
  • The rest of the columns are the different spectral classes that have values from another column only in a particular range. - I want these on the Y axis.
  • Currently the chart looks like this and all I want to do is swap the axes, but I cant seem to do it.
Consistence answered 14/8, 2014 at 12:1 Comment(0)
C
9
  1. Click somewhere on the chart to select it.

  2. You should now see 3 new tabs appear at the top of the screen called "Design", "Layout" and "Format".

  3. Click on the "Design" tab.

  4. There will be a button called "Switch Row/Column" within the "data" group, click it.

Campanula answered 14/8, 2014 at 12:41 Comment(5)
What do you do if you don't get a Design tab?Bradfield
This does not swap the X and Y axes, this switches column data for row data. I haven't found any easy way of switching both axis which is a real pain.Aruwimi
@user1901493 If you want to switch the selection of both axis, just drag the selection boxes over (When you click on the chart, you can see two highlighted boxes on your data, swap them). That's the easiest way I know.Campanula
That is indeed a possibility I hadn't considered. Thank you!Aruwimi
For switching x and y axis (and not column and row simply), right click, go to select data option, swap the values in the "x values" and "y values" text-fields.Negligence
W
24

-Right click on either axis

-Click "Select Data..."

-Then Press the "Edit" button

-Copy the "Series X values" to the "Series Y values" and vise versa finally hit ok

I found this answer on this youtube video https://www.youtube.com/watch?v=xLKIWWIWltE

Winshell answered 7/9, 2017 at 16:50 Comment(1)
This works for scatterplot. Wonder why there is not button for it.Ecumenicalism
C
9
  1. Click somewhere on the chart to select it.

  2. You should now see 3 new tabs appear at the top of the screen called "Design", "Layout" and "Format".

  3. Click on the "Design" tab.

  4. There will be a button called "Switch Row/Column" within the "data" group, click it.

Campanula answered 14/8, 2014 at 12:41 Comment(5)
What do you do if you don't get a Design tab?Bradfield
This does not swap the X and Y axes, this switches column data for row data. I haven't found any easy way of switching both axis which is a real pain.Aruwimi
@user1901493 If you want to switch the selection of both axis, just drag the selection boxes over (When you click on the chart, you can see two highlighted boxes on your data, swap them). That's the easiest way I know.Campanula
That is indeed a possibility I hadn't considered. Thank you!Aruwimi
For switching x and y axis (and not column and row simply), right click, go to select data option, swap the values in the "x values" and "y values" text-fields.Negligence
B
3

Microsoft Excel for Mac 2011 v 14.5.9

  • Click on the chart
  • Press the "Switch Plot" button under the "Charts" tab
Bradfield answered 10/1, 2016 at 23:16 Comment(0)
E
2

Using Excel 2010 x64. XY plot: I could not see no tabs (it is late and I am probably tired blind, 250 limit?). Here is what worked for me:

Swap the data columns, to end with X_data in column A and Y_data in column B.

My original data had Y_data in column A and X_data in column B, and the graph was rotated 90deg clockwise. I was suffering. Then it hit me: an Excel XY plot literally wants {x,y} pairs, i.e. X_data in first column and Y_data in second column. But it does not tell you this right away. For me an XY plot means Y=f(X) plotted.

Episcopalian answered 8/2, 2016 at 6:55 Comment(1)
Thanks. Excel puts data according to the column position. To swap coordinates, one option is to copy the left column to the right. Solved for me too.Heavyset
A
0

In Numbers, click on the chart. Then in the BOTTOM LEFT corner there is the the option to either 'Plot Rows as Series'or 'Plot Columns as series'

Adiel answered 14/9, 2020 at 7:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.