Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing sample_data from Anaconda matplotlib package

Anaconda 5.1, matplotlib 2.2.2 on Win 10 x64

matplotlib\mpl-data\sample_data is missing from matplotlib package so a number of samples and tutorials that expect to load them with matplotlib.cbook.get_sample_data() fails.

Tried to install mpl_sample_data package from conda-forge but files are installed into the parent directory matplotlib\mpl-data and not matplotlib\mpl-data\sample_data where they should be and get_sample_data() expects to find them as default.

Any suggestion on how to have a complete matplotlib installation on Anaconda?

Thanks

like image 652
Gabriele Avatar asked Nov 07 '22 07:11

Gabriele


1 Answers

Here's my solution. First, I install matplotlib package independently using the official command 'python -mpip install -U matplotlib'. https://matplotlib.org/2.2.2/users/installing.html#windows Then, you will have the sample_data folder in your Python directory. Second, I copy the sample_data folder from Python directory to anaconda's matplotlib\mpl-data\ directory.

like image 151
redcreek Avatar answered Nov 28 '22 00:11

redcreek