misc tools for plotting in matlab