I am fetching two variables from a website and taking four instances of each like as I have shown below
Date a
x 180
y 16.57
Date b
x 140.17
y 149
Date c
x 254.71
y 200
Date d
x 248.42
y 168
Next I am trying to display the Matplotlib line plot of both variables against time on 8x8 RGB LED matrix. Since there are two dependent variables so I can use colors for both lines in the plot. I can save the matplotlib figure and According to the documentation of the sense hat API I can load the image on by using
sense.load_image("space_invader.png")
It Loads an image file, converts it to RGB format and displays it on the LED matrix. The image must be 8 x 8 pixels in size.
It is bound by pixel size of the image to be loaded, how can I ensure that these bounds are hold by matplotlib? Will it be possible to display the plot on 8x8 figure?
UPDATE: I tried to create the 8x8 plot and setting its DPI to 1
fig, ax = plt.subplots(figsize=(8,8), dpi=1)
But it created an empty figure as shown