import numpy as np
import pylab as plt
X = np.linspace(0, 3, 100)
Y = np.exp(-X)

def semilogy_to_bottom(X, Y):
    P, = plt.semilogy(X, Y)
plt.gca().lines.remove(P)
y_min = plt.gca().get_ylim()[0]
X2 = np.concatenate((X, [X[-1]]))
Y2 = np.concatenate((Y, [y_min]))
plt.semilogy(X2, Y2)
semilogy_to_bottom(X, Y)
plt.xlim(0, 5)
plt.show()
Draw connecting line to points with a zero ordinate on a log scale with matplotlib?