User (Legacy) Posted November 29, 2004 Report Share Posted November 29, 2004 I have a histogram chart on which I would like to display the spac limits. The data I am using for development ranges from 30 to 66. The spec limits are 32 - 36. I tried this: stats.Gallery.Histogram.LimitLeft = lowerSpec; stats.Gallery.Histogram.LimitRight = upperSpec; However that set the left limit line to just inside the right edge of the chart (about where 65 would be) and put the right limit line completely off the chart. So i figured that the value should be the number of intervals from the chart minimum, so I tried this: double chartMin = stats.Calculators[0].Get(Analysis.Min); stats.Gallery.Histogram.LimitLeft = Convert.ToInt32(lowerSpec - chartMin); stats.Gallery.Histogram.LimitRight = Convert.ToInt32(upperSpec - chartMin); This moved the lines closer to what they should be, but they were still wrong (the left line was just left of 34 and the right line was just left of 41). So I figured that I had to take into account the size of the interval (which in this case was about 1.8), so I tried this: double chartMin = stats.Calculators[0].Get(Analysis.Min); double chartMax = stats.Calculators[0].Get(Analysis.Max); double intervalValue = (chartMax - chartMin)/stats.Gallery.Histogram.Intervals; stats.Gallery.Histogram.LimitLeft = Convert.ToInt32((lowerSpec - chartMin)/intervalValue); stats.Gallery.Histogram.LimitRight = Convert.ToInt32((upperSpec - chartMin)/intervalValue); This moved them even closer to being correct. The left line was just to the left of 32 and the right line was just inside the bar labeled 36). However there are tick marks & labels for 32 & 36 on the chart and the lines are not lined up with either of them. My boss asked me why, if those are the specs, the lines aren't on the tick marks and I could not give him an answer. From reading your documentation it sounds like you just set the LimitLeft and LimitRight values to the value you would like it to be, in this case it would be 32 & 36, but it does not work that way. Did I read it wrong or am I missing something here? Link to comment Share on other sites More sharing options...
Software FX Posted November 29, 2004 Report Share Posted November 29, 2004 LimitLeft and LimitRight refer to a NUMBER of intervals. If your interval size is say 10 and you want to set the Left Limit to 30 and the Data Min is Zero, you will set: LimitLeft = 3 -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted November 30, 2004 Author Report Share Posted November 30, 2004 Your documentation says that the limits are "used to get or set a value for the limit" not a number of intervals. But anyway, is there any way to find the interval size without calculating it yourself like I had to do? I don't see any properties or methods to get this value. "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:ym89BAl1EHA.1116@webserver3.softwarefx.com... > LimitLeft and LimitRight refer to a NUMBER of intervals. > > If your interval size is say 10 and you want to set the Left Limit to 30 and > the Data Min is Zero, you will set: > > LimitLeft = 3 > > -- > FP > Software FX > > Link to comment Share on other sites More sharing options...
Software FX Posted November 30, 2004 Report Share Posted November 30, 2004 Yes. If you are assigning DataMin and DataMax: intervalSize = ((statistics1.Gallery.Histogram.DataMax - statistics1.Gallery.Histogram.DataMax)/statistics1.Gallery.Histogram.Intervals); Otherwise: intervalSize = ((statistics1.Calculators[0].Get(Analysis.Max) - statistics1.Calculators[0].Get(Analysis.Min))/statistics1.Gallery.Histogram.Intervals); -- FP Software FX Link to comment Share on other sites More sharing options...
Software FX Posted December 2, 2004 Report Share Posted December 2, 2004 I was looking into this in a little more detail and I realized something that I didn't think of in my previous post: The percentage displayed DOES NOT correspond to the actual data but to the z-scores of the Normal distribution, this is by design. You are not seeing the percentage of your "sample", you are seeing the percentage of the "population". So we are actually not counting how many points went outside/inside the limits. As for the formatting (number of decimals displayed) that is something that you should be able to control. We will add a property if necessary or associate it with another property (if it makes sense). -- FP Software FX Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.