Ручная настройка нумерации осей на диаграмме Excel

34899
Hamed

Я хочу отрегулировать ось X моей диаграммы рассеяния в соответствии с точками на моей диаграмме в MS-Excel 2010. В некоторых руководствах я видел, что я могу изменить ее, отредактировав «Метки оси» в «Выбор данных». Как вы можете видеть на картинке ниже, эта кнопка не активирована для меня. На диаграмме я хочу изменить метки оси X на (0,8 1,0 1,3 1,5 1,7).

Sample Data

3
В своем вопросе вы ссылаетесь на Word 2010 - вы имеете в виду Excel 2010? dav 8 лет назад 0

4 ответа на вопрос

5
Jon Peltier

It's irregular not to show normal axis labels, because it may cause a lack of comprehension in whoever is reading the chart. I know I would be distracted thinking, "Why did he choose to do that?" But people ask all kinds of questions.

So here is how you'd do what you want.

Add a column of data with all zeros. This will produce a series of data points along the horizontal axis.

Make your chart with all the data (below left).

Adjust your axis as desired (below right).

data and beginning of chart formatting

Hide the horizontal axis labels. Best way is to use custom number format of " " (single space surrounded by double quotes), so there will be room for the data labels without having to manually adjust the plot area size. (top left chart below).

Select the series along the axis, and add data labels. Excel adds Y value labels (all zero) above or left of the points. (top right chart below).

Format the data labels: Select the option to show Y values and deselect other options; select the "below" position; use a number format with one decimal digit. (bottom left chart below).

Delete the legend, and reformat the series along the X axis so it mimics an axis (medium gray line, cross markers using medium gray border and no fill). (bottom right chart below).

enter image description here

Элегантное решение, никогда бы не подумал сделать это сам :) eirikdaude 8 лет назад 1
Умная. Я сосредоточился на линиях сетки, потому что именно так OP отображал проблему, но реальная формулировка вопроса была о метках оси. fixer1234 8 лет назад 0
2
eirikdaude

Этот ответ касается Excel-2013, но я подозреваю, что Excel-2010 (если это действительно то, что вы используете) достаточно похож, чтобы это не имело значения. Чтобы изменить масштаб вашей оси, щелкните по нему правой кнопкой мыши и выберите формат оси:

enter image description here

Это должно вызвать диалог, содержащий несколько вариантов, для установки интервала между линиями сетки перейдите к:

Axis Options -> Axis Options -> Units 

enter image description here

Основная единица устанавливает интервал между основными линиями сетки, а второстепенная единица устанавливает интервал между второстепенными линиями сетки. Я надеюсь, что это помогло :)

Уважаемый Эйрикдауде, большое спасибо за ваш ответ. Проблема с методом, который вы объяснили, состоит в том, что он производит больше чисел на оси, включая те, которые мне нужны. Однако я хочу, чтобы только те числа, которые я указал, были бы показаны на метках оси, которые не имеют постоянных шагов приращения. Есть ли у вас какие-либо комментарии к этому? заранее спасибо Hamed 8 лет назад 0
@Hamed, решение EirikDaude правильное. Почему вы хотите показать только некоторые ярлыки? Jon Peltier 8 лет назад 0
Уважаемый Джон. Оба решения идеальны, но так как мне нужно всего несколько цифр, касающихся конкретной доступной ширины вкладок, мне нужно было только иметь доступные в моем графике. Я мог бы легко сделать это в Minitab, но с этим программным обеспечением было много других графических ограничений. С линейной диаграммой в execl я не мог легко показать тренд. Hamed 8 лет назад 0
2
fixer1234

If I understand your problem correctly, it looks like you have data at an irregular interval, and you want to plot it as XY data but have the X axis grid lines match the X values of the data. That can't be done natively in Excel, and actually defeats the purpose of using a scatter chart.

Line Chart

If you aren't concerned with displaying the data proportionally on the X axis, you can use a line chart:

line chart

This treats the X values as categories and simply stacks the Y values next to each other at a uniform interval on the chart. Notice that you get the actual X values displayed but every point is at an equal interval even though the X values are not. If the X value of the last point was 100, it still would be plotted at the same location as the 1.7.

Scatter Chart

A scatter, or XY, chart plots the X values proportionally. The grids are at fixed intervals to provide a way to visualize the proportionality of the data. That's why the grid lines don't run through all of your data points. You can actually force Excel to plot "apparent" grid lines where you want:

XY chart

This was done by starting at 0.78 and using an interval of 0.24. When you round the X axis values to one decimal place, they display the values you want. However, the grids are still in proportional locations and you can see that the grid lines don't actually run through the data points (except for 1.5, which happened to work out to be an exact X value).

Other Solutions

LCD Grid Lines

If the data lends itself to this solution, which it does in this example, you can use a grid line interval that is a "lowest common denominator" interval to pass through every point:

LCD

This keeps everything proportional plus labels every point. It even adds visual clues to the proportionality of the X values because you can see the number of intervening lines.

Manual Grid Lines

As mentioned earlier, uniform grid lines allow the reader to visualize the proportional nature of the data's X locations. If you need grid lines running through every point, you could manually add them (draw them in), for all points that don't fall on a standard grid line. If you need only those lines, set the X axis to have no grid lines and manually add each one you want. Keep in mind that readers are used to seeing XY data having uniform grid lines, so your chart will be a bit of an optical illusion and people might consider it "misleading".

Data Labels

If the goal is just to display the actual X values so they can be read directly from the chart, the normal way to do that would be to use standard grid lines and add data labels where needed.

Большое спасибо за полное и полезное объяснение. Я не могу голосовать за вас из-за низкой репутации, поэтому, пожалуйста, примите мои приветствия здесь. Hamed 8 лет назад 0
-1
Scott Holtzman
  1. Отменить диалоговое окно «Выбор источника данных»
  2. Щелкните правой кнопкой мыши на метках оси
  3. Выберите формат меток
И что потом?? G-Man 8 лет назад 0

Похожие вопросы