LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Exceeding Max. (32,000) Data Points in a Series

I have a weird problem when trying to plot an XYScatterSmooth series
from imported tabulated data. The chart is generated properly, but it
seems to be drawing itself multiple times, and after several seconds I
get a runtime error 1004 with this description:

Run-time error '1004':

The maximum number of data points you can use in a data series for a
2-D chart is 32,000. If you want to use more than 32,000 data points,
you must create two or more series.


There are actually only 4,332 data points in this instance, so my guess
is that Excel is trying to plot the same data points over and over in
the same series on the same chart...that's why the series is redrawn a
few times, until the number of data points exceeds 32,000. What's odd
is that I have no loop in my macro, so I don't understand why the input
data would be stored multiple times in the series collection. Here is
my macro code for reference:

Sub AltPlot()
'
' AltPlot Macro
' Macro recorded 7/6/2004 by Jonathan G. Metts
'

'
Dim TimeRange As Range
Dim AltRange As Range

ChDir _
"C:\Program Files\Microsoft Visual Studio\Common\MSDEV98\My
Projects\msic2003_mod"
Workbooks.OpenText Filename:= _
"C:\Program Files\Microsoft Visual Studio\Common\MSDEV98\My
Projects\msic2003_mod\rangedata.txt" _
, Origin:=xlWindows, StartRow:=1, DataType:=xlFixedWidth,
FieldInfo:= _
Array(Array(0, 1), Array(12, 1), Array(28, 1), Array(44, 1),
Array(60, 1))

Set TimeRange = Worksheets("rangedata").Range("B:B")
Set AltRange = Worksheets("rangedata").Range("C:C")

Charts.Add
ActiveChart.ChartType = xlXYScatterSmooth
ActiveChart.SeriesCollection(1).Select
Selection.Delete
ActiveChart.SeriesCollection.NewSeries
ActiveChart.Legend.Select
Selection.Delete
ActiveChart.SeriesCollection(1).XValues = TimeRange
ActiveChart.SeriesCollection(1).Values = AltRange
ActiveChart.Location Whe=xlLocationAsNewSheet,
Name:="MSIC_PlotSheet"
With ActiveChart
..HasTitle = True
..ChartTitle.Characters.Text = "Missile Altitude Plot"
..Axes(xlCategory, xlPrimary).HasTitle = True
..Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Time
(sec)"
..Axes(xlValue, xlPrimary).HasTitle = True
..Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Altitude
(ft.)"
End With
ActiveChart.Axes(xlCategory).Select
' With Selection.Border
' .Weight = xlHairline
' .LineStyle = xlAutomatic
' End With
With Selection
..MajorTickMark = xlNone
..MinorTickMark = xlNone
..TickLabelPosition = xlNextToAxis
End With
ActiveChart.Axes(xlCategory).Select
ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlXValues)
..MinimumScaleIsAuto = True
..MaximumScaleIsAuto = True
..MinorUnitIsAuto = True
..MajorUnitIsAuto = True
..Crosses = xlAutomatic
..ReversePlotOrder = False
..ScaleType = xlLinear
..DisplayUnit = xlNone
End With
End Sub


Any ideas?


---
Message posted from http://www.ExcelForum.com/

 
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
Time Series and Creating data points within a series Cristal Excel Discussion (Misc queries) 2 November 30th 09 08:07 PM
how can i color points in a plot with a third data series? aaron Charts and Charting in Excel 5 August 6th 09 03:40 PM
Excel Chart - Too many data points in Series? Will H. Excel Discussion (Misc queries) 1 December 16th 08 07:35 AM
PERCENTILE exceeding 8191 points mtrain32000 Excel Worksheet Functions 1 July 14th 08 05:57 PM
Points in between Data Series Broken man Charts and Charting in Excel 2 November 22nd 05 10:18 PM


All times are GMT +1. The time now is 12:34 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"