Plotting: Rearranged code such that plot axis are only set up once.

Has some issues with the initial layout (y-axis only a few pixels high).
Can be fixed by providing custom ticks.
Fixes the problem of ugly tick fonts due to multiple repaint events.