Scaling data with outliers

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
mc
Newbie
Newbie
Posts: 26
Joined: Fri Jul 15, 2005 4:00 am

Scaling data with outliers

Post by mc » Thu Feb 04, 2010 9:41 pm

I am looking for a way to include outliers while still having the bulk of the data display with a useful scale. e.g., In a simple line chart, 99 % of the data points might be in the range 0 - 100, but maybe there are a couple points with values over 5000. Do you have any examples to guide me? A log scale doesn't give enough dispersion. One possibility would be to chart the bulk of the data using a reasonable scale and then show a gap in the axis before displaying at in the outlier range. I'm clueless about what to do here, so am grateful for your help. If there is an accepted/standard way to handle this issue, I'd appreciate hearing about it.

Thanks,
mc

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Scaling data with outliers

Post by Yeray » Fri Feb 05, 2010 3:43 pm

Hi mc,

We are working on implementing a new feature for the next v9, the AxisBreaks tool. This would probably be the optimal solution for you.

I'm afraid that the only actual solution I can see right now would be having two series, one for one range of data, and the other for the other range, so that you will be able to use different axes to separate the zones. Something similar to this:

Code: Select all

uses series;

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  Chart1.View3D:=false;

  Chart1.AddSeries(TPointSeries.Create(self));
  Chart1.AddSeries(TPointSeries.Create(self));

  Chart1.CustomAxes.Add;
  Chart1[1].CustomVertAxis:=Chart1.CustomAxes[0];

  Chart1.CustomAxes[0].EndPosition:=20;
  Chart1.Axes.Left.StartPosition:=20;

  for i := 0 to 99 do
  begin
    if (i mod 20 <> 0) then
      Chart1[0].AddXY(i, Random(100))
    else
      Chart1[1].AddXY(i, Random(100)+1000);
  end;
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

mc
Newbie
Newbie
Posts: 26
Joined: Fri Jul 15, 2005 4:00 am

Re: Scaling data with outliers

Post by mc » Tue Feb 16, 2010 3:53 pm

Yeray,
Thanks for your reply.
I am looking forward to the enhancement. It will be very cool.
mc

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Scaling data with outliers

Post by Yeray » Wed Feb 24, 2010 3:09 pm

Hi mc,

You can try the new Axis Breaks tool in the beta 2 recently released:
http://www.teechart.net/support/viewtop ... ead#unread
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply