Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Modernize Matplotlib code for dispersion plot - Use object-oriented instead of state-machine interface. - Return Axes object to allow additional customization (see #2239). - Remove useless scalex kwarg (it's supposed to be a bool and True by default, so passing in 0.1 is confusing). * Use default palette in dispersion plot * Refactor data preparation in dispersion plot Make the code a bit more concise and readable for beginners, who may want to use it as a starting point for their own tweaked dispersion plot. (Incidentally, this version is also a bit faster since it replaces the nested loop over words with the in operator on a dict, but that's not the main goal.) * Casefold instead of lower in dispersion plot str.casefold is the method primarily meant for caseless comparison. * Dispersion plot docstring tweak * Reraise ImportError if importing matplotlib fails Rather than ValueError. Additionally, add a space between "... installed." and "See ..." * Add docstring for return value to dispersion plot Co-authored-by: Tom Aarsen <Cubiegamedev@gmail.com>
- Loading branch information