I am trying to plot a .csv-file into a joy diagram in python, using the package 'joypy'. (in my code that's 'data').
For aesthetics I want the diagram to only show every tenth year on the label (that's age). Examples here:
However, if I try to reproduce this with:
labels = [y if y%5==0 or y==64 else None for y in list(data.age.unique())]
fig, axes = joypy.joyplot(data, column=['testresults'], by='age', overlap=3, labels=labels, linewidth=0.5, grid='both', range_style='own', figsize=(6,5))
All I get are these warnings:
RuntimeWarning: invalid value encountered in double_scalars
in joyplot return _joyplot(converted, labels=labels, sublabels=sublabels,
in _joyplot
assert len(labels) == num_axes
AssertionError
Does anyone know a way to only depict every tenth year in a joyplot ?