Skip to content

Handling different projections in axes_grid1.AxisDivider  #9707

@liangwang0734

Description

@liangwang0734

Hi, all. There have been some discussions about using axes_grid1.AxisDivider with polar projected images to make axis for a colorbar with proper height/width (E.g., my comment on an old issue #3286 and ). It appears to me that there is a bug in axes_grid1.axes_size.AxisX and AxisY that assume rectangular projection.

I changed mpl_toolkits.axes_grid1.axes_size.py a little to support polar projection (almost) properly. Please see https://gist.github.com/jimgreen/839f43897e9c1d54f6fb4b890a93ee1b for a working example.
The result after fixing is of the left, and the simple call to plt.colorbar() is on the right:
image

I wonder if this the right thing to do? And, perhaps we need to support other projections, too?

PS:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions