I have a minor style problem, but, nevertheless, I can’t solve it with googles help. I want to have a minimum precision displayed on my ticks, i.e. if the ticks are -1,-0.5,0,0.5,1 it should be displayed this way instead of -1.0,-0.5,0.0,0.5,1.0. With the tick formatter I can set the tick precission, but only for the whole axis (if I set %d for the example, it will be -1,0,0,0,1). Also I use MaxNLocator, so I don’t predefine the ticks (I thought it’s more convinient to use this already done procedure instead of writing my own), so I’m more flexible, for example when I zoom in, but therefore I don’t even know, which the maximum precision is.
Possible solutions would be:
- There is a number precision definition (something like %x.xf) which produces numbers with minimum precision (again -1.0000 becomes -1 and 2.47300 becomes 2.473)
- Extract by MaxNLocator defined ticks, edit them accordingly and reassign them (which would be still a lot of work)
I even checked for solutions in Latex (because I use Latex string coding), but this is even more inflexible, when it comes to numbers. But maybe someone knows anything.