【发布时间】:2012-09-24 10:00:19
【问题描述】:
我需要绘制两个重叠的椭圆,当前代码将第二个椭圆的边缘放在第一个椭圆的顶部。代码如下:
from matplotlib.pyplot import figure, show
from matplotlib import patches
fig = figure()
ax = fig.add_subplot(111)
ell = patches.Ellipse((0.15, 0.7), .3, .1, angle = 25, facecolor = 'white', edgecolor = 'gray', linewidth = 2, transform=ax.transAxes)
ax.add_artist(ell)
ell = patches.Ellipse((0.30, 0.7), .3, .1, angle = -25, facecolor = 'white', edgecolor = 'gray', linewidth = 2, transform=ax.transAxes)
ax.add_artist(ell)
show()
这会产生一个类似于How to join overlapping circles? 的第一个数字(我不能在这里发布我自己的数字),而我想要第二个数字。
matplotlib 中有解决这个问题的方法吗?
【问题讨论】:
标签: python matplotlib