-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Currently, base.assert_line() uses the following code to extract the path vertices from a line:
path_verts=self.ax.transData.inverted().transform(l._transformed_path.get_fully_transformed_path().vertices)
Simply, this extracts the vertices (i.e. the xy-data) for the line and reformats it into a single array that can be used by base.get_slope_yintercept()
It is unclear why, but when using seaborn.regplot(), it is sometimes true that l._transformed_path==None. This causes an error.
It should be noted that while _transformed_path is an attribute of matplotlib.lines.Line2D, it is not a documented attribute. (The leading underscore in the variable name _transformed_path denotes that the variable is intended for internal use)
This same data can instead be gotten by calling the Line2D.get_data() method.
We should rewrite this code to use the l.get_data() instead of l._transformed_path.