pyvista / pyvista-support

[moved] Please head over to the Discussions tab of the PyVista repository
https://github.com/pyvista/pyvista/discussions
59 stars 4 forks source link

Can't change font size of axes #496

Closed palatyle closed 2 years ago

palatyle commented 3 years ago

I'm trying to change the font size of the axes of my plot. I've tried changing the font using pv.global_theme.font.size = 48 as well as changing the font_size arg within the p.show_grid() function, but neither work alone or together. Here's the relevant snippet of code:

pv.set_plot_theme('document')
pv.global_theme.font.size = 48

p = pv.Plotter(lighting='three lights',window_size=[1500,1000], multi_samples=8, polygon_smoothing=True)
p.add_mesh(mstr_grid.outline(), color='k')
p.show_grid(zlabel='Z Distance [km]', xlabel='X Distance [km]', ylabel='Y Distance [km]', font_size = 48)

Does anyone know how to fix this?