Rewrite to make it much easier to plot multiple varaibles and detectors