df.plot.scatter如何更改第二个yaxis的大小?

时间:2018-11-20 08:16:39

标签: python plot scatter

这是我的python代码:

fig, ax1 = plt.subplots(figsize=(15,10))
ax1.tick_params(axis='both', labelsize=18)
test.plot.scatter(x='USFM Durchfluß korrigiert', y='Ausgangsdruck', c='Dichte', ax = ax1, colormap="viridis")
ax1.set_xlabel('Durchfluss [m^3/h]', fontsize=18)
ax1.set_ylabel('Ausgangsdruck [bar]', fontsize=18)

我希望“ Dichte”的尺寸与其他轴的尺寸相同: I want to have "Dichte" in the same size as the other axis

1 个答案:

答案 0 :(得分:0)

尝试设置matplotlib.pyplot的常规字体大小,并且刻度的字体大小与此相等:

import matplotlib as mpl
import matplotlib.pyplot as plt

plt.rc('font',  size=10)  
mpl.rc('xtick', labelsize=10)
mpl.rc('ytick', labelsize=10)