I reduced the range on the y-axis to make the change in the light
levels more noticable (at a glance/distance). The range is now closer
to the upper and lower limits of the system so there is less 'excess'
space in the chart.
With the scaling down of the range on the y-axis, the legend was
starting to get in the way of the lastest readings -- when there is a
high light-reading. To combat this, I moved the legend to the
lower-left part of the graph. If the light reading goes into the
negatives (lights off in the factory but the system is still on), the
legend can still impede but it only does so on the oldest of the
readings on the graph. Also, the legend is slightly transparent so you
can still see behind it, it's just cumbersome (especially at a
glance/distance).
A basic update of the boiler-plate text I originally used when I
created the repository. The README now provided information on
creating a virtual environment, installing dependencies and a link to
RTR-Docs (for further information on the project).
The code in this commit initialises the chart (sets labels
legends...), grabs the latest reading from the light meters in
Ritherdon and updates the chart (as an animation).
A few things to note:
1. The code in this state only stores the latest 600 readings. This is
usually just over one minutes worth of data (this might vary depending
on computer and internet speed).
2. There are no time stamps on the x-axis (Time) because of I've made
one chart plot and update 2 'streams' (in real-time). I'm going
against the grain from what I understand of Matplotlib by doing
this. All the documentation I've seen so far implies you want separate
charts for different data streams/series. On top of that, updating one
stream might mean the x-axis is out of sync. with the other
stream. Because of this, I decided against trying to keep the x-axis
updated with time-stamps.
3. The aim is to just show the readings as a chart.I have already made
programs which communicate the status of the devices. This is mostly
for when I'm not around the Windows tablet in the flat or running my
Windows VM in the studio.