cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
ruskicar
Level III

Use column name as a value for X axis

Hi,

can I use a value in column name as an X value to fit Y by X?

I have 10 columns with multiple rows, and for all rows the X is the same (i.e. the value in the column name).

Thanks.

 

4 REPLIES 4
txnelson
Super User

Re: Use column name as a value for X axis

I am not sure if I am understanding exactly what your data structure looks like, but if my interpretation is correct, the short answer is that you can not use the column header as a value. However, I am sure there is a way to make that work. It would really be helpful if you could provide a sample of your data,?
Jim
ruskicar
Level III

Re: Use column name as a value for X axis

Hi,

 

this is a screenshot of a sample of data structure.

For each row, the Y values are given in cells, while the X values should be the value of the column name (0.5, 1, 2, 4, ...) . I would like to use these X values to do Fit Y by X analysis, and to also plot a scatter plot where each row is different colour.

 

Thanks.

 

Screenshot 2021-07-12 at 14.51.37.png

ruskicar
Level III

Re: Use column name as a value for X axis

Hi,

 

I just discovered a simple solution: if I simply transpose the final table, the first column is the value of the column labels, and other columns are value of rows. Then it is easy to do Fit Y by X and to plot a scatter plot.

 

All the best.

txnelson
Super User

Re: Use column name as a value for X axis

You can also just stack all of the columns, and then you can do your fit y by x
Jim