I am getting the following error when I try to use an external style sheet loaded locally.
Bad key "axes.prop_cycle" on line 270 in
idt.mplstyle.
You probably need to get an updated matplotlibrc file from
http://matplotlib.sf.net/_static/matplotlibrc or from the matplotlib source
distribution
I need to be able to distribute this style sheet with the code easily, so saving to the styles folder isn't an option. That said, I can run styles out of that folder no problem. If I copy the style from the folder to local then that line stops working.
All other aspects of the style sheet are obeyed with exception of the color cycler. I've tried simply copying the default style sheets out of the folder but that doesn't work either.
This is the code:
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
from matplotlib.ticker import FuncFormatter
%matplotlib inline
rev_by_qtr = pd.read_csv("rev_by_qtr.csv")
rev_by_qtr = rev_by_qtr.set_index('market_family')
plt.style.use('idt.mplstyle') # This is a local style sheet
ax = rev_by_qtr.T.plot()
Here is line 270 from the style sheet
axes.prop_cycle : cycler('color', ['E24A33', 'AEC7E8', 'FF07FE', 'FFBB78', '2CA02C', '98DF8A', 'D62728', 'FF9896', '9467BD', 'C5B0D5', '8C564B', 'C49C94', 'E377C2', 'F7B6D2', '7F7F7F', 'C7C7C7', 'BCBD22', 'DBDB8D', '17BECF', '9EDAE5'])
I also tried the default from the settings file
axes.prop_cycle : cycler('color', 'bgrcmyk')
Something must have been messed up with my virtual environment. I thought I was running matplotlib 1.5, but I was actually running 1.4.3. As prop_cycle doesn't exist in that version it turned out that was the source of the error message.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With