strawlab / best

Bayesian estimation supersedes the t test
MIT License
145 stars 37 forks source link

fix depreciated matplotlib parameters (normed in hist, axisbg in make… #4

Closed DustinAlandzes closed 5 years ago

DustinAlandzes commented 6 years ago

Just something I came across trying to run the example: https://github.com/f00-/bayesian-estimation-supersedes-the-t-test-python

I had to make two changes to the plot_data_and_prediction and make_figure functions in best.plot because they used some depreciated matplotlib parameters:

Color of Axes

The axisbg and axis_bgcolor properties on Axes have been deprecated in favor of facecolor.

https://matplotlib.org/api/api_changes.html#color-of-axes

normed : bool, optional

This keyword is deprecated in NumPy 1.6.0 due to confusing/buggy behavior. It will be removed in NumPy 2.0.0. Use the density keyword instead. If False, the result will contain the number of samples in each bin. If True, the result is the value of the probability density function at the bin, normalized such that the integral over the range is 1. Note that this latter behavior is known to be buggy with unequal bin widths; use density instead.

https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.histogram.html