[plotstyle] default color cycler

This commit is contained in:
Jan Benda 2020-01-06 21:33:14 +01:00
parent 680e2699bd
commit 7ae8a1786d

View File

@ -1,5 +1,6 @@
import matplotlib as mpl
import matplotlib.pyplot as plt
from cycler import cycler
from mpl_toolkits.mplot3d import Axes3D
xkcd_style = False
@ -353,6 +354,16 @@ def common_format():
mpl.rcParams['ytick.direction'] = 'out'
mpl.rcParams['xtick.major.width'] = 1.25
mpl.rcParams['ytick.major.width'] = 1.25
if 'axes.prop_cycle' in mpl.rcParams:
mpl.rcParams['axes.prop_cycle'] = cycler(color=[colors['blue'], colors['red'],
colors['orange'], colors['green'],
colors['purple'], colors['yellow'],
colors['cyan'], colors['pink']])
else:
mpl.rcParams['axes.color_cycle'] = [colors['blue'], colors['red'],
colors['orange'], colors['green'],
colors['purple'], colors['yellow'],
colors['cyan'], colors['pink']]
# overwrite axes constructor:
if not hasattr(mpl.axes.Subplot, '__init__orig'):
mpl.axes.Subplot.__init__orig = mpl.axes.Subplot.__init__