5

The font size setting in Enthough Canopy Mayavi mlab appears to be broken.

Neither the command:

mlab.axes.label_text_property.font_size = 12 (e.g.)

nor the direct menu font size command (advanced settings) works.

I have logged a bug report with Enthought, but it looks like a more general Mayavi bug, see

Does Mayavi "Font Size" text property work?

Community
  • 1
  • 1
dcnicholls
  • 391
  • 1
  • 5
  • 15

1 Answers1

6

As you say this is a bug that has to do with the translation between the mayavi layer and the vtk layer. But for now you could use this attribute:

>> ax=mlab.axes()
>> ax.axes.font_factor
1.5
>> ax.axes.font_factor=2

It only produces a small increase in size, though, as it rejects values above 2.

aestrivex
  • 5,170
  • 2
  • 27
  • 44
  • 1
    Thanks, that did the job perfectly. Setting the font_factor to 1.0 gets the font size exactly right for my purpose. – dcnicholls Nov 14 '13 at 03:23