Sep-05-2018, 02:49 PM
I have the following code which does not give me an error with Matplotlib 1.4.* but it does with Matplotlib 1.5 upwards:
The error output is:
If i exclude this line the error message is the following:
Does anyone have an idea how i could fix this?
def set_line_properties(self, line, axes=None, figure=None, color='b', linewidth=1, linestyle='-', marker=None, alpha=1., transform=None, row_index=0, picker=3): """sets various linestyle parameters for given line object""" line.set_axes(axes) line.set_figure(figure) line.set_c(color) line.set_lw(linewidth) line.set_ls(linestyle) if marker is not None: line.set_marker(marker) line.set_alpha(alpha) line.set_transform(transform) line.row_index = row_index line.set_picker(picker) returnI think especially the first two commands pose errors.
The error output is:
Quote:line 384, in set_line_properties.
line.set_axes(axes)
AttributeError: 'Line2D' object has no attribute 'set_axes'
If i exclude this line the error message is the following:
Quote:line 385, in set_line_properties
line.set_figure(figure)
(...)
RuntimeError: Can not put single artist in more than one figure
Does anyone have an idea how i could fix this?