tkinter.TclError: couldn’t connect to display “localhost:18.0”

The problem is that you are using an interactive backend which is trying to create figure windows for you, which are failing because you have disconnected the x-server that was available when you started the simulations.

Change your imports to

import matplotlib
matplotlib.use('pdf')
import matplotlib.pyplot as plt

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)