Wedge Patch Position Not Updating
<p>I am attempting to shift the position of a <code>matplotlib.patches.Wedge</code> by modifying its <code>center</code> property, but it does not seem to have any effect.</p>

<p>For example:</p>

<pre><code>import matplotlib.pyplot as plt
import matplotlib.patches as patches

fig = plt.figure()
ax = fig.add_subplot(111)

tmp = patches.Wedge([2, 2], 3, 0, 180)
ax.add_artist(tmp)
tmp.center = [4, 4]  # Try to move!

ax.set_xlim([0, 10])
ax.set_ylim([0, 10])
print(tmp.center)
plt.show()
</code></pre>

<p>Produces the following:</p>

<p><a href="http://i.stack.imgur.com/at9Fg.png" rel="nofollow"><img src="http://i.stack.imgur.com/at9Fg.png" alt="sad"></a></p>

<p>Which is clearly incorrect.</p>

<p>A similar approach functions fine for <code>matplotlib.patches.Ellipse</code>:</p>

<pre><code>import matplotlib.pyplot as plt
import matplotlib.patches as patches

fig = plt.figure()
ax = fig.add_subplot(111)

tmp = patches.Ellipse([2, 2], 2, 2)
ax.add_artist(tmp)
tmp.center = [4, 4]  # Try to move!

ax.set_xlim([0, 10])
ax.set_ylim([0, 10])
print(tmp.center)
plt.show()
</code></pre>

<p><a href="http://i.stack.imgur.com/xzLCK.png" rel="nofollow"><img src="http://i.stack.imgur.com/xzLCK.png" alt="ellip"></a></p>

<p>And <code>matplotlib.patches.Rectangle</code> (with the change from <code>center</code> to <code>xy</code>)</p>

<pre><code>import matplotlib.pyplot as plt
import matplotlib.patches as patches

fig = plt.figure()
ax = fig.add_subplot(111)

tmp = patches.Rectangle([2, 2], 3, 2)
ax.add_artist(tmp)
tmp.xy = [4, 4]  # Try to move!

ax.set_xlim([0, 10])
ax.set_ylim([0, 10])
print(tmp.xy)
plt.show()
</code></pre>

<p><a href="http://i.stack.imgur.com/5RYHz.png" rel="nofollow"><img src="http://i.stack.imgur.com/5RYHz.png" alt="rect"></a></p>

<p>I thought it might be <code>Wedge</code> utilizing <code>xy</code> rather than <code>center</code>, but the <code>Wedge</code> object does not have an <code>xy</code> attribute. What am I missing here?</p>

<p>You probably have to <code>update</code> the properties of your <code>Wedge</code>:</p>

<pre><code>tmp.update({'center': [4,4]})
</code></pre>

<p>As you see, the method accepts a dict that specifies the properties to update.</p>

<p><a href="http://i.stack.imgur.com/cppA9.png" rel="nofollow"><img src="http://i.stack.imgur.com/cppA9.png" alt="result"></a></p>

python python-3.x matplotlib