我正在看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的新手,你肯定会直接进入游泳池的深