While trying to make some graphs for one of my side projects recently, I came across an issue that both matplotlib and ggplot did not show up the graphs. I was able to save the graphs to an image file just fine, but if I tried to show them directly on screen while running the script, it just printed a number and exited. After tearing apart my hair for some time, I checked the backend being used by matplot lib: