#1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 66
Default Data Frequency

Hello, I have over 100,000 data points. I would like to do a scatter plot of
every 10th or 100th point. What is the best way to accomplish this task?


  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 915
Default Data Frequency

Kyle wrote:
Hello, I have over 100,000 data points. I would like to do a scatter plot of
every 10th or 100th point. What is the best way to accomplish this task?



You could copy the data to a separate range for charting. Use a formula
like

=MOD(ROW(),100)

then filter on the new formula column for any single value to see every
100th row, copy visible cells, paste elsewhere, and chart.
  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 120
Default Data Frequency

Kyle,

More meaningfully you should select the appropriate number of reduced
points, regardless of a changing number of original ones. This, in a
comfortable way, can be achieved by the following macro. You are free to add
mandatory prefices to variable names.

Option Explicit

Sub DataReduction()

'Petr Bezucha, 2008

'Subroutine reduces the count of xy data points to a set number
'and places the new range into the set position.
'Prerequisition is that the variables x and y
'should occupy the neighboring columns
Static PtsCount As Long
Dim DataCount As Long, DataStep As Long, S As Range, _
XO As Range, XR As Range, Inp As String, _
CO As Long, CR As Long, RO As Long, RR As Long, RM As Long
Const Title As String = "Data reduction"

'starting proposal
If PtsCount = 0 Then PtsCount = 50
'dispatching inputs
Set S = ActiveCell
On Error GoTo ErrExit
'cell selections are necessary
Set XO = Application.InputBox _
("Select the upmost X-original cell", _
Title, S.Address, , , , , 8)
Set XR = Application.InputBox _
("Select the upmost X-reduced cell", _
Title, S.Offset(, 2).Address, , , , , 8)
On Error GoTo 0

CO = XO.Column
CR = XR.Column
Inp = CStr(PtsCount)
Inp = Application.InputBox("Number of reduced points", _
Title, Inp, , , , , 1)
PtsCount = CLng(Inp)
Application.ScreenUpdating = False
RO = XO.Row
RR = XR.Row
DataCount = XO.End(xlDown).Row - RO + 1
DataStep = DataCount \ PtsCount
RM = XO.End(xlDown).Row - DataStep
Do While RO < RM
Cells(RO, CO).Copy Destination:=Cells(RR, CR)
Cells(RO, CO + 1).Copy Destination:=Cells(RR, CR + 1)
RO = RO + DataStep
RR = RR + 1
Loop
Application.ScreenUpdating = True
ErrExit:
End Sub

--
Petr Bezucha


"Kyle" wrote:

Hello, I have over 100,000 data points. I would like to do a scatter plot of
every 10th or 100th point. What is the best way to accomplish this task?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Frequency SiH23 Excel Discussion (Misc queries) 1 December 10th 08 05:00 PM
Data Label Frequency Pete Charts and Charting in Excel 3 March 14th 08 06:47 PM
Frequency of data with criteria Cinny Excel Worksheet Functions 1 May 17th 07 03:30 AM
Plotting Frequency data ffteng Charts and Charting in Excel 0 April 25th 06 04:58 PM
Sort Data by Frequency Susan Smith Excel Worksheet Functions 1 March 25th 05 04:55 AM


All times are GMT +1. The time now is 02:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"