Creating a line plot from a data table means selecting the two columns that carry your x-values and y-values, inserting a line chart from your spreadsheet's Insert menu, then fixing three things the default chart gets wrong: category order, text-formatted numbers, and missing-value gaps. In Excel, Google Sheets, and Python, the whole job takes five minutes once the table is clean, and the table's structure decides whether that five minutes becomes fifty.

Clean the Table Before You Build Anything

Most broken line plots are broken at the table, not the chart. Before you touch the Insert menu, confirm the column you intend as the horizontal axis holds numbers or dates stored as numbers, not text. A date column pasted from a PDF or exported from a legacy system often arrives left-aligned in the cell, which signals text storage and will produce an evenly spaced, meaningless axis.

Check for blanks in the y-column and decide in advance how each one should read. A blank might mean "no measurement taken," which should leave a gap in the line, or "measured zero," which should plot at zero. Those are different facts, and the chart will silently treat them the same unless you choose. Excel's Switch Row/Column behavior also depends on table shape, so confirm whether your series runs down rows or across columns before inserting anything.

Sort order matters less than people assume for line charts but more than they expect for dates. If your x-values are dates, sort ascending so the line reads left to right in time order. If your x-values are categories like quarters or months stored as text, the chart plots them in the order they appear in the sheet, so arrange the rows deliberately rather than alphabetically.

Keep the header row intact but free of merged cells. Merged headers are the single most common reason a chart pulls the wrong range or produces a legend entry named "Series1." One clean header per column, one data type per column, and no totals row tacked onto the bottom of the range β€” a totals row will plot as a spike at the end of your line and nobody will notice until a meeting.

Insert the Chart in Excel With the Right Range

In Excel for Microsoft 365 and Excel 2021, the fastest path is to click any cell inside your two-column table and press Alt+F1 on Windows or F1 on Mac with the chart shortcuts active; Excel reads the surrounding region and inserts a chart on the same sheet. The Insert tab's Recommended Charts button will usually offer a line chart first when your left column is numeric or date-formatted, because Excel inspects the data types before suggesting a type.

For control over the exact range, select the two columns including headers, then choose Insert > Charts > Insert Line or Area Chart > Line with Markers. Do not select a third column of identifiers unless you want a second series β€” a common accident when tables have an ID column to the left. If the chart comes out with your categories on the vertical axis, open Chart Design > Switch Row/Column and it will flip.

The result lands as an embedded chart object on the sheet. Move it by dragging its border, and resize by dragging a corner handle while holding Alt to snap to cell edges if you want it aligned with the grid. Excel 2016 and later share this exact menu path, so a version difference is unlikely to strand you; the older Excel 2010 menu places the same command under Insert > Line.

Failure handling: if the inserted chart is empty or shows a single flat line, your selected range likely included only one column. Delete the chart, reselect both columns with headers, and reinsert. If the legend shows "Series1" instead of your header text, your header cell is either blank, merged, or formatted as a number β€” clear the formatting and reinsert rather than renaming the series by hand.

Build the Same Plot in Google Sheets in Four Moves

Google Sheets follows the same logic with different labels. Select your two columns including the header row, then choose Insert > Chart. Sheets opens the Chart editor sidebar on the Setup tab, and if it guesses wrong, change the Chart type dropdown to Line chart. The checkbox labeled "Use row 1 as headers" controls whether your header text becomes the series name or a fake data point.

The Setup tab's X-axis field is where Sheets diverges from Excel in a way that trips people up. By default, Sheets may treat your first column as a data series rather than the axis, plotting both columns as separate lines against row numbers. Fix it by opening the X-axis dropdown and selecting your intended category or date column explicitly. The dropdown only lists columns inside the selected range, so widen the selection if your axis column is missing from it.

Sheets handles text-formatted dates more forgivingly than Excel in the chart itself but still spaces them evenly by row rather than by elapsed time, which distorts any series with irregular intervals. For a true time axis, your date column must hold real date values, which you can confirm by switching the column format to Format > Number > Date and watching whether the values reformat or stay put as text.

One version-specific note: the Chart editor moved to a right-hand sidebar in the 2017 redesign and has stayed there, so any tutorial describing a "Chart editor dialog box" predates the current interface. If you're following an older walkthrough and can't find a button, the sidebar is where it went.

Use the InsertChart Shortcut in Python When the Table Is a CSV

When your data table lives in a CSV or a pandas DataFrame, the line plot is one call. The pandas DataFrame.plot.line() method wraps matplotlib and takes the column name for the x-axis through the x parameter, so df.plot.line(x='month', y='revenue') produces the chart with axis labels already set from the column names. This is faster than assembling matplotlib figure and axis objects by hand when the table is already loaded.

The catch is dtype. Pandas will happily plot a column of numeric strings as categories, spacing them evenly and producing a line that looks plausible but is wrong for any continuous measure. Run df.dtypes before plotting; if your y-column reports object instead of int64 or float64, convert it with pd.to_numeric(df['revenue'], errors='coerce') and check how many values became NaN, because coerce silently converts unparseable entries to missing.

For date axes, convert the column with pd.to_datetime() and then call df.plot.line(x='date', y='value'). Matplotlib will render a true time axis with correct spacing between irregular intervals. Without the conversion, pandas treats date strings as categorical labels and spaces them evenly, so a table with a three-week gap and a two-day gap will look identical on the chart.

If the plot appears with dates crammed into unreadable labels, rotate them with plt.xticks(rotation=45) after the plot call, or use fig.autofmt_xdate() for automatic date label handling. The plotting call returns a matplotlib Axes object, so any styling you'd apply to a hand-built chart applies here too β€” you're not locked into pandas defaults.

Match the Chart Type to What the Data Actually Says

A line plot asserts continuity between points. That assertion is only honest when the x-axis represents ordered progression β€” time, sequence, dose, distance. When the x-axis is unordered categories like product names or regions, a line chart implies a trend that doesn't exist, and a bar chart is the truthful choice.

Data situation Correct chart Why the line plot fails
Measurements over consecutive months Line with markers None β€” this is the line plot's home case
Five separate regions compared once Horizontal bar Line implies a progression between regions
Irregular measurement dates Line on a true date axis Even spacing misrepresents elapsed time
Two series on different scales (revenue vs. count) Line with secondary axis One series flattens into the baseline
Values with genuine gaps (no reading taken) Line with gaps shown Connecting across gaps invents data
Single time point per category, no order Column chart Order is arbitrary, so the line is fiction

The secondary-axis case deserves a worked number. If monthly revenue runs from $40,000 to $95,000 and monthly order count runs from 300 to 900, plotting both on one axis leaves the order count as a nearly flat line near the bottom, because the axis scales to the larger magnitude. Excel adds a secondary axis through Format Axis > Series Options, or in current versions by right-clicking the series and choosing Format Data Series > Secondary Axis; Sheets uses the Axis section of the Customize tab with a Right axis assignment.

The mixed-unit rule: two series belong on one axis only when they share units and rough magnitude. Revenue in dollars and headcount in people never do. Adding a secondary axis makes the chart readable but also makes the crossover point arbitrary, since it depends on where each axis's minimum and maximum land β€” so label both axes explicitly and never let a reader assume a crossing means anything causal.

Fix the Three Defaults That Break Line Plots

The first default to fix is category-versus-date spacing, covered above in the Sheets and Python sections but worth stating as a universal: any x-axis of dates must render on a time scale, or irregular intervals get flattened. In Excel this happens automatically when the date cells are true dates; if your axis labels show every date crammed together, your cells are text.

The second default is the smoothed line. Excel's "Smoothed line" checkbox and Sheets' "Smooth line" option draw a curve between points that implies intermediate values you never measured. For monthly sales, the curve can dip below your lowest actual month. Leave smoothing off unless the underlying phenomenon is genuinely continuous and smooth, and check whether enabling it changes any local minimum or maximum.

The third default is the gap. Excel connects across blank cells by default, drawing a straight line through a period where you have no data. Change this under Select Data > Hidden and Empty Cells, where you can choose Gaps, Zero, or Connect Data Points with Line. For a table with a missing month, Gaps is almost always right, because a connected line through a missing reading is an invented value presented as measured.

The audit step after fixing all three: hover or select each plotted point and confirm its displayed value matches the source cell. A chart built from a partially shifted range will look smooth and plausible while being off by one row, and the fastest way to catch it is to check the first and last points against the sheet. Excel's Select Data Source dialog shows the exact range references, so a misaligned range is visible there as a block of cells offset from the header row.

Add Titles, Axis Labels, and Units That Survive a Screenshot

A line plot leaves your screen as a screenshot pasted into a slide or a PDF, so every label must be readable without you in the room. Add a chart title that states the measure and the period β€” "Monthly Revenue, January–December 2026" β€” rather than accepting Excel's default "Revenue" or Sheets' "Chart title" placeholder. Excel's Chart Design > Add Chart Element > Chart Title and Sheets' Customize > Chart & axis titles do the same job in one click each.

Label the vertical axis with the unit. A y-axis reading "40,000 to 95,000" is ambiguous between dollars, thousands of dollars, and units; "Revenue (USD thousands)" removes the guess. Excel's number format on the axis handles the thousands scaling so you're not printing six-digit figures, and Sheets' Customize > Vertical axis > Number format offers the same control. Precision matters here: two decimal places on a six-figure number is false precision and makes the axis unreadable.

For multiple series, keep the legend but make it do work. Rename each series from its header text if the header is an abbreviation, and order the legend to match the visual top-to-bottom of the lines at their right ends, so a reader scanning the legend can find each line without hunting. In Excel, right-click the legend and choose Select Data to rename series; in Sheets, the Series section of the Customize tab lets you rename each series directly.

The common failure at this stage is a chart built on a range that excludes the header, producing a legend that says "Series1" and "Series2." Renaming manually works but breaks when the range updates, because the manual name isn't tied to a cell. Fix the underlying cause by expanding the range to include the header row, then let the legend populate from it.

Handle Missing Data and Outliers Without Lying

A line plot is the most forgiving chart for outliers and the most dangerous. A single bad measurement β€” a sensor that logged 10,000 instead of 1,000 β€” compresses every other point toward the axis and makes a real trend invisible. The first response is not to delete the point but to check it: compare the source cell against the raw log, and if the value is an entry error, correct it rather than hiding it.

When a point is genuinely anomalous but real, the choice is presentation, not deletion. Options include extending the y-axis with a log scale for data spanning orders of magnitude, or annotating the outlier in the chart with a callout so the reader knows it's real and why. Excel's log scale sits in Format Axis > Axis Options > Logarithmic scale, and it's the right move when your values span three or more orders of magnitude; on narrow ranges it exaggerates small differences and misleads.

For missing periods, decide whether the gap is meaningful. A blank month in a monthly revenue table might mean zero sales for a discontinued product, or a month nobody reported. Gaps in the chart signal "no measurement," a zero-plotted point signals "measured as nothing," and the two carry opposite implications for anyone reading the trend. Ask the person who owns the table which it is, because the chart can't tell you.

Edge case worth planning for: a table where the y-values include both positive and negative figures. Excel and Sheets will place the category axis at zero by default, which is correct, but a series that crosses zero will show the line passing through the axis and the markers will sit on it, making them hard to read. Setting the category axis to cross "at maximum category" moves it to the bottom of the plot area, and Excel's Format Axis > Labels > Label Position > Low keeps every label below the axis line.

Update the Plot When the Table Changes

A chart built from a fixed range doesn't grow when you add rows. In Excel, the fix is to format the source table as an Excel Table first (Ctrl+T or Insert > Table), then insert the chart from that table; new rows added to the table's bottom are absorbed into the chart's range automatically. Without the table format, adding a December row leaves the chart showing through November, and the omission is invisible unless you count the points.

For ranges you don't want to convert to a table, a defined name with an OFFSET or INDEX-based formula makes the chart range dynamic. The mechanics: define a name whose formula spans from the header to the last non-empty cell using COUNTA, then point the chart's series at the name instead of explicit cell references. This is more fragile than a formatted table because a blank cell mid-column shortens the counted range, so the table route is the recommendation for anything that gets updated by someone other than you.

Google Sheets handles dynamic ranges through named ranges (Data > Named ranges) and the chart's range picker accepting a named range. The same fragility applies: a blank in the middle of a named range shortens what the chart sees. If your table updates regularly, keep the data contiguous and sort or filter rather than leaving gaps between blocks.

When the table's structure changes β€” a column renamed, a row inserted above the header β€” the chart will either follow correctly or silently point at the wrong cells. After any structural edit, open the chart's data-source dialog and confirm the range still starts at the header and ends at the last row. A quick sanity check on the series count and the point count against the table's row count catches most drifts in under a minute.

Common Mistakes That Produce a Wrong but Plausible Plot

The first mistake is plotting an index or row number instead of the intended x-values. This happens when the x-column wasn't included in the selected range, and the chart substitutes 1, 2, 3. The plot looks perfectly reasonable and is completely disconnected from the data's meaning. Always check the x-axis labels against the actual x-column values at the first and last points.

The second is a y-column stored as text. Left-aligned numbers in a spreadsheet are the tell, and the resulting chart either plots zeros or drops the series entirely. Convert the column with the spreadsheet's text-to-columns or value function, and confirm the dtype before inserting. In pandas, the equivalent check is df.dtypes reporting float64 or int64.

The third is a date column parsed inconsistently. A table where some rows carry dates in MM/DD and others in DD/MM has no single meaning, and even a "correct" chart will plot some points in the wrong month. This is a table problem, not a chart problem, and the only fix is standardizing the source rows before any plotting. Sorting the table by the raw date column and looking for out-of-order rows catches most mixed-format cases in a single pass.

The fourth is charting an aggregate alongside its components. A row called "Total" at the bottom of a monthly table is a summary, not a data point, and including it plots a spike. Excel's Table format excludes a totals row from the chart automatically, but plain ranges don't. Crop the range to the data rows before inserting, or convert to a table and use the Total Row feature, which sits outside the plotted range by design.

FAQ

Can I make a line plot in a spreadsheet that only offers bar charts?

Yes β€” the line chart type is standard in Excel, Google Sheets, LibreOffice Calc, and Numbers, and none of them omit it. If the option appears missing, you're likely in a chart-type picker that filters by data shape; Charts > All Charts or the equivalent full list exposes it. The only genuine absence is in older or stripped-down mobile editors, where switching to the desktop app is the fastest fix.

Why does my line plot show dots in a straight horizontal row?

A perfectly straight horizontal line or a row of evenly spaced dots almost always means the y-column was read as text or as dates rather than numbers. Spreadsheet engines plot non-numeric y-values as zero or as missing, which produces a flat line at the axis or scattered markers. Check for left-aligned values and a stored dtype of "text" or "object," then convert and reinsert the chart.

How do I plot two series with different units on the same chart?

Assign the second series to a secondary axis: in Excel, right-click the series and choose Format Data Series > Secondary Axis; in Sheets, the Customize tab's Series section has a Right axis option. Without this, the larger-magnitude series flattens the smaller one into the baseline. Label both axes with units, because a secondary axis makes crossings between the two lines meaningless without explicit interpretation.

Does the chart update automatically when I add a row to the table?

Only if the chart was built from a formatted Excel Table or a defined dynamic range. A chart pointed at a fixed grid reference will stop at the last row of the original range, so December data added in January won't appear. The reliable fix is Ctrl+T to make the range a Table before inserting the chart, then adding new rows at the table's bottom edge.

What's the difference between a line chart and a scatter plot with lines?

A line chart spaces points evenly and treats the x-axis as ordered categories, while a scatter plot places points at their actual x-values and can draw connecting lines. If your x-values are irregular β€” a table of measurements taken at days 1, 4, 9, and 30 β€” a scatter plot with lines shows the true spacing and a line chart flattens it. Use the scatter-with-lines type for irregular numeric x-values and the line chart for evenly spaced categories.

Can I label each point with its value?

Excel has no built-in per-point data labels for line series beyond the standard Data Labels toggle, which labels every point and clutters fast; Sheets' Customize > Series > Data labels offers the same all-or-nothing control. For selective labels, either build the labels as a text series plotted with no line or annotate the few points that matter with callout shapes. A chart with every point labeled is usually harder to read than one with none.

How do I export the finished line plot for a report?

Copy the chart object and paste it into Word or PowerPoint as a picture to freeze it, or paste it as a linked Excel chart via Paste Special > Paste Link to keep it updating when the source workbook changes. For PDF reports, print the sheet to PDF with the chart sized on the page, or export the chart as an image through right-click > Save as Picture. Google Sheets exports charts through the three-dot menu on the chart > Download > PNG or SVG.