Log Plot Minimum Scale

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
lilo
Newbie
Newbie
Posts: 14
Joined: Fri Sep 07, 2012 12:00 am

Log Plot Minimum Scale

Post by lilo » Fri Jan 18, 2013 2:16 pm

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?

lilo
Newbie
Newbie
Posts: 14
Joined: Fri Sep 07, 2012 12:00 am

Re: Log Plot Minimum Scale

Post by lilo » Fri Jan 18, 2013 2:51 pm

I am referring to the Labels and Tickmarks on the Axes.
Chart1Test2.jpg
Chart1Test2.jpg (35.5 KiB) Viewed 7196 times

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Log Plot Minimum Scale

Post by Sandra » Fri Jan 18, 2013 3:47 pm

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

lilo
Newbie
Newbie
Posts: 14
Joined: Fri Sep 07, 2012 12:00 am

Re: Log Plot Minimum Scale

Post by lilo » Fri Jan 18, 2013 4:54 pm

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.

lilo
Newbie
Newbie
Posts: 14
Joined: Fri Sep 07, 2012 12:00 am

Re: Log Plot Minimum Scale

Post by lilo » Fri Jan 18, 2013 5:18 pm

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

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Log Plot Minimum Scale

Post by Sandra » Mon Jan 21, 2013 10:19 am

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply