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
* Modernize Matplotlib code for dispersion plot
- Use object-oriented instead of state-machine interface.
- Return Axes object to allow additional customization (see nltk#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 <[email protected]>
0 commit comments