Change background * without * frame with matplotlib

Given this code,

from pylab import * ion() axes(frameon = 0, aspect = 1, polar = 1) grid (True) 

I get a window containing axes where I can build what I need.

I want to change the background of this window from standard gray to another.

I do not want to use a frame.

+4
source share
1 answer

When calling figure() you must specify the facecolor argument:

 from pylab import * ion() figure(facecolor='white') # Or any other color axes(frameon = 0, aspect = 1, polar = 1) grid(True) 

enter image description here

+8
source

Source: https://habr.com/ru/post/946408/


All Articles