Visualizing accuracy and losses using matplot?

I have trained learner on image data, using the following line of code.

learner = cnn_learner(data, models.resnet34, metrics=[accuracy, error_rate])
learner.fit_one_cycle(6)

Now I know that I can plot using these two lines of code.

learner.lr_find()
learner.recorder.plot_losses()

which will plot losses. Can I save the learner results in a variable and get the history keys using matpolt liberay similar to this.

hist = earner.fit_one_cycle(6)
loss_train = hist.history['train_loss']
loss_val = hist.history['val_loss']
epochs = range(1,35)
plt.plot(epochs, loss_train, 'g', label='Training loss')
plt.plot(epochs, loss_val, 'b', label='validation loss')
plt.title('Training and Validation loss')
plt.xlabel('Epochs')
plt.ylabel('Loss')
plt.legend()
plt.show()

Thank you in advance.