Open
Description
Summary
There are at least two places where matplotlib provides a message to the user about usage patterns that are potentially mistakes using logging functionality, rather than as a warning.
Two examples I've encountered recently:
I don't think logging is the right mechanism here:
- The feedback provides very little information about the source of the problem, you just get some text in stderr.
- Related, you can convert a warning to an error and then drop into a debugger to figure out what's happening; I don't think that's the case with logging?
- Warnings can be intercepted by third party libraries that are doing something on purpose (i.e., passing numbers-as-strings to use a categorical axis), whereas logs are harder to muffle without intervening.
Proposed fix
It's possible I am wrong here, but warnings.warn
feels like the right mechanism for both of these pieces of feedback.
story645 and Jacob-Stevens-Haas