Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to create a line chart in Microsoft Excel 2007 with two data series, each with their own Y-axis.

First, I create a simple chart by selecting the two data series, and choosing Insert > Charts > Line from the Ribbon. I now see the following chart in my workbook:

enter image description here

I then continue my quest by right clicking one of the data series (lines) and choosing Format data series > Series Options > Secondary Axis. My chart is now looks like this:

enter image description here

This is almost what I want. I did not expect to see the gap between the last X-axis tick point (x = 5) and the secondary (right most) Y-axis. Why does Excel introduce this gap?

Is there anything I can do to avoid it? I have tried right clicking the X-axis and seleting Format Axis > Axis Options > Position Axis: Between tick marks, but that only introduces a similar gap on by the primary (left most) Y-axis.

UPDATE: The following data is sufficient for me to reproduce the problem. Paste it into Excel, select the block of numbers and create a line chart. It will not draw the exact same lines as above, but it will illustrate the problem with the right side "padding".

1       2       4       8       16
100     210     440     900     2000
share|improve this question
up vote 0 down vote accepted

You cannot do what you want with Line Chart, you have to use Scatterplot.

share|improve this answer

This confounded me for a long time, finally figured out a fix. On the top bar under Chart Tools, select Layout → Secondary Horizontal Axis and select the On Tick Mark option.

The seconday axis (which in most cases is the same as the primary) will pop up on the chart but it can be then deleted without screwing up the way the chart looks.

share|improve this answer
Thank you so much; the comment about using a scatterplot (accepted) did not actually help me. Using this approach you can use regular line and area chart options (or combinations thereof). – AJH Jul 24 '13 at 15:53

The only way I was able to reproduce this issue was by making the source of my lines have one extra row than my x-axis values. Is it possible you are doing that?

share|improve this answer
I am not aware that I should have any extra rows. Please, see the update to my question. – Jørn Schou-Rode Apr 9 '10 at 22:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .