Make sure relevant data is loaded before plotting a graph