I have X and Y values, I want to convert them to an image and then get the image data. How can I do that process in memory. I have tried using matplotlib to plot the values and save them.
app = QApplication(sys.argv)
screen = app.screens()[0]
dpi = screen.physicalDotsPerInch()
px = 1 / plt.rcParams['figure.dpi']
plt.figure(figsize=(40*px, 40*px))
plt.plot(x.index, values)
plt.axis('off')
plt.savefig("S:\\MlData\\BlData\\imagetests\\test.png", pad_inches = 0)
this saves the image but with white margins which I cant remove no matter what I have tried. How can I load the data and get the image Matrix and how can I do this without saving the image and reading it from the dist?
Thanks
Amit