Creating BoxPlots Dynamicly
Hi Narcis,
Thanks for your ever-optimistic reply.
Your array-idea sound interesting as a intermediate solution (the real solution will no doubt be in the next SW update).
I never used custom-made series before. Could you help me on my way with a couple of lines of code to create a boxplot series?
Cheers
Francis
Thanks for your ever-optimistic reply.
Your array-idea sound interesting as a intermediate solution (the real solution will no doubt be in the next SW update).
I never used custom-made series before. Could you help me on my way with a couple of lines of code to create a boxplot series?
Cheers
Francis
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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 |
Re: box- whiskers revisited
Hi Narcis,
In 2008 you put the box-whisker plots (BWP) on the to-do list (adding a series of box-whiskers to the gallery, replacing the fairly impractical 'single BWP' approach).
Anyway, I'm still hanging out for a useable box-whisker series (proudly advertised by Steema) and I was wondering if anything had been done in the past years to improve that situation?
Also, I'm using candle series to emulate box-whiskers. The problem I've been unable to solve over the years is that the colour of the candle in the legend is different to the one on the plot, which is very confusing for users. Any hint how to deal with that one?
Cheers
Francis
In 2008 you put the box-whisker plots (BWP) on the to-do list (adding a series of box-whiskers to the gallery, replacing the fairly impractical 'single BWP' approach).
At the time I had a look at your 'array' solution and didn't understand how that would meet my needs.Narcís wrote: Yes, exactly . I've just added this item.
Anyway, I'm still hanging out for a useable box-whisker series (proudly advertised by Steema) and I was wondering if anything had been done in the past years to improve that situation?
Also, I'm using candle series to emulate box-whiskers. The problem I've been unable to solve over the years is that the colour of the candle in the legend is different to the one on the plot, which is very confusing for users. Any hint how to deal with that one?
Cheers
Francis
Re: Creating BoxPlots Dynamicly
Best Regards,
Sandra Pazos / 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 |
Re: Creating BoxPlots Dynamicly
Hi Sandra
The answer pertains to the legend color problem (not resolved yet) and I've posted a reply to your answer.
I'm still looking for an anwer re the box-whisker plot (BWP). When I first brought up the issue about each single BW being a series on its own, I requested a more mature apprach where a BW series contain a collection of BW (you would not have a separate series for each point in a point series, would you?). Looking forward to a solution,
Regards
Francis
The answer pertains to the legend color problem (not resolved yet) and I've posted a reply to your answer.
I'm still looking for an anwer re the box-whisker plot (BWP). When I first brought up the issue about each single BW being a series on its own, I requested a more mature apprach where a BW series contain a collection of BW (you would not have a separate series for each point in a point series, would you?). Looking forward to a solution,
Regards
Francis
Re: Creating BoxPlots Dynamicly
Hello francis,
Here it is an example of how you could create a custom Boxes class that has an array of Steema.TeeChart.Styles.Box. And how you could have an Add(double x, double[] y) method that creates a new Box series, adds it to the array and populates it with the given data.
Please, don't hesitate to ask anything you feel we haven't explained enough clearly.FP_Oz wrote:At the time I had a look at your 'array' solution and didn't understand how that would meet my needs.
Here it is an example of how you could create a custom Boxes class that has an array of Steema.TeeChart.Styles.Box. And how you could have an Add(double x, double[] y) method that creates a new Box series, adds it to the array and populates it with the given data.
Code: Select all
public class Boxes
{
public Steema.TeeChart.Styles.Box[] boxes;
private Steema.TeeChart.Chart chart;
public Boxes(Steema.TeeChart.Chart c) {
chart = c;
boxes = new Steema.TeeChart.Styles.Box[0];
}
public int Add(double x, double[] y)
{
Steema.TeeChart.Styles.Box[] newBoxes = new Steema.TeeChart.Styles.Box[boxes.Length+1];
boxes.CopyTo(newBoxes, 0);
boxes = newBoxes;
boxes[boxes.Length - 1] = new Steema.TeeChart.Styles.Box(chart);
boxes[boxes.Length - 1].Add(x, y);
return boxes.Length-1;
}
}
private double[] GenerateYValues(int num)
{
double[] YValues = new double[num];
Random r = new System.Random();
int n = num * (3 + r.Next(10));
YValues[0] = -n;
for (int t = 2; t < num; t++) YValues[t-1] = (n * t / num);
YValues[num-1] = (2 * n);
return YValues;
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Boxes MyBoxes1 = new Boxes(tChart1.Chart);
Random r = new Random();
for (int i = 0; i < 4; i++)
MyBoxes1.Add(i, GenerateYValues(r.Next(20)+20));
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Creating BoxPlots Dynamicly
Hi Yeray,
As said in a previous post, Steema's support for uncertainty in its graphs is quite basic and it is really an area that could do with a bit more attention imo.
Re the box-whisker plot plot: thanks for the array 'workaround' example, but it again does not answer my question about a more mature approach to the BWP.
As said, you could have single-point point series and ask users to put them into an array to form a multi-point series and let them then manage the array instead of the series. Fortunately Steema did not choose for such a silly solution for its point series, and my (now very long standing) request is to 'standardise' the BWP to Steema's general approach of having the array as part of the series. If Steema is not willing to review its approach to BWP please let me know so I can stop wasting all our time pursuing this issue.
Also, I don't seem to get an email alert anymore when there is a response posted on the forum. Could you find out why that is so?
Regards
Francis
As said in a previous post, Steema's support for uncertainty in its graphs is quite basic and it is really an area that could do with a bit more attention imo.
Re the box-whisker plot plot: thanks for the array 'workaround' example, but it again does not answer my question about a more mature approach to the BWP.
As said, you could have single-point point series and ask users to put them into an array to form a multi-point series and let them then manage the array instead of the series. Fortunately Steema did not choose for such a silly solution for its point series, and my (now very long standing) request is to 'standardise' the BWP to Steema's general approach of having the array as part of the series. If Steema is not willing to review its approach to BWP please let me know so I can stop wasting all our time pursuing this issue.
Also, I don't seem to get an email alert anymore when there is a response posted on the forum. Could you find out why that is so?
Regards
Francis
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Creating BoxPlots Dynamicly
Hi Francis,
Thanks in advance.
Please bear in mind that BoxPlot series has a YValues ValueList and a number of Y values are used to plot each box. Median, Q1, Q3, whiskers, outliers, etc.; are calculated from given Y values so that the user doesn't have to care about calculating anything. Users just have to provide all those Y values to each box. Given that, I'm afraid it would not be possible to fit what you request in TeeChart's standard series design paradigm which generally assumes a 1:1 correspondence for X and Y values. So I guess an implementation to your request would be similar to Yeray's suggestion. Anyway, we will consider it to be revised and included in future releases.Re the box-whisker plot plot: thanks for the array 'workaround' example, but it again does not answer my question about a more mature approach to the BWP.
As said, you could have single-point point series and ask users to put them into an array to form a multi-point series and let them then manage the array instead of the series. Fortunately Steema did not choose for such a silly solution for its point series, and my (now very long standing) request is to 'standardise' the BWP to Steema's general approach of having the array as part of the series. If Steema is not willing to review its approach to BWP please let me know so I can stop wasting all our time pursuing this issue.
Could you please check that the email address in your forums account is valid?Also, I don't seem to get an email alert anymore when there is a response posted on the forum. Could you find out why that is so?
Thanks in advance.
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 |
Re: Creating BoxPlots Dynamicly
Thanks for your reply Narcis.
I checked my email address and that is the correct one. Any other suggestion why I don't get an alert?
Cheers
Francis
I checked my email address and that is the correct one. Any other suggestion why I don't get an alert?
Cheers
Francis
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Creating BoxPlots Dynamicly
Hi Francis,
Could you please confirm that you checked the "Subscribe topic" option at the bottom of the thread? If the answer is affirmative, could you check that those emails don't get trapped in a SPAM folder?
Thanks in advance.
Could you please confirm that you checked the "Subscribe topic" option at the bottom of the thread? If the answer is affirmative, could you check that those emails don't get trapped in a SPAM folder?
Thanks in advance.
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 |
Re: Creating BoxPlots Dynamicly
Hi Narcis,
I'm pretty sure the emails are not trapped in the email filter and the substribe box on the bottom of the screen does has a tick in it. I'll redo the subscription to see if that helps (btw, can you see who has subscribed to a subject?).
Cheers
Francis
I'm pretty sure the emails are not trapped in the email filter and the substribe box on the bottom of the screen does has a tick in it. I'll redo the subscription to see if that helps (btw, can you see who has subscribed to a subject?).
Cheers
Francis
Re: Creating BoxPlots Dynamicly
Aah, I can see what's happening.
A ticked box means that you're NOT subscribed but invites you to subscribe (bit confusing for the small mind).
I've now been using TChart for 15 years or so. Am I right that after 25 years you're 'newbie' status is changed to 'beginners' ?
Cheers
Francis
A ticked box means that you're NOT subscribed but invites you to subscribe (bit confusing for the small mind).
I've now been using TChart for 15 years or so. Am I right that after 25 years you're 'newbie' status is changed to 'beginners' ?
Cheers
Francis
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Creating BoxPlots Dynamicly
Hi Francis,
Yes, not very clear. This is a phpBB default feature I'm afraid.A ticked box means that you're NOT subscribed but invites you to subscribe (bit confusing for the small mind).
At 100 posts user status changes to "Advanced" and at 1000 changes to "Guru". We could create some intermediate ranks thoughI've now been using TChart for 15 years or so. Am I right that after 25 years you're 'newbie' status is changed to 'beginners' ?
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 |