Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Labels
Description
Bug report
In a polar plot, I want to set the sizes of the r and theta ticklabels. While setting the theta ticklabel size works with the methodset_thetagrids
, setting the r ticklabel size withset_rgrids
does not work.
As an aside, I find it confusing that some functions for setting theta parameters require arguments in radians (e.g.,set_thetalim
), while others require arguments in degrees (e.g.,set_thetagrids
).
Code snippet
frommatplotlibimportpyplotaspltimportnumpyasnpfig=plt.figure()ax=plt.axes(polar=True)ax.set_thetalim(0.,np.pi/4.)ax.set_rlim(0.,2.)# set the size of theta ticklabels (works)thetatick_locs=np.linspace(0.,45.,4)thetatick_labels= [u'%i\u00b0'%np.round(x)forxinthetatick_locs]ax.set_thetagrids(thetatick_locs,thetatick_labels,fontsize=16)# set the size of r ticklabels (does not work)rtick_locs=np.arange(0.5,2.0,0.7)rtick_labels= ['%.1f'%rforrinrtick_locs]ax.set_rgrids(rtick_locs,rtick_labels,fontsize=16)plt.show()
Actual outcome
Seefigure
Expected outcome
I expect to be able to set the font properties of r ticklabels. Other settings, such as trying to set the font weight, does not work either.
Matplotlib version
- Operating system: Macos 10.15.4 (Catalina)
- Matplotlib version: 3.2.1 (installed via macports)
- Matplotlib backend: Qt5Agg
- Python version: 3.8.2 (installed via macports)