ax.set_xlabel(r"Time $t$")
            ax.set_ylabel(r"$-\frac{\Im(\overline{r_k}-r_l)}{2}$")
            ax.set_title(r"Mixing of $Q_0$ from $\Pi_"+str(i)+r"$ and $\Pi_"+str(j)+r"$")

    fig.savefig("wavepacket_parameter_mixing_Q_block"+str(blockid)+GD.output_format)
    close(fig)


if __name__ == "__main__":
    iom = IOManager()

    # Read file with simulation data
    try:
        iom.open_file(filename=sys.argv[1])
    except IndexError:
        iom.open_file()

    # Iterate over all blocks
    for blockid in iom.get_block_ids():
        print("Plotting mixing relation of data block '"+str(blockid)+"'")

        # See if we have an inhomogeneous wavepacket in the current data block
        if iom.has_inhomogwavepacket(blockid=blockid):
            data = read_data_inhomogeneous(iom, blockid=blockid)
            plot_data(blockid, *data)
        # There is no wavepacket in the current block
        else:
            print("Warning: No wavepacket found in block '"+str(blockid)+"'!")

    iom.finalize()