Logrithm bug? or I am just confused
Posted: Fri Apr 21, 2006 1:32 pm
hi,
sorry about raise another question, but i think it's related to SetMinMax question.
Set axis automatic to be false.
Correct me if any of the following is wrong. First of all, if automatic is false, the min and max is not updated so SetMinMax is required. But I got very confused here about Data Min(or Max) invisible and Axis Min (or Max) visible.
But SetMinMax has to be called before Logarithmic=true; and once set the axis can't be negative!! But the range of the axis shouldn't be the same of the data range, how do I set my range of axis to be (-1,100) while all of my data is actually all positive?
Thanks
sorry about raise another question, but i think it's related to SetMinMax question.
Set axis automatic to be false.
Code: Select all
// axis automatic is false here
// set all values to be position, just for testing
for (int i=0; i<Series1->Count(); i++) {
if (Series1->YValue[i]<=0) Series1->YValue[i]=1;
}
// change axis to logarithm.
Chart1->LeftAxis->SetMinMax(1e-3,100);
Chart1->LeftAxis->Logarithmic=true;
But SetMinMax has to be called before Logarithmic=true; and once set the axis can't be negative!! But the range of the axis shouldn't be the same of the data range, how do I set my range of axis to be (-1,100) while all of my data is actually all positive?
Thanks