matplotlib.lines.VertexSelector class in Python
The matplotlib.lines.VertexSelector class belongs to the matplotlib.lines module. The matplotlib.lines module contains all the 2D line class that can be drawn with a variety of line styles, markers, and colors. matplotlib.lines.VertexSelector class is used to for managing the callbacks that maintain a list of selected vertices for matplotlib.lines.Line2D. The process_selected() function gets overridden by the derived classes for the picks.
Syntax: class matplotlib.lines.VertexSelector(line)
- lines: These represent the lines that are defined for the plotting.
Methods of the class:
- onpick(self, event): The selected set of indices gets updated when the line is picked using this method.
- process_selected(self, ind, xs, ys): By default it does the implementation of “do nothing” of the process_selected() method. The ‘ind’ represents the indices of the selected vertices whereas ‘xs’ and ‘ys’ are the coordinates of the selected vertices.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course