I'm plotting the learning curve with Python with the following code:

import matplotlib.pyplot as plt
import seaborn as sns
import csv
import pandas as pd

# Increase the plot size and font size.
plt.rcParams["figure.figsize"] = (12,6)
plt.plot(lst, 'r')

plt.legend(["Validation Loss"])
# Label the plot.
plt.title("RNN deltat")

The curve looks like this: enter image description here

The lecturer said better try it on a logarithmic scale. Can you please help to apply the logarithm here?


1 Answer 1


This is more of a programming question than a data science question and would therefore be better suited to the stackoverflow stackexchange. To change the y-axis from a linear scale to a logarithmic scale you can use matplotlib.pyplot.yscale function using "log" as the argument:

import matplotlib.pyplot as plt


Not the answer you're looking for? Browse other questions tagged or ask your own question.