You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: LineCollection, set_linestyle does not work #28545
in the class LineCollection, the argument linestyle has no effect neither if set directly or if set afterwards with set_linestyle or with set(linestyle='--')
set_color does work. maybe its just linestyle that doesnt.
Code for reproduction
coord_start=np.column_stack((x_midpts[:-1], y_midpts[:-1]))[:, np.newaxis, :]
coord_mid=np.column_stack((x, y))[:, np.newaxis, :]
coord_end=np.column_stack((x_midpts[1:], y_midpts[1:]))[:, np.newaxis, :]
segments=np.concatenate((coord_start, coord_mid, coord_end), axis=1)
lc=LineCollection(segments, **default_kwargs)
#lc.set_array(values) # set the colors of each segment#lc.set_linestyle(':')#lc.set_color(c)lc.set(color=c, linestyle='--')
Actual outcome
linestyle doesnt change
Expected outcome
linestyle should change to the type i gave as input
Activity
jonpro142 commentedon Jul 12, 2024
or is that simply an optical illusion if the lines within the collections are too small to see the acutal pattern?
timhoffm commentedon Jul 12, 2024
Please provide a fully self-contained example. We cannot judge based on an incomplete code snippet.
jonpro142 commentedon Jul 12, 2024
It was only because the lines within the collection were so small, that you couldnt see the acutal style of each line