How can I center the labels on the X axis ticks?

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by hisuwh on 25th February 2014
Is there a way to centre x-axis labels on the ticks?

As you can see here:

The labels are centred between the ticks which is quite misleading. I would prefer it if they were centred on the ticks.

Is there any way to do this?

Thanks in advance
Posted by Richard on 25th February 2014
Hi there,

You can control the X tickmarks with the numxticks option:

obj.Set('numticks', 3);

If you have a hmargin set this will of course throw the alignment out. If you wanted to keep the hmargin then you could always turn the X axis off entirely and use the drawing API X axis instead:


Add a reply

« Back to message list