While usually when plotting fails the error raised by numpy/scipy/matplotlib is understandable, there are cases in which is not, and we should raise errors to cover those cases.
As an example, passing an list of length 0 to either x or y in plots_1d.plot() raises the following error:
_File "\path\to\splotch\plots1d.py", line 445, in plot
if plabel[0] is not None
IndexError: list index out of range
While usually when plotting fails the error raised by numpy/scipy/matplotlib is understandable, there are cases in which is not, and we should raise errors to cover those cases.
As an example, passing an list of length 0 to either x or y in plots_1d.plot() raises the following error: _File "\path\to\splotch\plots1d.py", line 445, in plot if plabel[0] is not None IndexError: list index out of range