You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Error: local variable 'xdata' referenced before assignment" in legend_handler.py #6921
Hi everyone,
I made a stupid typo and generated a legend for my plot with half a numpoint
plt.legend(numpoints = 0.5)
which obviously makes no sense. But finding the error took some time due to the stupid error message and the original issue not being handles correctly here:
If you check for being an integer in the if-statement and throw a more readable error if not (e.g. "Number of points has to be an integer", or similar) that would be great.
Activity
tacaswell commentedon Aug 13, 2016
@pfaion would you be willing to take a crack at that? You seem to have a good idea of what needs to be done.
phobson commentedon Apr 18, 2017
closed via #8478