Added a function checkes plotDimension. Funcion is called checkPlotDimension.