Macro to labe an XY scatter plot
Macro to labe an XY scatter plot
(OP)
As far as I know there is no way to label each point in a XY scatter plot. Has anyone come across a macro that can do this? or any other means?
Thanks,
Mike
Thanks,
Mike





RE: Macro to labe an XY scatter plot
x value
y value?
x, y pair?
other text?
=====================================
Eng-tips forums: The best place on the web for engineering discussions.
RE: Macro to labe an XY scatter plot
Format Data Series | Data Labels
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: Macro to labe an XY scatter plot
RE: Macro to labe an XY scatter plot
RE: Macro to labe an XY scatter plot
Sub LabelPoints()
'
'
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.ChartArea.Select
Dim myXValues As Range
Dim myYValues As Range
Dim myNameValues As Range
Set myXValues = Application.InputBox(prompt:="Range of X Values?", Type:=8)
Set myYValues = Application.InputBox(prompt:="Range of Y Values?", Type:=8)
Set myNameValues = Application.InputBox(prompt:="Range of Labels?", Type:=8)
For i = 1 To 20
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(i).XValues = myXValues(i)
ActiveChart.SeriesCollection(i).Values = myYValues(i)
ActiveChart.SeriesCollection(i).Name = myNameValues(i)
ActiveChart.SeriesCollection(i).Select
With Selection.Border
.Weight = xlHairline
.LineStyle = xlNone
End With
With Selection
.MarkerBackgroundColorIndex = 25
.MarkerForegroundColorIndex = 25
.MarkerStyle = xlDiamond
.Smooth = False
.MarkerSize = 5
.Shadow = False
End With
Next
End Sub
Thanks,
Mike
RE: Macro to labe an XY scatter plot
http://appspro.com/Utilities/ChartLabeler.htm
RE: Macro to labe an XY scatter plot
thread770-221006: Attaching labels to x-y data points on graphs
=====================================
Eng-tips forums: The best place on the web for engineering discussions.