def plot_grid(grid_arcsec, array, units, kpc_per_arcsec, pointsize, zoom_offset_arcsec):
if grid_arcsec is not None:<EOL><INDENT>if zoom_offset_arcsec is not None:<EOL><INDENT>grid_arcsec -= zoom_offset_arcsec<EOL><DEDENT>grid_units = convert_grid_units(grid_arcsec=grid_arcsec, array=array, units=units,<EOL>kpc_per_arcsec=kpc_per_arcsec)<EOL>plt.scatter(y=np.asarray(grid_units[:, <NUM_LIT:0>]), x=np.asarray(grid_units[:, <NUM_LIT:1>]), s=pointsize, c='<STR_LIT:k>')<EOL><DEDENT>
Plot a grid of points over the array of data on the figure.

     Parameters
     -----------.
     grid_arcsec : ndarray or data.array.grids.RegularGrid
         A grid of (y,x) coordinates in arc-seconds which may be plotted over the array.
     array : data.array.scaled_array.ScaledArray
        The 2D array of data which is plotted.
     units : str
         The units of the y / x axis of the plots, in arc-seconds ('arcsec') or kiloparsecs ('kpc').
     kpc_per_arcsec : float or None
         The conversion factor between arc-seconds and kiloparsecs, required to plot the units in kpc.
     grid_pointsize : int
         The size of the points plotted to show the grid.