极坐标中的Inset_axes [英] Inset_axes in polar coordinates

查看:90
本文介绍了极坐标中的Inset_axes的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 matplotlib.axes.Axes.inset_axes (

I am using matplotlib.axes.Axes.inset_axes (https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.axes.Axes.inset_axes.html) to create an child axe of a an existing parent axe.

如何将其设置为极坐标?我不能使用这个:Matplotlib inset polar plot as 'Axes'对象没有属性'polar'.

How do I set it to polar coordinates ? I can not use this: Matplotlib inset polar plot as 'Axes' object has no property 'polar'.

但是 inset_axes 只返回 Axes 对象而不是 projections.polar.PolarAxes ..

But inset_axes only returns Axes objects and not projections.polar.PolarAxes ..

推荐答案

来自ImportanceOfBeingErnest的评论:

From the comment of ImportanceOfBeingErnest:

只需使用参数 axes_class = matplotlib.projections.get_projection_class('polar')来使用 mpl_toolkits.axes_grid1.inset_locator.inset_axes().

这篇关于极坐标中的Inset_axes的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆