Hi,

I'm trying to remove or delete an annotate arrow but I'm unsuccessful. Can
some please help? Thanks.

I tried the [artist].remove() but that will not work with arrows or annotate
objects...

Here is some example code, please add in the code I need if you can:

import numpy as np
import matplotlib.pyplot as plt

t = np.arange(0, np.pi*2, 0.01)
x = np.sin(2*np.pi*t)
fig = plt.figure()
myplot = ax.plot(t, x, 'b')

arrow = ax. annotate('my arrow', xy=(3, -0.5), xycoords='data',
                            horizontalalignment='center',
                            verticalalignment='center',
                            color='red', alpha=0.5,
                            xytext=(0, -2), textcoords='offset points',
                            arrowprops=dict(facecolor='red', frac=0.4,
shrink = 0.05, alpha=0.5, width=2, headwidth=5),
                            )

#Code to remove arrow...
# arrow.remove() #this does not work...

plt.show()

-----
Krishna Adrianto Pribadi
Test Engineer
Harley-Davidson Motor Co.
Talladega Test Facility
Vehicle Test Stands
-- 
View this message in context: 
http://old.nabble.com/remove---delete-arrow---annotate%2C-how-to--tp28451836p28451836.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to