From 657251d5aa5ac4f01558d50c52e6071d9667bf67 Mon Sep 17 00:00:00 2001 From: jensbri <35558560+jensbri@users.noreply.github.com> Date: Thu, 18 Apr 2024 08:00:42 +1200 Subject: [PATCH] adding labels to plot While I understand the beauty of having just 3 lines of code to ingest a dataset and output a heatmap, the resulting plot does not meet the basic requirements of an adequate plot. We shouldn't teach people to generate something 'data-sciency' that people can re-use without understanding what is to be seen on the plot. --- episodes/03-matplotlib.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/episodes/03-matplotlib.md b/episodes/03-matplotlib.md index baccbdb7f..58266b104 100644 --- a/episodes/03-matplotlib.md +++ b/episodes/03-matplotlib.md @@ -45,6 +45,8 @@ data = numpy.loadtxt(fname='inflammation-01.csv', delimiter=',') ```python import matplotlib.pyplot image = matplotlib.pyplot.imshow(data) +matplotlib.pyplot.xlabel("Day") +matplotlib.pyplot.ylabel("Patient") matplotlib.pyplot.show() ```