importmatplotlib.pyplotaspltimportnumpyasnp x=np.linspace(0,10,100)y=np.sin(x)plt.figure(figsize=(8,6))plt.plot(x,y,linestyle='dotted',linewidth=2,color='blue',label='how2matplotlib.com')plt.title('Dotted Line Example')plt.xlabel('X-axis')plt.ylabel('Y-axis')plt.legend()plt.grid...
import numpy as np import matplotlib.pyplot as plt x = np.array([1, 1, 1, 2, 2, 2, 3, 3, 3]) y = np.array([1, 2, 3, 1, 2, 3, 1, 2, 3]) a = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9]) grid = a.reshape(3, 3) plt.imshow(grid, extent=(x.min(), x...
I think it would be convenient to have an option similar to Matplotlib. Something like this graph.draw_line((x1,y1),(x2,y2),width=3,color='red',linestyle='--') The code below is my attempt to replicate a dash line. However, the downside is that I could not delete the whole dash...