python画球面投影_python – matplotlib:半球/楔形的自定义投影

我正在看matplotlib画廊中的custom projection示例 – 我正在尝试修改它以仅绘制南半球.我已将必要的[-pi / 2,pi / 2]限制调整为[-pi / 2,0].现在我一直在看:

def _gen_axes_patch(self):

"""

Override this method to define the shape that is used for the

background of the plot. It should be a subclass of Patch.

In this case, it is a Circle (that may be warped by the axes

transform into an ellipse). Any data and gridlines will be

clipped to this shape.

"""

#return Circle((0.5, 0.5), 0.5)

return Wedge((0.5,0.5), 0.5, 180, 360)

def _gen_axes_spines(self):

return {'custom_hammer':mspines.Spine.circular_spine(self,

(0.5, 0.5), 0.25)}

如您所见,我用Wedge替换了Circle补丁.这就是投影图目前的样子:

脊柱仍然遵循圆/椭圆 – 我如何指定我希望脊椎遵循楔形的边界?

我不确定如何最好地修改脊柱,所以任何帮助将非常感谢!

谢谢,

亚历克斯

解决方法:

只是为了记录,如果你还是python的新手,你肯定会直接进入游泳池的深

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值