When using matplotlib normally the navigation toolbar has 8 options including an "Edit axis, curves and image parameters" options highlighted here in blue.
import numpy as np
import matplotlib.pyplot as plt
y = [i**2 for i in range(101)]
plt.plot(y)
plt.show()
But when plotted in tkinter GUI, there are only 7 options - the edit option is the one needed and is missing. Also, the subplot options dialogue looks completely different.
from tkinter import *
import tkinter.ttk as ttk
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk
fig = plt.Figure(figsize = (5, 5),dpi = 100)
y = [i**2 for i in range(101)]
plot1 = fig.add_subplot(111)
plot1.plot(y)
canvas = FigureCanvasTkAgg(fig,master = root)
canvas.draw()
canvas.get_tk_widget().pack(fill=BOTH, expand=True)
toolbar = NavigationToolbar2Tk(canvas,root)
toolbar.update()
canvas.get_tk_widget().pack(fill=BOTH, expand=True)
root.mainloop()
From this post here it seems like this is something to do with default options being overwritten by the tkinter library, specifically the NavigationToolbar2Tk class. Can someone help with adding the edit option back into the tkinter toolbar?