5

I have all of my graphs working, so now I am trying to scale my plots down to a relatively small size (3x3in). I added the figure command and the graph goes blank. Right size, just blank. I'm obviously missing something basic but it's beating me. When I comment it out, it shows fine ( if a bit big). When I include it, it blanks the image.

What am I doing incorrectly ?

plt.setp(line[lindex], linewidth=1.0)
plt.setp(line[lindex+1], linewidth=2.0)
plt.xlabel("Months")
plt.ylabel("Score")
plt.title(CurrAppName + "- by month")
plt.legend()
# plt.figure(figsize=(3,3))
plt.show()
2
  • 1
    Why wouldn't you include matplotlib tag in a question named: "Matplotlib figure not working"? Commented Feb 20, 2018 at 16:00
  • That was a miss. Sorry Commented Mar 10, 2018 at 15:46

1 Answer 1

4

If this is your whole code, just put the plt.figure(figsize=(3, 3)) as the first line. Here, declaring plt.figure(...) in the end means you are creating a whole new plot after you've drawn into the last one. You don't want that.

Sign up to request clarification or add additional context in comments.

1 Comment

Ahhh. Thank you - I dont want that at all.