What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-04 19:31:12
how to add vertical line on subplot in matplotlib
import numpy as np import matplotlib.pyplot as plt xs = np.linspace(1, 21, 200) plt.figure(figsize=(10, 7)) # only one line may be specified; full height plt.axvline(x=36, color='b', label='axvline - full height') # only one line may be specified; ymi... Add solution -
Python 2021-10-18 02:11:03
python matplotlib how to graph point on line
import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) ax.set_xlim(0,10) ax.set_ylim(0,10) # draw lines xmin = 1 xmax = 9 y = 5 height = 1 plt.hlines(y, xmin, xmax) plt.vlines(xmin, y - height / 2., y + height / 2.) plt.vlines(xmax,... Add solution