Set background color for subplot

前端 未结 2 530
旧时难觅i
旧时难觅i 2020-12-11 05:39

Say I have an image made of 4 sub plots like so:

import matplotlib.pyplot as plt import numpy as np

# Simple data to display in various forms
x = np.         


        
相关标签:
2条回答
  • 2020-12-11 06:28

    Axes.set_axis_bgcolor() has been deprecated since version 2.0. Use set_facecolor() now.

    0 讨论(0)
  • 2020-12-11 06:36

    You can simply do axarr[1,0].set_facecolor('grey') to change the axis color for any particular axis manually.

    matplotlib accepts many different color strings (examples here and here) as well as hex values in HTML strings (for example '#eeefff'). Plot

    0 讨论(0)
提交回复
热议问题