ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   In excel scatter plot with 2 series, how do I connect xy coordinat (https://www.excelbanter.com/charts-charting-excel/16008-excel-scatter-plot-2-series-how-do-i-connect-xy-coordinat.html)

Anne-SFRunner

In excel scatter plot with 2 series, how do I connect xy coordinat
 
I have an xy-scatter plot with 2 series, say Series1 and Series2. The data
is arranged in 4 columns, Series1-x-values, Series1-y-values,
Series2-x-values and Series2-y-values. I would like to draw a line between
the Series 1 and Series 2 xy-coordinate for each row in my data. Does anyone
have good tips on doing this? I would appreciate any help.
Thanks,
Anne

Jon Peltier

Hi Anne -

Essentially you need a two-point series for each additional line you
need to draw. A bit of work, but here's a manual approach.

Suppose your data's in A1:D10, and Series 1 has X in A1:A10 and Y in
B1:B10, while Series 2 has X in C1:C10 and Y in D1:D10. Choose Source
Data from the Chart menu, and click on the Series tab. Click on the Add
button, put the cursor into the X Values box, then select cell A1, and
hold CTRL while selecting C1. The X Values box will display

=Sheet1!$A$1,Sheet1!$C$1

Clear the ={1} from the Y Values box, keep the cursor in the box, select
cell B1, and hold CTRL while selecting D1. The Y Values box shows

=Sheet1!$B$1,Sheet1!$D$1

Click Add again, and this time pick your pairs of points from row 2.
Repeat until you've run out of rows of your data.

With a little programming, you can make this less tedious.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Anne-SFRunner wrote:

I have an xy-scatter plot with 2 series, say Series1 and Series2. The data
is arranged in 4 columns, Series1-x-values, Series1-y-values,
Series2-x-values and Series2-y-values. I would like to draw a line between
the Series 1 and Series 2 xy-coordinate for each row in my data. Does anyone
have good tips on doing this? I would appreciate any help.
Thanks,
Anne


Anne-SFRunner

Jon,
That seems to do the trick. Thank you for your quick help--we were stumped.
Cheers,
Anne

"Jon Peltier" wrote:

Hi Anne -

Essentially you need a two-point series for each additional line you
need to draw. A bit of work, but here's a manual approach.

Suppose your data's in A1:D10, and Series 1 has X in A1:A10 and Y in
B1:B10, while Series 2 has X in C1:C10 and Y in D1:D10. Choose Source
Data from the Chart menu, and click on the Series tab. Click on the Add
button, put the cursor into the X Values box, then select cell A1, and
hold CTRL while selecting C1. The X Values box will display

=Sheet1!$A$1,Sheet1!$C$1

Clear the ={1} from the Y Values box, keep the cursor in the box, select
cell B1, and hold CTRL while selecting D1. The Y Values box shows

=Sheet1!$B$1,Sheet1!$D$1

Click Add again, and this time pick your pairs of points from row 2.
Repeat until you've run out of rows of your data.

With a little programming, you can make this less tedious.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Anne-SFRunner wrote:

I have an xy-scatter plot with 2 series, say Series1 and Series2. The data
is arranged in 4 columns, Series1-x-values, Series1-y-values,
Series2-x-values and Series2-y-values. I would like to draw a line between
the Series 1 and Series 2 xy-coordinate for each row in my data. Does anyone
have good tips on doing this? I would appreciate any help.
Thanks,
Anne




All times are GMT +1. The time now is 02:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com