matplotlib에서 원형을 플롯하려고하지만 결과는 항상 빈 플롯입니다.Matplotlib 플롯이 공백으로 표시됩니다.
예.
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import matplotlib.collections as mcollections
fig = plt.figure()
fig.set_size_inches(18.5, 10.5, forward=True)
ax = fig.add_subplot(111, aspect='equal')
x = np.array([17., 29., 41., 3., 15.])
y = np.array([21., 41., 30., 19., 5.])
r = np.array([22.8035085, 46.04345773, 46.61544808, 16., 12.16552506])
patches = [mpatches.Circle((xx, yy), rr) for xx, yy, rr in zip(x, y, r)]
collection = mcollections.PatchCollection(patches)
ax.add_collection(collection)
fig.savefig("test.png")
이렇게하면 add_artist를 시도 할 때와 마찬가지로 빈 플롯이 생성됩니다. 잘만되면 누군가 내가 잘못 가고있는 곳으로 나를 가리킬 수 있습니다! 고마워요
같은 문제가 발생합니다 : 내 대답보다 더 나은, http://stackoverflow.com/questions/42875357/deformed-rectangulars-with-decreasing-trend – ImportanceOfBeingErnest