Clarification on the box chart graphic
Clarification on the box chart graphic
Hello,
First I would like to thank Narcis Calvet for responding to my question in the teechart7.delphi news group about labels for the marks.
Second, I would like to know what the different parts of the box chart mean and how to change them. I am afraid I am not familiar with the terms inner and outer fence.
I would like the box ends to be at the quartile values of the distribution, which they appear to be. I would like the whisker ends to represent the 5th percentile and 95th percentile respectively. I'd also like to be able to change them to the 2.5th and 97.5th percentile.
Thank you for your help. I like the TeeChart but I need to learn to think like it does.
Hardee Mahoney
Washington, DC
First I would like to thank Narcis Calvet for responding to my question in the teechart7.delphi news group about labels for the marks.
Second, I would like to know what the different parts of the box chart mean and how to change them. I am afraid I am not familiar with the terms inner and outer fence.
I would like the box ends to be at the quartile values of the distribution, which they appear to be. I would like the whisker ends to represent the 5th percentile and 95th percentile respectively. I'd also like to be able to change them to the 2.5th and 97.5th percentile.
Thank you for your help. I like the TeeChart but I need to learn to think like it does.
Hardee Mahoney
Washington, DC
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Hardee,
In that case, reading the threads below about box plot may be helpful for you. Those are TeeChart for .NET topics but the same applies to TeeChart VCL.
http://www.teechart.net/support/viewtopic.php?t=2599
http://www.teechart.net/support/viewtopic.php?t=5645
Hope this helps!
In that case, reading the threads below about box plot may be helpful for you. Those are TeeChart for .NET topics but the same applies to TeeChart VCL.
http://www.teechart.net/support/viewtopic.php?t=2599
http://www.teechart.net/support/viewtopic.php?t=5645
Hope this helps!
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Thanks for your response.
But I still don't seem to be able to draw the box plot where the lower whisker end is visually at the 5th percentile and the upper whisker end is at the 95th percentile. From your example you pointed me to, it seems the adjacentpoint properties control the whiskers but I can't get it to change the look of the plot.
here is my example
Thanks
Hardee Mahoney
Washington, DC
But I still don't seem to be able to draw the box plot where the lower whisker end is visually at the 5th percentile and the upper whisker end is at the 95th percentile. From your example you pointed me to, it seems the adjacentpoint properties control the whiskers but I can't get it to change the look of the plot.
Code: Select all
Your example:
// adjacent points are related with whisker lines
box1.AdjacentPoint1 = 37; // lower whisker at 37
box1.AdjacentPoint3 = 43; // upper whisker at 43
here is my example
Code: Select all
Box := TBoxSeries.Create;
Box.Clear;
Box.UseCustomValues;
for i := 0 to 99 do
Box.AddY(i);
Box.AdjacentPoint1 := 10;
Box.AdjacentPoint3 := 90;
Box.RecalcStats;
Box.Position := 0;
Box.ParentChart := Chart1;
Hardee Mahoney
Washington, DC
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Hardee,
Code below displays a Box-Plot here. Can you please test if it works fine at your end?
Thanks in advance.
Code below displays a Box-Plot here. Can you please test if it works fine at your end?
Code: Select all
uses TeeBoxPlot;
procedure TForm1.FormCreate(Sender: TObject);
var Box: TBoxSeries;
i: Integer;
begin
Box := TBoxSeries.Create(self);
Box.Clear;
Box.UseCustomValues:=true;
for i := 0 to 99 do
Box.AddY(i);
Box.AdjacentPoint1 := 10;
Box.AdjacentPoint3 := 90;
Box.RecalcStats;
Box.Position := 0;
Box.ParentChart := Chart1;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Hardee,
Code below works fine here either using v7 or v8. Can you please test if it works fine at your end?
Thanks in advance.
Code below works fine here either using v7 or v8. Can you please test if it works fine at your end?
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var Box: TBoxSeries;
i: Integer;
begin
Box := TBoxSeries.Create(self);
Box.ParentChart := Chart1;
Box.Position := 0;
Box.Clear;
for i := 0 to 99 do
Box.AddY(i);
Box.UseCustomValues:=true;
// If custom values are use, you have to define ALL box plot properties
// bottom whisker
Box.AdjacentPoint1 := 10;
// top whisker
Box.AdjacentPoint3 := 90;
// box bounds
Box.Quartile1 := 25;
Box.Quartile3 := 75;
Box.Median := 50;
// Outliers
// Mild outliers in (9,20) and (85,91)
Box.InnerFence1 := 20;
Box.InnerFence3 := 85;
// Extreme outliers if <9 or >91
Box.OuterFence1 := 9;
Box.OuterFence3 := 91;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Hardee,
It's most likely because, as commented out in the example code I posted, when using custom values, you have to define all box plot properties.
It's most likely because, as commented out in the example code I posted, when using custom values, you have to define all box plot properties.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Hardee,
Yes, RecalcStats recalculates all parameters necessary to draw the box (Median, Quartiles, Inner and Outer points, etc.). This method can be called whenever the box underlying data is changed.
I'm glad to hear you got it working.Thanks so much for your help. I got it to work by taking out the recalcstats. I swore my code was just like yours, but...
Is this behavior for recalcstats like you expect?
Yes, RecalcStats recalculates all parameters necessary to draw the box (Median, Quartiles, Inner and Outer points, etc.). This method can be called whenever the box underlying data is changed.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |