What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-10 02:49:13
_tkinter.tclerror: no display name and no $display environment variable
Matplotlib chooses Xwindows backend by default. You need to set matplotlib to not use the Xwindows backend. Add this code to the start of your script (before importing pyplot) and try again: import matplotlib matplotlib.use('Agg') Or add to .config/matp... Add solution -
Python 2021-10-01 01:54:02
python add a point to a plot
# Basic syntax plt.plot(x, y, 'marker') # Example usage: import matplotlib.pyplot as plt import numpy as np # Data to plot x = np.linspace(0, 10, 100) # Plot figure fig = plt.figure() plt.plot(x, np.sin(x), '-') # Add point plt.plot(5, 0, 'ro') # Not... Add solution