Page 1 of 1
Logarithmic axes again
Posted: Wed Aug 30, 2006 3:03 pm
by 9641603
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
Posted: Thu Aug 31, 2006 2:16 pm
by narcis
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;
Posted: Thu Aug 31, 2006 4:07 pm
by 9641603
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
Posted: Thu Aug 31, 2006 4:46 pm
by 9641603
OK, I've found the answer to my own question: got t use the GetNextAxisLabel event.
Michal
Posted: Fri Sep 01, 2006 10:36 am
by narcis
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;
Posted: Fri Sep 01, 2006 2:14 pm
by 9641603
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
Posted: Fri Sep 01, 2006 2:41 pm
by narcis
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.