Python Forum
matplotlib change graph size
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
matplotlib change graph size
#1
hi, I'm trying to figure out how to change the size of the graph that matplotlib is giving me, but I cant quite figure out how. I want to add some GUI using tkinter that will manipulate the drawn graph. I've tried this:
fig = plt.gcf()
fig.set_size_inches(8.5, 1.5)

but it seems just to change the window size. here is part of the code I'm using:
Y = [[]]
X = [[]]

def plot(ite):
    plt.plot(X[ite], Y[ite], label = (str(ite)))

for i in range(0,3):
    plot(i)

plt.legend()
plt.show()
I'm not sure what and how I need to add to resize the graph
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Embed Matplotlib Graph to Tkinter? dimidgen 0 182 Mar-04-2024, 07:40 PM
Last Post: dimidgen
  How to conditionally specify markers in matplotlib graph Mark17 3 3,123 Mar-03-2022, 07:42 PM
Last Post: Mark17
  Change Text Size in Console? ShakeyPakey 9 11,011 Dec-09-2021, 02:51 AM
Last Post: drvlwho
  [split] Change Text Size in Console? CodingKid 1 1,848 Jul-20-2021, 02:47 PM
Last Post: deanhystad
  blank graph with matplotlib from a csv file / data type issue arsentievalex 0 1,912 Apr-06-2021, 10:08 AM
Last Post: arsentievalex
  Matplotlib: How do I convert Dates from Excel to use in Matplotlib JaneTan 1 3,161 Mar-11-2021, 10:52 AM
Last Post: buran
  Python Matplotlib: How do I plot lines with different end point in the same graph? JaneTan 0 1,550 Feb-28-2021, 11:56 AM
Last Post: JaneTan
  Pyplot graph size TammyP 1 1,727 Jan-26-2021, 02:15 PM
Last Post: TammyP
  Change the scale on a Matplotlib Interactive Graph khatharsis 0 2,805 Oct-13-2019, 06:14 AM
Last Post: khatharsis
  size of set vs size of dict zweb 0 2,117 Oct-11-2019, 01:32 AM
Last Post: zweb

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020