write function for checking box when input clickPlotDist