plotting API should support custom tick labels

Issue #25 resolved
Thomas Gilgenast created an issue

currently @plotter and therefore adjust_plot() both support xticks and yticks kwargs, but there is no way to pass a (positions, labels) tuple here that would end up getting passed as plt.xticks(positions, labels)

the current workaround is to not use the adjust_plot() API and just manually call plt.xticks() but this is not ideal

Comments (2)

  1. Thomas Gilgenast reporter

    a minimal test case for this is

    import matplotlib.pyplot as plt
    from lib5c.util.plotting import plotter
    def plot_fn(x, y, **kwargs):
        plt.scatter(x, y)
    plot_fn([2, 3], [3, 4], xticks=([2, 3], ['cow', 'say']), outfile='test.png')

  2. Log in to comment