Excel – Plot a scatter, a line and a quadatic function in the same graph in Excel

microsoft excelmicrosoft-excel-2007

I have two groups of data. One group has three points: (0.5, 2), (1.5, 3) and (4, 5). The other group has two points: (0, 1) and (3, 4). I want to plot the first group as a scatter plot, and the second as a straight line segment, and a quadratic function $y=x^2$ over $x \in [0,5]$ in the same plot. I wonder how to do that in Excel?

I know how to plot the first group as a scatter plot. First create a column with data: 0.5, 1.5 and 4, and another column with data: 2, 3 and 5; then select the two columns, and click "Insert -> Scatter" and choose a type of scatter plot.

But I don't how to plot the other two, i.e. a line segment and a quadratic function.

I also don't know how to plot them in the same graph as the scatter plot. If I plot the second group of data, it will be plotted in another graph. How can I plot it in the same plot as the first group of data?

Excel 2007.

Best Answer

For the line segment, you just choose to plot as a scatter plot, but use a line to connect the points.

For the quadratic, you will need to compute a number of points on your curve and then plot them also as a scatter plot, and again, use a line to connect the points from your minimum X value up to your maximum X value.

Update (for Excel 2007 ... probably similar for other versions, but this is what I have in front of me):

To add an additional plot to your chart:

  1. Right click on an empty place in your chart and select "Select Data"
  2. Select "Add" from the Series list
  3. Optionally, name the series in the Series name textbox ... it will be given a default name if you don't provide one.
  4. Click on the Series X data textbox, and select the X values for your scatter plot
  5. Click on the Series Y data textbox, and select the Y values corresponding to the X values you just selected
  6. Press "OK"
Related Question