I'm trying to plot vertical lines in a log plot
xv1 = 10
plt.semilogy(t,P,'b')
plt.semilogy(t,Pb,'r')
plt.vlines(xv1,-1,1,color='k',linestyles='solid')
plt.xlabel('Time [s]')
plt.ylabel('P [Pa]')
plt.grid()
plt.show()
The vlines does not show up in the plot (it does for plt.plot)
Any ideas? Thanks!
y=0) and still want your vertical line to extend from -1 to 1? If you want to have a line extending across the entire figure, you should probably useaxvline.ax.set_yscale("symlog").