In this article, we will demonstrate how to use these data to create a Scatter Chart and also adjust the scale of the horizontal axis in the chart as shown below:
Before Scale Change
After Scale Change
After cleaning the data, we have two columns holding data as shown below:
- GC time stamp
- Mixed GC pause time
Using shift key, you can select both A1 and B1 cells as shown below:
CTRL+SHIFT+DOWN ARROW key
Create a Scatter Chart from Spreadsheet Data
A scatter chart has two value axes, showing one set of numerical data along the x-axis and another along the y-axis. It combines these values into single data points and displays them in uneven intervals, or clusters.
To create a scatter chart, you do:
- Arrange your data so that the x-values are in the first column of your worksheet, and the y-values are located in adjacent columns.
- Select the range of x- and y-values that you want to plot in the chart.
- Click Chart on the Insert menu to start the Chart Wizard.
- In the Chart type box, select Scatter .
- Under Chart sub-type, click the chart sub-type you want to use.
This will create a scatter chart as shown in diagram 1. But, you can see the scale of X-axis is not appropriate.
Change the Scale of Horizontal Axis
By default, Microsoft Office Excel determines the minimum and maximum scale values of the axis when you create a chart. However, you can customize the scale to better meet your needs. To customize the scale of horizontal axis, you do:
- Change the label/title of the series to "Mixed GC"
- In the chart, click the horizontal (value) axis that you want to change.
- This displays the Chart Tools, adding the Design, Layout, and Format tabs.
- On the Format tab, in the Current Selection group, click the arrow next to the Chart Elements box, and then click Horizontal (Value) Axis.
- In the Current Selection group, click Format Selection.
- In the Format dialog box, change maximum value of X-axis from 40000.0 to 30000.0.