I dont understand Semi-log mode

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Snarkle
Newbie
Newbie
Posts: 91
Joined: Wed Jun 30, 2010 12:00 am

I dont understand Semi-log mode

Post by Snarkle » Fri Jun 03, 2011 6:50 am

Greetings, been a while,

I am trying to use log mode in our package, but I have been unable to get the chart to render to my satisfaction, maybe I've got it all wrong and am trying to make the chart do something its not designed to do or I just dont get it .. history will decide.
My issue: a log chart with nice power of 10 values - looks so pretty ;-)
Log1.jpg
Log1.jpg (99 KiB) Viewed 6077 times
Pay attention to the minor gridlines colored Green, Now I zoom into the data range I am interested in
Log2.jpg
Log2.jpg (58.1 KiB) Viewed 6077 times
The left axis labels dont autoscale and show 'nice' numbers like when its in linear mode, and my minor gridlines are still in their original places.
Ok so maybe it has something to do with what increment I have set, although I'm used to the linear scales that look after this for me but I go ahead and manually change the increment to something that will draw some lines
Log3.jpg
Log3.jpg (61.6 KiB) Viewed 6069 times
Now I have some major gridlines, but the minor gridlines have not been redrawn in between my 'new' majors, in fact they are still placed as if the chart was zoomed right out and still using majors of 1, 10, 100, 1000

In relation to these minor gridlines and getting a nice looking zoomed in chart .. what am I doing wrong?

p.s. I'm using TeeChartNET2010Src_4.1.2011.04150 .. cos I KNOW that is the first question Sandra is gonna ask ... ;-) ... I'm learning .. hehe
--------------------
Cheers Phil.

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

Re: I dont understand Semi-log mode

Post by Sandra » Fri Jun 03, 2011 9:09 am

Hello Phil,

I try to reproduce your problem using next demo project example that use Custom logarithmic axis and zoom seems work fine for me. Can you please, tell us if your problem appears in my demo project?
WindowsFormsApplication23.zip
(20.77 KiB) Downloaded 382 times
Can you tell us, if previous attached project works as you expected? If in project I have made your problem appears, please explain step to step how I can reproduce it in my project.

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

Snarkle
Newbie
Newbie
Posts: 91
Joined: Wed Jun 30, 2010 12:00 am

Re: I dont understand Semi-log mode

Post by Snarkle » Mon Jun 06, 2011 5:32 am

Hi Sandra,

Your app does exactly the same as I get ... let me explain using your code.

Take the example of a linear scale like the below graph.
LogSandra1.png
LogSandra1.png (15.57 KiB) Viewed 6043 times
The left scale is divided up into nice uniform intervals. Then I zoom in like below
LogSandra2.png
LogSandra2.png (1.34 KiB) Viewed 6045 times
LogSandra3.png
LogSandra3.png (19.3 KiB) Viewed 6046 times
And again the chart automatically gives me a nice uniform scale .. no matter how many times I zoom in I get a nice number scale.

And as I can only add 3 attachments .. I will continue this in the next post ...
--------------------
Cheers Phil.

Snarkle
Newbie
Newbie
Posts: 91
Joined: Wed Jun 30, 2010 12:00 am

Re: I dont understand Semi-log mode

Post by Snarkle » Mon Jun 06, 2011 5:43 am

Continued from previous post.

Now in Log mode I understand that the log scale is .. well ... er .. Log , lower intervals will be larger and higher intervals get progressively smaller.
In your app I get 'minor' lines seemingly random i.e.
LogSandra4.png
LogSandra4.png (19.23 KiB) Viewed 6046 times
And when I zoom right in I get no minor log lines at all ... its very very easy to zoom in to a point and have no left scale at all ... this never happens in the linear scale unless you force it to.
LogSandra5.png
LogSandra5.png (17.26 KiB) Viewed 6045 times
I was expecting (well hoping) that the chart would have the same 'linear behaviour' for the scales and plot them using the Log scale .. and effectively get something like the next image (minor lines drawn by hand so are not exactly to scale, but illustrate the point)
LogSandra6.png
LogSandra6.png (17.47 KiB) Viewed 6043 times
Phew ... an epic post .. hope that puts us on the same page ..
--------------------
Cheers Phil.

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

Re: I dont understand Semi-log mode

Post by Sandra » Mon Jun 06, 2011 2:01 pm

Hello Phil,

Logarithmic axes don't scale automatically when zooming. So In the meantime you could try setting a small increment for the axes using Zoomed event as do in next code:

Code: Select all

 void tChart1_Zoomed(object sender, EventArgs e)
        {
            tChart1.Axes.Left.SetMinMax(tChart1.Axes.Left.Minimum, tChart1.Axes.Left.Maximum);
            tChart1.Axes.Left.Automatic = false;
           tChart1.Axes.Left.Increment = 0.1;
        }
Could you please, tell us if code snippet solve 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

Snarkle
Newbie
Newbie
Posts: 91
Joined: Wed Jun 30, 2010 12:00 am

Re: I dont understand Semi-log mode

Post by Snarkle » Mon Jun 06, 2011 11:43 pm

I'll try something like that then ..cheers Sandra
--------------------
Cheers Phil.

Post Reply