I don't know if there's a way to specify it at construction using mlab, but you can dig into the tvtk object (edit: actually it is still traited in the mayavi layer) and modify it:
>>> ax=mlab.axes()
>>> ax.axes.label_format
'%-#6.3g'
>>> ax.axes.label_format='%.2f'
Notice that it is the .axes.label_format
format of the axis instance you create that you need to modify. ax
is an instance of axis.
Your new code is comparable to the following minimal snippet. Notice how this does not operate on the instance of axis, ax
.
>>> ax=mlab.axes()
>>> mlab.axes.label_format='%.2f'