XY Scatter plotting & filtering series

ha

New Member
Joined
Jul 15, 2007
Messages
2
Hi,

This has been troubling me for nights.

I have data columns of X, Y1, Y2, Y3, Y4...
I used XY scatter to plot them all on one chart, but would like to have a filter on the plotter to select the desired series for comparison, eg, Y1, Y4, and Y5 only. Is there a method of doing this?


I tried using pivot table without joy because it doesn't support XY scatter.
I tried grouping the data sheet, but this gets very messy and is not selectable from the chart.

Please Help!!!
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hi
Assuming your data is in col A to E
Paste the following codes in the macro window ( Alt F8)

Code:
Sub Macro4()
x = Cells(Rows.Count, 1).End(xlUp).Row
a = InputBox("Enter the column numbers consecutively: ex: 1358")
For b = 1 To Len(a)
c = Chr(Mid(a, b, 1) + 64)
d = d & c & "1:" & c & x & ","
Next b
d = Left(d, Len(d) - 1)
MsgBox d
    Range(d).Select
    Range("E1").Activate
    Charts.Add
    ActiveChart.ChartType = xlXYScatterSmooth
    ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range( _
       d), PlotBy:=xlColumns
    ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1"
    With ActiveChart
        .HasTitle = False
        .Axes(xlCategory, xlPrimary).HasTitle = False
        .Axes(xlValue, xlPrimary).HasTitle = False
    End With
End Sub
run the macro. Enter the column nos you want to compare and it will draw chart accordingly
Ravi
 
Upvote 0
Hi

Thanks for the macro, it works quite well.
However, I was after something like a list box in the chart where I can select multiple series for plotting. Have you seen something like this?

Thanks in advance.
 
Upvote 0
Adapt the ideas at
Dynamic Charts
http://www.tushar-mehta.com/excel/newsgroups/dynamic_charts/index.html
particularly Example 4.

Hi,

This has been troubling me for nights.

I have data columns of X, Y1, Y2, Y3, Y4...
I used XY scatter to plot them all on one chart, but would like to have a filter on the plotter to select the desired series for comparison, eg, Y1, Y4, and Y5 only. Is there a method of doing this?


I tried using pivot table without joy because it doesn't support XY scatter.
I tried grouping the data sheet, but this gets very messy and is not selectable from the chart.

Please Help!!!
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,603
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top