Page 1 of 1

Scaling data with outliers

Posted: Thu Feb 04, 2010 9:41 pm
by 9342775
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

Re: Scaling data with outliers

Posted: Fri Feb 05, 2010 3:43 pm
by yeray
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;

Re: Scaling data with outliers

Posted: Tue Feb 16, 2010 3:53 pm
by 9342775
Yeray,
Thanks for your reply.
I am looking forward to the enhancement. It will be very cool.
mc

Re: Scaling data with outliers

Posted: Wed Feb 24, 2010 3:09 pm
by yeray
Hi mc,

You can try the new Axis Breaks tool in the beta 2 recently released:
http://www.teechart.net/support/viewtop ... ead#unread