Playing with 'matplotlib' with Python

I have a number of sensors around the periphery of my house that report temp/humidity/pressure readings to a database in London (as shown below) and also detect infrared status for my security cameras.

Whilst helping my grandsons with their Computer Science coursework we took a look at the 'MatPlotLib' library in Python and after they left I thought... "I could use that library to plot some of my T/H/P readings".

My initial step was to create a NR flow to query the dB and send the results, via MQTT, to my Python script.

The Python script then plotted this graph.

I have to admit (wash my mouth out with soapy water), I've since modified the Python script so it performs the MySQL query itself, thus avoiding the middle-man (i.e. Node-RED and MQTT transfer).

1 Like