New Answer
@ChrisA has provided the best answer in the comments: If using DataFrame.plot()
method, add argument ylim=(0.7, 1)
Old Answer
If you've used the usual import matplotlib.pyplot as plt
, a quick fix could be to add the following lines under your pandas plot command:
# gca = "get current axis"
ax = plt.gca()
# ax.get_ylim() returns a tuple of (lower ylim, upper ylim)
ax.set_ylim(0.7, ax.get_ylim()[1])
If you're using the object-oriented matplotlib API that typically starts with something like fig, ax = plt.subplots()
(reference: The Lifecycle of a Plot), then you won't need to run ax = plt.gca()
.