Set attributes of a figure with subplots

425 Views Asked by At

I am new in plotting with python. I have made a plot with 4 subplots. Knowing the attributes dpi and figsize, how can I set them for my fig?

myfig,xarr = plt.subplots(2,2)

I know this command exists:

plt.figure(dpi=100,figsize=(5,5))

but not sure how to attach it to myfig.

1

There are 1 best solutions below

0
On BEST ANSWER

both commands are somewhat redundant. The first one is sufficient to do what you want. You can pass the optional keyword argumends dpi and figsize into it.