どのように?
![enter image description here](https://i.stack.imgur.com/46bl5.png)
あなただけのようmatplotlibの使用seaborn/ggplot /パンダのスタイルを模倣することができます:あなたはまだ同じプロットの比較を行うことができますので、多分あなたは使用することができ、
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
mpl.rcParams['axes.linewidth'] = 0.0
vex = (np.random.rand(100),)*4
v_attr = [('r','v1'), ('orange', 'v2'),
('g', 'v3'), ('b', 'v4')]
fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2, sharex='col',
sharey='row')
for s,v,(c,l) in zip([ax1, ax2, ax3, ax4], vex, v_attr):
s.set_axis_bgcolor('#dddddd')
s.grid(b=True, which='major', c='white', ls='-', zorder=-1,
lw=0.75, alpha=0.64)
s.set_ylim(0,max(v)*1.35)
s.tick_params('both', pad=4, labelsize=8, which='major',
direction='out', top='off', right='off')
s.plot(v, label=l, c=c, zorder=3)
s.legend(frameon=False,)
かアルファを使用して、各ラインを背景内の他のラインと個別にハイライト表示します。
![enter image description here](https://i.stack.imgur.com/NkwXz.png)
import numpy.random as rand
def rand_line():
return rand.normal(rand.randint(5,12),
rand.ranf()*3, 100)
lines = [rand_line() for _ in range(4)]
labels = [('r','v1'), ('purple','v2'),
('g','v3'), ('b','v4')]
fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2, sharex='col',
sharey='row')
subplots = [ax1, ax2, ax3, ax4]
for i,s in enumerate(subplots):
for j,(v,l) in enumerate(zip(lines,labels)):
a = (.9 if j==i else 0.25)
s.plot(v, zorder=3, alpha=a, c=l[0], label=l[1])
s.legend(loc='lower center', ncol=4, fontsize=10)
fig.tight_layout()
plt.savefig('line_subplots-highlight.png')
あなたはもっと大きなプロットを持っていますか? 'plt.figsize(12,16)'?もし彼らが同じ姿にいなければならないのでしょうか? – putonspectacles