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

Handling different projections in axes_grid1.AxisDivider #3286

Open
@jonathanunderwood

Description

@jonathanunderwood

Adding a colorbar to a pcolormesh when the polar projection is specified for the axes doesn't work as expected. The code below results in a missing colorbar, and a very small plot area.

importmatplotlib.pyplotasplotimportmpl_toolkits.axes_grid1asaxes_grid1importnumpyasnpt=np.linspace(0.0,2.0*np.pi,360)r=np.linspace(0,100,200)rg,tg=np.meshgrid(r,t)c=rg*np.sin(tg)# If I remove the projection="polar" argument here theax=plot.subplot2grid((1,1), (0,0),projection="polar",aspect=1.)im=ax.pcolormesh(t,r,c.T)divider=axes_grid1.make_axes_locatable(ax)cax=divider.append_axes("right",size="5%",pad=0.05)plot.colorbar(im,cax=cax)plot.show()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp