我有以下代码绘制散点图。有没有一种优雅的方法来调整绘图区域的大小,使得 x 和 y 轴并不总是自动从零开始,而是刚好低于最低值?目前,我所有的数据点最终都聚集在一个角落。非常感谢!
Set cht = ActiveChart
'GRAPH 1
Set rng1 = ActiveSheet.Range(Range("AC13").Offset(jump * 50, 0), Range("AG23").Offset(jump * 50, 0))
With ActiveSheet.ChartObjects.Add(Left:=rng1.Left, Width:=rng1.Width, Top:=rng1.Top, Height:=rng1.Height)
'(Left:=100, Width:=375, Top:=75, Height:=225)
.Chart.ChartType = xlXYScatterLines
.Chart.HasLegend = False
.Chart.Axes(xlCategory).TickLabels.Font.Size = 18
.Chart.Axes(xlValue).TickLabels.Font.Size = 18
'.Chart.SetSourceData Source:=Range("U13:O40,T13:N40")
Set srs = .Chart.SeriesCollection.NewSeries
srs.XValues = Range(Range("U13").Offset(jump * 50, 0), Range("U13").Offset(jump * 50, 0).End(xlDown))
srs.Values = Range(Range("T13").Offset(jump * 50, 0), Range("T13").Offset(jump * 50, 0).End(xlDown))
End With