# Plotting two matrices in Excel

1. Jan 5, 2017

### joshmccraney

Hi PF!

I have two matrices of equal dimensions. I would like to plot them such that row $i$ of matrix 1 corresponds the x-axis and row $i$ of matrix 2 corresponds to the y axis, so that row $i$ of matrix 1 and matrix 2 together give a coordinate. Does anyone know how to do this quickly?

Thanks!

2. Jan 6, 2017

### Staff: Mentor

Mark the row of matrix 1, then mark the row of matrix 2 (with ctrl to mark both at the same time), add an x-y-diagram. Done.

If that doesn't work for some reason: Mark the row of matrix 2, add a point (x/y) diagram, right-click on the data points to edit the data source, edit your line to add the x-coordinate reference. The details of the steps vary a bit between Excel versions.

3. Jan 11, 2017

### joshmccraney

Thanks for your response mfb! I tried following your steps, and this works for plotting row by row, but isn't there a way to automate the process?

4. Jan 11, 2017

### Staff: Mentor

You can write a macro. The recording function helps to get the right commands.