We are going to learn:
math
library.
MediaLib can be used in conjunction with other Python libraries. For example, you can also plot and change the colors, sizes, line types, fonts, etc. of charts using matplotlib. See the official documentation for more details https://matplotlib.org/stable/contents.html
Download the Medialib ex3 files from the gallery and complete the program in ex3.py to display four plots at once. It is not necessary to use the same design (type of graphs, colors, labeling, ...) as the example.
In lines 14 to 22, as shown below, we have defined a function to load the data fromdata.csv
.data, colour, title, labels, file_name
. Hint: use pyplot.clf()
to clear the figure before drawing the next one.draw()
function of MediaLib to load and draw the figures created in step 1 on the window as shown in the figure below.