fix problem with changing z-stack width.

the bug was that the plotter crashes when the in-coming data has the wrong dimension.

A more robust behavior is to tolerate this and refresh the image when it happens.