I'm using the following code in order to have an active plot:
pressure_fig= Figure(figsize=(11,6))
sensor_graph = pressure_fig.add_subplot(111)
x_vals = []
y_vals = []
sensor_graph.plot([], [])
canvas = FigureCanvasTkAgg(pressure_fig,graph_frame)
canvas.get_tk_widget().pack()
toolbar = NavigationToolbar2Tk(canvas, graph_frame)
toolbar.update()
canvas._tkcanvas.pack(anchor='w')
Which gives me this image. As you can see, the Legend is partially cut off and there is a bit of gray space on the side. However, when I attempt to increase the figure size to pressure_fig= Figure(figsize=(12,6))
, I get the same problem. I also tried, when packing it onto the screen, using canvas.get_tk_widget().pack(fill=tk.BOTH), but this results in the same thing as using a 12x6 figure. Is there a way to force the plot to not be in the center of the canvas?