Fix Issue7 and add check for plot axis ranges