Creating scatterplot-matrices and covariance heatmaps in iolite
Thanks Riia. Fixed
Thanks! I tried both the quick correlation matrix as a heatmap, and the Scatterplot Matrices using Pandas and they both work great. The resultant figures have a button to save the figure, but nothing seems to happen if I press that save button.
Likewise the magnifying glass button doesn't seem to work.
However, the button that opens a popup for changing the numbers for the borders and spacing does, in fact, open that popup, but changing the numbers in the popup doesn't appear to do anything, should it?
Hi Riia,
Not all the of the Matplotlib functionality works when wired to the Qt backend provided with iolite. So, it is not too surprising that some of it does not work as expected. It is something we can try to improve in the future.
That said, you can easily save the figure by adding
plt.savefig('/path/to/your/figure.pdf')
or you can use other suffixes if you prefer the figure in a different format. I believe it is inferred from the name provided.
Rather than typing in the file name which is a bit tedious if you're doing this often, you can get a save file name using Qt, e.g.
import matplotlib.pyplot as plt
from iolite.QtGui import QFileDialog
filename = QFileDialog.getSaveFileName(None, 'Save Figure')
if not filename:
raise Exception('File name not provided')
plt.plot([1, 2, 3, 4], [1, 2, 3, 4])
plt.savefig(filename)
This will ask for a file name using a standard file save dialog for your platform and if it is blank, it raises an exception that will abort the process.
All the best,
- Joe