For some reason this code creates a figure that is only the standard size: it doesn't change the height or width (I chose widths and heights that are ludicrous to clearly illustrate the problem):
import matplotlib.pyplot as plt
fig = plt.figure()
fig.set_figwidth(30)
fig.set_figheight(1)
print('Width: {}'.format(fig.get_figwidth()))
plt.show()
I'm running on OSX 10.10.4, Python 3.4.3, Matplotlib 1.4.3. (Installed via Macports.) Any ideas? What am I missing?
fig = plt.figure(figsize=(30,1))work?fig.set_size_inches(30,1)and replace 30 or 1 with something new if a colorbar is included. Or more dynamically, first determine the figure size (e.g.size = fig.get_size_inches()) and adjust that as needed.