I'm following Sane color scheme for Matplotlib, but found that my coloring is still the same as the default color scheme. What could be wrong?
I was following Customizing plots with style sheets, and use these at the top of my code:
import matplotlib.pyplot as plt
plt.style.use('ggplot')
Is that the reason? Or something else?
Disclose,
- I've done my own modification to huyng's gist, which was created on Feb 8, 2011. The result is here.
- The reason for my own modification is listed there as well.
- Where I put the file is explained there as well, and I did restart iphthon notebook after that.
- The reason for me doing the color scheme customization at all is, quoting from How to make beautiful data visualizations in Python with matplotlib, Color matters
The default color scheme in matplotlib is pretty ugly. Die-hard matlab/matplotlib fans may stand by their color scheme to the end, but it’s undeniable that Tableau’s default color scheme is orders of magnitude better than matplotlib’s.
UPDATE: showing that I am placing a valid matplotlibrc file at the correct place (which has explained here):
D:\>python
Python 3.5.0 |Anaconda 2.4.0 (64-bit)| (default, Dec 1 2015, 11:46:22) [MSC v.1
900 64 bit (AMD64)] on win32
>>> import matplotlib
>>> matplotlib.matplotlib_fname()
'D:\\Programs\\Anaconda3\\lib\\site-packages\\matplotlib\\mpl-data\\matplotlibrc
'
D:\>dir D:\Programs\Anaconda3\libs\site-packages\matplotlib\mpl-data\matplotlibrc
Volume in drive D is New Volume
Directory of D:\Programs\Anaconda3\libs\site-packages\matplotlib\mpl-data
12/18/2015 05:34 PM 25,738 matplotlibrc
1 File(s) 25,738 bytes