fixed bug in plotting, still more debugging to do.
can now open windows if there is no data