How to make a chart with unequally spaced horizontal axes in Excel

Excel version: office 2016

The original data is the previous launch activities of StarLink (Starlink), the main data is the number of satellites (to be) deployed for each launch, the horizontal axis (X-axis) is the launch date, and the vertical axis (Y-axis) is the expectation of each launch mission ( To be deployed) and the satellite data of the final orbiting work. There are two columns of data on the Y-axis (two overlapping lines in the chart). The single-column data chart may be more intuitive. The original data is as follows:

 

Select the data, select Insert 'Histogram', the default chart is as follows:

It can be seen that the horizontal axis uses the time interval between the actual date and the end date as the horizontal axis label. It is impossible to intuitively see the date of each launch event and needs to be customized.

1. Insert an auxiliary column, and set all the (Y-axis) values ​​of the auxiliary column to 0, as shown in the figure below:

2. Select all the data and select Insert "Scatter Chart". The important thing to say again is the "scatter plot"!

The chart inserted by default is as follows:

 3. Set the format of the coordinate axis, and select 'horizontal (value) axis' for the coordinate axis option, as shown in the figure below:

 Select 'Label' -> 'Label Position', set to 'None', cancel the default abscissa label display, as shown below:

After the setting is complete, the default display label of the horizontal axis will disappear.

4. There are many ways to select the "auxiliary column" of the series, directly click the auxiliary column in the chart area (because the value is 0, all are dots drawn on the horizontal axis), or you can set the chart area or the drop-down list of the data column format box to select, as shown below:

 

 At this time, all the small dots in the auxiliary column in the chart are selected. Click the right mouse button on any small dot in the selected state (key step!!!) , the following menu bar appears, select 'Add Data Label (B )' -> 'Add data label (B)', as shown below:

After the operation is completed, 0 is displayed next to the small dots on the horizontal axis (that is, the label drawn by the Y-axis value), and the label value is specified as the value of the horizontal axis below.

5. Select ' Series "Auxiliary Column" Data Label ' in the format setting area, as shown in the figure below:

 

Go to 'Format Data Label' -> 'Label Options' -> 'Label Include', cancel the selection of 'Y Value' and select 'X Value', as shown in the figure below:

 

Set the 'Number' display format according to the data format requirements of your own chart. In this example, the number format of the custom label is set to 'Date', and the text direction is set to 'Vertical'. After the settings are completed, the chart effect is as follows:

 

 Due to the large amount of data in this example, the date display with uneven intervals on the horizontal axis overlaps, and subsequent adjustments will be made.

6. Adjust the chart type

What you want in this example is a histogram (other types of charts are available according to your needs)

Click the chart and select 'Change Chart Type' in the main menu. In this example, select 'Column Chart'. After adjusting the settings, the effect is as follows:

 

The width of the picture is too large and the display is a bit fuzzy after compression, and the time interval does not directly reflect the uneven spacing of the horizontal axis. The rendering of the local data (schematic diagram):

 Consistent with the expected effect, the date of each launch activity can be visually seen from the horizontal axis ( the horizontal axis labels show uneven spacing ).

Explanation: The reason for adding an auxiliary column and using a scatter chart is that the scatter chart can specify the X series and Y series values ​​of the new series, and other default charts may only have values ​​in one direction, so when setting the label display of the auxiliary column , you can choose 'X value' to achieve the desired effect.

Possible technique (I haven’t personally tested it): By setting the auxiliary column Y-axis value to a negative number, the display position of the custom label can be adjusted uniformly (in the up and down direction). Those who are interested can try it.

Some trivial adjustment steps are omitted in the middle, please ask questions if you have any questions.

 

 

 

 

Guess you like

Origin blog.csdn.net/wangyulj/article/details/123084867