nschloe / tikzplotlib

:bar_chart: Save matplotlib figures as TikZ/PGFplots for smooth integration into LaTeX.
MIT License
2.39k stars 212 forks source link

clean_figure() error for plot() line outside the box #578

Open user202729 opened 1 year ago

user202729 commented 1 year ago
    import matplotlib.pyplot as plt
    import tikzplotlib
    plt.xlim(0, 1)
    plt.plot([5, 6], [2, 3])
    tikzplotlib.clean_figure()

Error:

IndexError: index 0 is out of bounds for axis 0 with size 0

At least for scatter instead of plot it doesn't give the error.