Closed
Description
Bug report
Bug summary
marker_props
is never used in the constructor of RectangleSelector
, so the marker properties cannot be changed.
Code for reproduction
import matplotlib as mpl
mpl.use('TkAgg')
from matplotlib.widgets import RectangleSelector
import matplotlib.pyplot as plt
def callback(click, release):
print('Click: (%f, %f)' % (click.xdata, click.ydata))
print('Release: (%f, %f)' % (release.xdata, release.ydata))
fig, ax = plt.subplots()
plt.plot([0, 1])
marker_props = {'markerfacecolor': 'r'}
rect_selector = RectangleSelector(ax, callback,
drawtype='box', useblit=True,
button=[1, 3], # don't use middle button
minspanx=5, minspany=5,
spancoords='pixels',
interactive=True,
marker_props=marker_props)
plt.connect('key_press_event', rect_selector)
plt.show()
Actual Outcome
Expected Outcome
The facecolor of markers (circle and square on the rectange patch) should be red.
Matplotlib version
- Operating system: Mac OS X 10.13.6
- Matplotlib version: 2.2.3
- Matplotlib backend: TkAgg
- Python version: 3.6.6