Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#189477 - 14/11/2003 09:15 Excel Question: Swapping X and Y in scatter graph
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5682
Loc: London, UK
So, I've got some data that I'd like to plot on an X-Y scatter graph. Unfortunately, X and Y are the wrong way round in the spreadsheet, so that when I plot the graph, Excel puts my Y values along the X axis and my X values up the Y axis.

Double unfortunately, I can't swap the columns in the source data -- the file's generated as CSV by another application.

How do I persuade Excel to plot the axes the other way round?
_________________________
-- roger

Top
#189478 - 14/11/2003 09:21 Re: Excel Question: Swapping X and Y in scatter graph [Re: Roger]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Can't you just change what cells it uses for each axis in the series tab? Right click the graph, select Source Data and then Series. There should be a field for X values and a field for Y values.

Top
#189479 - 14/11/2003 09:22 Re: Excel Question: Swapping X and Y in scatter graph [Re: Roger]
CrackersMcCheese
pooh-bah

Registered: 14/01/2002
Posts: 2489
Using your control key, highlight column you want for x, release control key. Then highlight y, release control key - click on the graph button and there ya go!

Top
#189480 - 14/11/2003 09:23 Re: Excel Question: Swapping X and Y in scatter gr [Re: Roger]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4174
Loc: Cambridge, England
Double unfortunately, I can't swap the columns in the source data -- the file's generated as CSV by another application.
awk -v FS=, -v OFS=, -- '{print $2, $1 }' < xy.csv > yx.csv

Peter

Top
#189481 - 14/11/2003 21:49 Re: Excel Question: Swapping X and Y in scatter gr [Re: tman]
gbeer
carpal tunnel

Registered: 17/12/2000
Posts: 2665
Loc: Manteca, California
What he said, Just swap the chart's references around.

(edit: The apostrophy fell off, it's back now.)


Edited by gbeer (14/11/2003 21:51)
_________________________
Glenn

Top
#189482 - 17/11/2003 03:32 Re: Excel Question: Swapping X and Y in scatter graph [Re: CrackersMcCheese]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5682
Loc: London, UK
tman: Can't you just change what cells it uses for each axis in the series tab? Right click the graph, select Source Data and then Series. There should be a field for X values and a field for Y values.

Excellent. That does exactly the right thing. Thanks.

PhilipOHare: Using your control key, highlight column you want for x, release control key. Then highlight y, release control key - click on the graph button and there ya go!

Doesn't work. At least not in Office XP.
_________________________
-- roger

Top