ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Scatter chart (https://www.excelbanter.com/excel-worksheet-functions/108872-scatter-chart.html)

Louise

Scatter chart
 
Hi all
I have created a basic worksheet, as shown below, and am trying to create a
scatter chart from the results. The problem I have is that I want each Point
on the chart to show the corresponding letter in Column A, however, if I
include Column A in the range, this is obviously shown on th chart as well,
which is incorrect.

A B C

a 1 2
b 2 4
c 3 2
d 4 3
e 5 7
f 6 1
g 7 9
h 8 4
I 9 5
j 10 6
k 11 3
l 12 10
m 13 8
n 14 9


Any idea how I can do this? (I do have a worksheet containing the basic
data and chart so far if anybody is willing to take a look?)

Thank you.

Louise

Shefali

Scatter chart
 
Hello Loiuse,

I dont know if this is how you want to see the chart but I have tried to get
you a chart with the sample data.

You can choose the standard type XY scatter chart, click next and then when
u choose the data source, choose series in columns, click next again and then
go to data labels, check the X axis value.

Hope this should give you what you want.


"Louise" wrote:

Hi all
I have created a basic worksheet, as shown below, and am trying to create a
scatter chart from the results. The problem I have is that I want each Point
on the chart to show the corresponding letter in Column A, however, if I
include Column A in the range, this is obviously shown on th chart as well,
which is incorrect.

A B C

a 1 2
b 2 4
c 3 2
d 4 3
e 5 7
f 6 1
g 7 9
h 8 4
I 9 5
j 10 6
k 11 3
l 12 10
m 13 8
n 14 9


Any idea how I can do this? (I do have a worksheet containing the basic
data and chart so far if anybody is willing to take a look?)

Thank you.

Louise


Leo Heuser

Scatter chart
 
"Louise" skrev i en meddelelse
...
Hi all
I have created a basic worksheet, as shown below, and am trying to create
a
scatter chart from the results. The problem I have is that I want each
Point
on the chart to show the corresponding letter in Column A, however, if I
include Column A in the range, this is obviously shown on th chart as
well,
which is incorrect.

A B C

a 1 2
b 2 4
c 3 2
d 4 3
e 5 7
f 6 1
g 7 9
h 8 4
I 9 5
j 10 6
k 11 3
l 12 10
m 13 8
n 14 9


Any idea how I can do this? (I do have a worksheet containing the basic
data and chart so far if anybody is willing to take a look?)

Thank you.

Louise



Hi Louise

You want to add labels to the chart.
Assuming the labels, you want to insert are in A2:A15,
this sub will do the job.
To find the name of the diagram, click a random cell, press
<Ctrl and while holding it click the diagram. You can now
see the name in the name box (to the extreme left of the
formula bar)

1. Insert the sub in a general module: <Alt<F11, menu
Insert Module. Copy the sub and paste it to the righthand
window.

2. Alter name of sheet and name of diagram (and range) to
actual names.

3. Return to the sheet with <Alt<F11 and run
the sub with <Alt<F8

The sub must be run every time you add new points to the chart.


Sub InsertLabels()
'leo.heuser, oktober 2000
'Insert labels in a scatter graph
'
Dim Counter As Long
Dim Counter1 As Long
Dim LabelName As Variant

LabelName = Sheets("Sheet1").Range("A2:A15")

With Sheets("Sheet1").ChartObjects("Diagram 1").Chart
For Counter = 1 To .SeriesCollection.Count
For Counter1 = LBound(LabelName, 1) To _
UBound(LabelName, 1)
With .SeriesCollection(Counter)
.HasDataLabels = True
.Points(Counter1).DataLabel.Text = _
LabelName(Counter1, 1)
End With
Next Counter1
Next Counter
End With
End Sub



--
Best regards
Leo Heuser

Followup to newsgroup only please.



Louise

Scatter chart
 
thank you for replying. This is going to sound really stupid, but where's
the attached chart you have created??

Louise

"Shefali" wrote:

Hello Loiuse,

I dont know if this is how you want to see the chart but I have tried to get
you a chart with the sample data.

You can choose the standard type XY scatter chart, click next and then when
u choose the data source, choose series in columns, click next again and then
go to data labels, check the X axis value.

Hope this should give you what you want.


"Louise" wrote:

Hi all
I have created a basic worksheet, as shown below, and am trying to create a
scatter chart from the results. The problem I have is that I want each Point
on the chart to show the corresponding letter in Column A, however, if I
include Column A in the range, this is obviously shown on th chart as well,
which is incorrect.

A B C

a 1 2
b 2 4
c 3 2
d 4 3
e 5 7
f 6 1
g 7 9
h 8 4
I 9 5
j 10 6
k 11 3
l 12 10
m 13 8
n 14 9


Any idea how I can do this? (I do have a worksheet containing the basic
data and chart so far if anybody is willing to take a look?)

Thank you.

Louise


Louise

Scatter chart
 
I have tried to do what you outline below but it doesn't give me what I'm
looking for. If i include Column A in the range, the final chart is
incorrect. What am I doing wrong???

Thanks again.
Louise

"Shefali" wrote:

Hello Loiuse,

I dont know if this is how you want to see the chart but I have tried to get
you a chart with the sample data.

You can choose the standard type XY scatter chart, click next and then when
u choose the data source, choose series in columns, click next again and then
go to data labels, check the X axis value.

Hope this should give you what you want.


"Louise" wrote:

Hi all
I have created a basic worksheet, as shown below, and am trying to create a
scatter chart from the results. The problem I have is that I want each Point
on the chart to show the corresponding letter in Column A, however, if I
include Column A in the range, this is obviously shown on th chart as well,
which is incorrect.

A B C

a 1 2
b 2 4
c 3 2
d 4 3
e 5 7
f 6 1
g 7 9
h 8 4
I 9 5
j 10 6
k 11 3
l 12 10
m 13 8
n 14 9


Any idea how I can do this? (I do have a worksheet containing the basic
data and chart so far if anybody is willing to take a look?)

Thank you.

Louise


Leo Heuser

Scatter chart
 
Hi Louise

Apparently I'm the invisible man on your news server :-)
Didn't my answers reach you? Well maybe this one also
diappears into cyberspace.

--
Best regards
Leo Heuser

Followup to newsgroup only please.




Louise

Scatter chart
 
Hi Leo

Yes, I did get your post that time. You're no longer invisible!! (It
didn't say your name on the first one??) Blimey, I didn't realise it would
be that complicated and involve a macro! The question was actually on behalf
of a colleague who doesn't use macros and even I'm not that advanced with
them.

Is this the only way to do it?

Thanks again.
Louise

"Leo Heuser" wrote:

"Louise" skrev i en meddelelse
...
Hi all
I have created a basic worksheet, as shown below, and am trying to create
a
scatter chart from the results. The problem I have is that I want each
Point
on the chart to show the corresponding letter in Column A, however, if I
include Column A in the range, this is obviously shown on th chart as
well,
which is incorrect.

A B C

a 1 2
b 2 4
c 3 2
d 4 3
e 5 7
f 6 1
g 7 9
h 8 4
I 9 5
j 10 6
k 11 3
l 12 10
m 13 8
n 14 9


Any idea how I can do this? (I do have a worksheet containing the basic
data and chart so far if anybody is willing to take a look?)

Thank you.

Louise



Hi Louise

You want to add labels to the chart.
Assuming the labels, you want to insert are in A2:A15,
this sub will do the job.
To find the name of the diagram, click a random cell, press
<Ctrl and while holding it click the diagram. You can now
see the name in the name box (to the extreme left of the
formula bar)

1. Insert the sub in a general module: <Alt<F11, menu
Insert Module. Copy the sub and paste it to the righthand
window.

2. Alter name of sheet and name of diagram (and range) to
actual names.

3. Return to the sheet with <Alt<F11 and run
the sub with <Alt<F8

The sub must be run every time you add new points to the chart.


Sub InsertLabels()
'leo.heuser, oktober 2000
'Insert labels in a scatter graph
'
Dim Counter As Long
Dim Counter1 As Long
Dim LabelName As Variant

LabelName = Sheets("Sheet1").Range("A2:A15")

With Sheets("Sheet1").ChartObjects("Diagram 1").Chart
For Counter = 1 To .SeriesCollection.Count
For Counter1 = LBound(LabelName, 1) To _
UBound(LabelName, 1)
With .SeriesCollection(Counter)
.HasDataLabels = True
.Points(Counter1).DataLabel.Text = _
LabelName(Counter1, 1)
End With
Next Counter1
Next Counter
End With
End Sub



--
Best regards
Leo Heuser

Followup to newsgroup only please.




Leo Heuser

Scatter chart
 
"Louise" skrev i en meddelelse
...
Hi Leo

Yes, I did get your post that time. You're no longer invisible!! (It
didn't say your name on the first one??) Blimey, I didn't realise it
would
be that complicated and involve a macro! The question was actually on
behalf
of a colleague who doesn't use macros and even I'm not that advanced with
them.

Is this the only way to do it?

Thanks again.
Louise


Hi Louise

You're welcome.

I'm afraid so. Users have asked through the years for the possibility of
doing it from the user interface, but Microsoft has been remarkably
deaf to this demand.

Leo Heuser


"Leo Heuser" wrote:

"Louise" skrev i en meddelelse
...
Hi all
I have created a basic worksheet, as shown below, and am trying to
create
a
scatter chart from the results. The problem I have is that I want each
Point
on the chart to show the corresponding letter in Column A, however, if
I
include Column A in the range, this is obviously shown on th chart as
well,
which is incorrect.

A B C

a 1 2
b 2 4
c 3 2
d 4 3
e 5 7
f 6 1
g 7 9
h 8 4
I 9 5
j 10 6
k 11 3
l 12 10
m 13 8
n 14 9


Any idea how I can do this? (I do have a worksheet containing the
basic
data and chart so far if anybody is willing to take a look?)

Thank you.

Louise



Hi Louise

You want to add labels to the chart.
Assuming the labels, you want to insert are in A2:A15,
this sub will do the job.
To find the name of the diagram, click a random cell, press
<Ctrl and while holding it click the diagram. You can now
see the name in the name box (to the extreme left of the
formula bar)

1. Insert the sub in a general module: <Alt<F11, menu
Insert Module. Copy the sub and paste it to the righthand
window.

2. Alter name of sheet and name of diagram (and range) to
actual names.

3. Return to the sheet with <Alt<F11 and run
the sub with <Alt<F8

The sub must be run every time you add new points to the chart.


Sub InsertLabels()
'leo.heuser, oktober 2000
'Insert labels in a scatter graph
'
Dim Counter As Long
Dim Counter1 As Long
Dim LabelName As Variant

LabelName = Sheets("Sheet1").Range("A2:A15")

With Sheets("Sheet1").ChartObjects("Diagram 1").Chart
For Counter = 1 To .SeriesCollection.Count
For Counter1 = LBound(LabelName, 1) To _
UBound(LabelName, 1)
With .SeriesCollection(Counter)
.HasDataLabels = True
.Points(Counter1).DataLabel.Text = _
LabelName(Counter1, 1)
End With
Next Counter1
Next Counter
End With
End Sub



--
Best regards
Leo Heuser

Followup to newsgroup only please.








All times are GMT +1. The time now is 05:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com