小编use*_*088的帖子

控制用于matplotlib子图的wspace

我在想:我有一个1 row, 4 column情节.但是,前三个子图共享相同的yaxes范围(即它们具有相同的范围并代表相同的事物).第四个没有.

我想要做的是改变wspace三个第一个图,使它们接触(并分组),然后第四个图有点空间,没有yaxis标签的重叠等.

我可以这么简单地做一些photoshop编辑......但我希望有一个编码版本.我怎么能这样做?

python numpy matplotlib ipython

5
推荐指数
1
解决办法
2083
查看次数

Matplotlib 字符串 xticks

def plot_freq_error(diff,file,possible_frequency):
    for foo in range(0, len(diff)):
        x = [diff[foo]]
        name = comp
        color = ['0.1', '0.2', '0.3','0.4','0.5','0.6','0.7','0.8', '0.9','0.95','1.0']
        label = ['0.8GHz','1.0GHz','1.2GHz','1.4GHz','1.6GHz','1.8GHz','2.0GHz','2.2GHz','2.4GHz']
        y = zip(*x)
        pos = np.arange(len(x))
        width = 1. / (1 + len(x))

        fig,ax = plt.subplots()
        matplotlib.rcParams.update({'font.size': 22})
        for idx, (serie, color,label) in enumerate(zip(y, color,label)):
            ax.bar(pos + idx * width, serie, width, color=color,label=label)

        plt.tick_params(\
            axis='x',          # changes apply to the x-axis
            which='both',      # both major and minor ticks are affected
            bottom='off',      # ticks along the bottom edge are …
Run Code Online (Sandbox Code Playgroud)

python matplotlib

1
推荐指数
1
解决办法
9091
查看次数

标签 统计

matplotlib ×2

python ×2

ipython ×1

numpy ×1