我试图在excel中绘制一些比较数据,但所有可用的图表看起来都是基本线上的变体(例如条形图只是同一逻辑的不同表示)。
我所拥有的数据是两个选项的比较评分(按1到10的等级),由几十个人提供。
OptA OptB
Score1 1 3
Score1 3 4
Score1 8 5
Score1 6 6
如何将其绘制为适当的散点图;这些轴是OptA和OptB的得分,点在(1,3),(3,4),(8,5)和(6.6),最好是每个得分者的名字?
目的是允许相对分数和任何趋势的直观表示。
答案 0 :(得分:0)
这个怎么样:
更新1
如果您希望B列为X轴,C列为X轴,则在点击图表图标之前仅选择数据:
更新2
Microsoft的页面上有一个宏可以执行此操作:
我会复制它的本质:
Sub AttachLabelsToPoints()
'Dimension variables.
Dim Counter As Integer, ChartName As String, xVals As String
' Disable screen updating while the subroutine is run.
Application.ScreenUpdating = False
'Store the formula for the first series in "xVals".
xVals = ActiveChart.SeriesCollection(1).Formula
'Extract the range for the data from xVals.
xVals = Mid(xVals, InStr(InStr(xVals, ","), xVals, _
Mid(Left(xVals, InStr(xVals, "!") - 1), 9)))
xVals = Left(xVals, InStr(InStr(xVals, "!"), xVals, ",") - 1)
Do While Left(xVals, 1) = ","
xVals = Mid(xVals, 2)
Loop
'Attach a label to each data point in the chart.
For Counter = 1 To Range(xVals).Cells.Count
ActiveChart.SeriesCollection(1).Points(Counter).HasDataLabel = _
True
ActiveChart.SeriesCollection(1).Points(Counter).DataLabel.Text = _
Range(xVals).Cells(Counter, 1).Offset(0, -1).Value
Next Counter
End Sub
或者,您可以使用PowerPoint的Scatter Chart,它可以在没有宏的情况下完成。