I encountered same problem and upgrade didn't help. But I found the reason: I could be due to unreasonable figsize, i.e. error actually means that size of figure is too large! My mistake was trying to create a plot with size (100,100) in inches.