You can discuss the new note here.

Bonus points for anyone who can improve the labelling of the plots. 😄

  • Riia replied to this.
    3 months later

    Bence Just so you know--the note this discussion is meant to go with isn't linked. No doubt someone who really needs this info will be able to track it down from the name anyway, but I suspect you meant to link it. :-)

    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