Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

set_rgrids() in a polar plot cannot set ticklabel size #17463

Open
@AgilentGCMS

Description

@AgilentGCMS

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp