fixes for the grid plotting and digitize function