Missing support for 'markevery' options in Line2D
Blubbaa opened this issue · comments
Some options for markers in line plots are currently not supported, but would be nice to have.
According to the matplotlib docs, markevery
can be an integer, tuple, slice, etc. but as far as i can see only the integer and explicit markers list is handled:
tikzplotlib/src/tikzplotlib/_line2d.py
Lines 152 to 161 in 8c5a097
Using a tuple with (start, spacing)
will simply be misinterpreted as explicit indices, using slices will even create an error.
For the tuple usecase, an easy solution could be:
elif isinstance(mark_every, tuple):
addplot_options.append(f"mark repeat={mark_every[1]:d}")
addplot_options.append(f"mark phase={mark_every[0]+1:d}")