Page 1 of 1

Log Plot Minimum Scale

Posted: Fri Jan 18, 2013 2:16 pm
by 15663432
What is the minimum scale that can be displayed on a Log-Log chart?

I can plot 0.01 minimum OK, but not 0.001?

Re: Log Plot Minimum Scale

Posted: Fri Jan 18, 2013 2:51 pm
by 15663432
I am referring to the Labels and Tickmarks on the Axes.
Chart1Test2.jpg
Chart1Test2.jpg (35.5 KiB) Viewed 7237 times

Re: Log Plot Minimum Scale

Posted: Fri Jan 18, 2013 3:47 pm
by 10050769
Hello lilo,

If you want change the Log scale I recommend do something as next code:

Code: Select all

         tChart1.Aspect.View3D = false;
            Steema.TeeChart.Styles.Line line1 = new Line(tChart1.Chart);
            line1.Add(0, Math.Log(1.1));
            line1.Add(1, Math.Log(1.2));
            line1.Add(2, Math.Log(1));
            line1.Add(3, Math.Log(10));
            line1.Add(4, Math.Log(100));
            tChart1.Axes.Left.Logarithmic = true;
            tChart1.Axes.Left.LogarithmicBase = 10;
            tChart1.Axes.Left.Automatic = false;
            tChart1.Axes.Left.Minimum = 0.001;
            tChart1.Axes.Left.Maximum = 100;
Could you tell if previous code help you to solve the problem? If you have any problems please let me know.

Thanks,

Re: Log Plot Minimum Scale

Posted: Fri Jan 18, 2013 4:54 pm
by 15663432
If I set tChart1.Axes.Left.Minimum = 0.0001, the scale plots correctly or other value, but if I set the scale to tChart1.Axes.Left.Minimum = 0.001, it does not plot.

Re: Log Plot Minimum Scale

Posted: Fri Jan 18, 2013 5:18 pm
by 15663432
Seems to work OK if I use tChart1.Axes.Left.Minimum = 0.001, but not if I use a variable tChart1.Axes.Left.Minimum = YLogMin

Re: Log Plot Minimum Scale

Posted: Mon Jan 21, 2013 10:19 am
by 10050769
Hello lilo,

I can not reproduce your problem, so when I use a variable the behavior is the same as use a fix value. In the case you use 0.0001 you must change the Value.Fromat as do in next code:

Code: Select all

      double YMinlog;
        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            tChart1.Width = 500;
            tChart1.Height = 300;
            Steema.TeeChart.Styles.Line line1 = new Line(tChart1.Chart);
            line1.Add(0, Math.Log(1.1));
            line1.Add(1, Math.Log(1.2));
            line1.Add(2, Math.Log(1));
            line1.Add(3, Math.Log(10));
            line1.Add(4, Math.Log(100));
            line1.Add(5, Math.Log(1.0002));
            line1.ValueFormat = "0.0000#";
            YMinlog = 0.0001;
            tChart1.Axes.Left.Logarithmic = true;
            tChart1.Axes.Left.LogarithmicBase = 10;
            tChart1.Axes.Left.Automatic = false;
            tChart1.Axes.Left.Minimum = YMinlog;
            tChart1.Axes.Left.Maximum = 1;
            tChart1.Axes.Left.Labels.ValueFormat = "0.000#";

        }
Could you please tell us if my previous code works in your end? If it doesn't solve your problem please send us your code or a simple code where the problem appears, because we can reproduce your problem?

Thanks,