Plot Two Graphs in Excel: A Complete Step-by-Step Guide
In this article
To plot two graphs (or two data series) in Excel, you select your data range and insert a chart, or use the Select Data menu to add a second series to an existing chart. This allows you to compare two different sets of values against a single X-axis, which is essential for analyzing trends, comparing performance metrics, or visualizing correlations between two variables.
What You'll Need
- A computer with Microsoft Excel installed (Windows or macOS).
- A dataset organized in columns, where the first column typically represents the X-axis (e.g., dates, time, or categories) and subsequent columns represent the Y-axis values for each graph.
- Clean data with no empty rows or columns between the series you wish to plot.
Step-by-Step
Depending on whether you are starting from scratch or adding to an existing chart, there are two primary methods. Note that menu labels may differ slightly depending on your version of Excel or operating system.
Method 1: Plotting Both Series Simultaneously
- Organize Your Data: Arrange your data in a table. Place your X-axis labels (the independent variable) in the leftmost column. Place the values for your first graph in the second column and the values for your second graph in the third column. Ensure each column has a clear header (e.g., "Month", "Product A Sales", "Product B Sales").
- Select the Data Range: Click and drag your mouse to highlight all three columns, including the headers. If your data is in a non-contiguous range, hold the Ctrl key (Windows) or Command key (Mac) to select multiple separate areas.
- Insert the Chart: Navigate to the Insert tab on the top ribbon. In the Charts group, choose the type of graph you want. For comparing trends over time, a Line Chart or Scatter Plot is usually best. Click the specific chart icon to insert it into your worksheet.
- Verify the Series: Excel should automatically recognize the first column as the X-axis and the next two columns as separate data series. You will see two differently colored lines or sets of markers on the plot.
- Add a Legend: If the legend did not appear automatically, click the chart, click the Chart Elements button (the plus sign icon on the top right of the chart in Windows), and check the Legend box. This tells the viewer which color corresponds to which data set.
Method 2: Adding a Second Graph to an Existing Chart
- Create the First Graph: Follow the steps above to create a chart using only your X-axis and your first Y-axis column.
- Open Select Data: Right-click anywhere in the chart area and select Select Data... from the context menu. This opens the Select Data Source dialog box.
- Add a New Series: Under the Legend Entries (Series) section on the left side of the dialog box, click the Add button.
- Define the Series Name: In the Series name field, click the cell containing the header for your second data set (e.g., click the cell that says "Product B Sales").
- Define the Series Values: Clear the default content in the Series values box. While the cursor is in that box, highlight the range of cells containing the numerical data for your second graph.
- Confirm Changes: Click OK in the Edit Series window, and then click OK again in the Select Data Source window. Your second line or set of points will now appear on the graph.
Method 3: Plotting with a Secondary Y-Axis
If your two data series use completely different scales (for example, one is measured in percentages and the other in millions of dollars), plotting them on the same axis will make one line look flat. In this case, you need a secondary axis.
- Select the Second Series: Click directly on the line or markers of the second data series within the chart to select it.
- Format Data Series: Right-click the selected series and choose Format Data Series.... A pane will appear on the right side of the screen.
- Assign Secondary Axis: Under the Series Options tab (the icon that looks like a small bar chart), select the radio button for Secondary Axis.
- Adjust Labels: Excel will now add a second vertical axis on the right side of the chart. You should now add axis titles to both the left and right sides so the viewer knows which scale applies to which line.
Common Mistakes
- Incorrect Data Selection: Selecting the X-axis labels as a data series rather than the axis. If your X-axis appears as a line on the graph instead of labels at the bottom, you likely included the X-column in the "Series Values" instead of the "Horizontal (Category) Axis Labels".
- Mixing Data Types: Attempting to plot text values as Y-axis data. Excel cannot plot text on a value axis; ensure all your Y-axis columns contain only numbers.
- Ignoring Scale Differences: Plotting a value of 10 and a value of 10,000 on the same axis. This results in the smaller value appearing as a flat line at zero, leading to a misleading visualization. Always check if a secondary axis is required.
- Hidden Data: If you filter your data table, the corresponding points may disappear from the graph. If you want the graph to remain static regardless of filters, you must adjust the hidden and empty cell settings in the Select Data menu.
Tips
- Use Named Ranges: If your data grows frequently, convert your data range into an official Excel Table (Ctrl+T). When you plot a table, the chart will automatically update whenever you add new rows to the bottom of the table.
- Contrast Colors: Use high-contrast colors for your two series. Avoid using red and green together to ensure your charts are accessible to people with color vision deficiency.
- Consistent Formatting: To make the graph professional, remove unnecessary gridlines or use a subtle grey. Ensure the font size of the axis labels is legible when the chart is shrunk to fit a report.
- Marker Customization: In a scatter plot with two series, use different marker shapes (e.g., circles for Series 1 and squares for Series 2) in addition to different colors. This makes the data distinguishable even if the chart is printed in black and white.
Troubleshooting
If your graph does not look the way you expected, try these steps in order:
- If the X-axis is numbered 1, 2, 3... instead of your labels: Right-click the chart, go to Select Data, and look at the Horizontal (Category) Axis Labels section on the right. Click Edit and select the range of cells containing your actual labels.
- If one line is missing: Check if the data for that series is zero or empty. Also, check the Format Data Series pane to ensure the series isn't accidentally assigned to a secondary axis that is scaled so high the line is hidden at the bottom.
- If the chart is blank: Ensure that your numbers are actually formatted as "Number" or "General" and not as "Text". If numbers are stored as text, Excel cannot plot them. You can fix this by selecting the cells and using the warning icon to Convert to Number.
- If the lines are jagged or out of order: This usually happens in Line Charts when the X-axis is not sorted. Sort your source data table by the X-axis column (e.g., sort by date from oldest to newest) to ensure the line flows logically from left to right.
Frequently Asked Questions
Can I plot more than two graphs in one chart?
Yes. You can add as many series as you need by repeating the Add process in the Select Data menu. However, be cautious of "chart clutter"; once you exceed four or five series, the graph often becomes difficult to read.
What is the difference between a Line Chart and a Scatter Plot for two series?
A Line Chart treats the X-axis as categories (labels), meaning the spacing between points is always equal. A Scatter Plot treats the X-axis as numerical values, meaning the distance between points is proportional to the actual difference in the numbers.
How do I change the color of just one of the lines?
Click once to select the entire chart, then click a second time specifically on the line you wish to change. With only that line selected, right-click and choose Format Data Series, then change the color under the Fill & Line (paint bucket) icon.
Can I plot two different types of graphs (like a bar and a line) together?
Yes. This is called a Combo Chart. Go to Insert > Charts > Combo Chart. This allows you to set Series 1 as a Clustered Column and Series 2 as a Line, often utilizing a secondary axis for the line.
Why does my second series appear as a single dot?
This usually happens if you have selected only one cell for the series values or if the rest of the data in that column is empty or contains errors (like #DIV/0!). Verify your data range in the Select Data menu.