Logarithmic axes again

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Michal Blazejczyk
Newbie
Newbie
Posts: 64
Joined: Fri Jun 16, 2006 12:00 am

Logarithmic axes again

Post by Michal Blazejczyk » Wed Aug 30, 2006 3:03 pm

Hi

Logarithmic axes come up in questions every now and then but still...

I'm displaying a scatter plot (a points series) with a log 2 scale on both axes. There are two problems I can see:

- The minor ticks are roughly equally spaced between the major ticks which is counter-intuitive - minor tick placement should be logarithmic as well.
- If I zoom in enough, minor ticks pretty much go away and I often end up with a plot that has no ticks at all.

Any comments?

Best,
Michal Blazejczyk
Best,
Michal Blazejczyk
Lead Programmer
Genome Quebec

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Aug 31, 2006 2:16 pm

Hi Michal,

The minor ticks are logarithmic. The problem is that logarithmic axes don't scale automatically when zooming. I'll add your request to our wish-list to be enhanced for future releases.

In the meantime you could try setting a small increment for the axes, i.e.:

Code: Select all

      tChart1.Axes.Bottom.Increment = 0.1;
Best Regards,
Narcís Calvet / 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

Michal Blazejczyk
Newbie
Newbie
Posts: 64
Joined: Fri Jun 16, 2006 12:00 am

Post by Michal Blazejczyk » Thu Aug 31, 2006 4:07 pm

Hi Narcís.

Thanks for the answer.

I've tried setting the increment to 0.1. It works well for zoomed-in plots but it causes tick labels to overlap big time when the plot is viewed with no zooming. And ticks are no more spaced in a natural way (i.e. at 2, 4, 8, 16, ...).

Question: is there a way to tell a plot where the tick marks should be but to retain automatic axes?

Thanks,
Michal
Best,
Michal Blazejczyk
Lead Programmer
Genome Quebec

Michal Blazejczyk
Newbie
Newbie
Posts: 64
Joined: Fri Jun 16, 2006 12:00 am

Post by Michal Blazejczyk » Thu Aug 31, 2006 4:46 pm

OK, I've found the answer to my own question: got t use the GetNextAxisLabel event.

:)

Michal
Best,
Michal Blazejczyk
Lead Programmer
Genome Quebec

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Sep 01, 2006 10:36 am

Hi Michal,

I'm glad to hear you could solve this problem.

To avoid label overlapping you can also use custom label separation, for example:

Code: Select all

      tChart1.Axes.Bottom.Labels.Separation = 100;
Best Regards,
Narcís Calvet / 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

Michal Blazejczyk
Newbie
Newbie
Posts: 64
Joined: Fri Jun 16, 2006 12:00 am

Post by Michal Blazejczyk » Fri Sep 01, 2006 2:14 pm

I'm glad to hear you could solve this problem.
Well, not really in fact. Using GetNextAxisLabel is great for static plots but once you allow zooming and scrolling, it gets a bit hairy.
To avoid label overlapping you can also use custom label separation
Yes, but what does it mean when I set Labels.Separation to 100 in a Logarithmic plot???

Best,
Michal
Best,
Michal Blazejczyk
Lead Programmer
Genome Quebec

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Sep 01, 2006 2:41 pm

Hi Michal,

Separation indicates the minimum number of pixels there must be between labels to avoid them to overlap. This works fine with lineal axes but doens't work very good with logarithmic. As I told you previously, I added an item to our wish-list to improve automatic settings and behaviour for logarithmic axes.
Best Regards,
Narcís Calvet / 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