你会注意到有一堆丢失的代码,这是所有从菜单调用的游戏。我删除了它,因为它很长,不需要回答我的问题。我的问题只是针对一个特定的函数display_data。当我从菜单中调用它时,matplot会在一个新窗口中打开并立即崩溃。我只是设置了下面的基本测试图。有什么想法吗?在import matplotlib.pyplot as plt
def display_data():
plt.plot([1,2,4],[2,7,9])
plt.show()
# (6) Save Progress ------------------------------------------------------------
# (7) Load Data ----------------------------------------------------------------
# (8) Quit Game ----------------------------------------------------------------
def quit_game():
print('\nThank you for playing!')
# Main Menu --------------------------------------------------------------------
def menu():
calculation_game = print("\nEnter 1 to play 'Calculation'")
bin_reader = print("Enter 2 to play 'Binary Reader'")
trifacto = print("Enter 3 to play