2

I am trying to replicate a plot produced in R, where each of the subplots in a figure has a framed title over the length of X axis. Like this:

enter image description here

I have tried various things with python, but can't really get any further than this (the rest of the arguments are not important at the moment, hence no code): enter image description here

Is there any way of spreading the frame? I found that bbox is treated as a rectangle, and theoretically I should be able to specify the height and width, but when I try to do this like this:

plt.title('A6', bbox = dict(facecolor='grey', edgecolor='black', 
width=5, height = 5, alpha=0.5))

I am getting a TypeError: init() got multiple values for argument 'width'

branwen85
  • 1,606
  • 5
  • 20
  • 25

0 Answers0