0

I'm trying to embed a matplotlib graph in tkinter. All the resources I have come across like this one or this one make use of the FigureCanvasTk.show function and the NavigationToolbar2TkAgg class which have been deprecated.

What do I need to use instead?

1 Answer 1

2

The most up to date examples are to be found in the matplotlib devdocs, http://matplotlib.org/devdocs/.

This is the devdoc example for TK.

To answer the real question in between the lines,

  • FigureCanvasTk.show() needs to be replaced by FigureCanvasTk.draw()
  • NavigationToolbar2TkAgg needs to be replaced by NavigationToolbar2Tk
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.