def METHOD_NAME(x,y,values,basemap=None,cbar=False,**param_dict):
    """
    plot array data, either 1d or 2d
    :param x: x position of points
    :param y: y position of points
    :param values: values to plot, if 1D, a scatter plot will be made, if 2D, a pcolormesh plot will be made
    :param basemap: supply a basemap, if None, data will be plotted on current axes
    :param cbar: True/False, whether or not to show a colorbar
    """
    if len(np.shape(values)) == 1:
        if basemap is None:
            # plot a scatter plot with values coloured
            plt.scatter(x,y,c=values,**param_dict)
        else:
            x,y = basemap(x,y)
            basemap.scatter(x,y,c=values,**param_dict)
    elif len(np.shape(values)) == 2:
        if basemap is None:
            # plot a pcolormesh plot
            plt.pcolormesh(x,y,values,**param_dict)
        else:
            x,y = basemap(x,y)
            basemap.pcolormesh(x,y,values,**param_dict)
    plt.gca().set_aspect(1)
    if cbar:
        plt.colorbar(shrink=0.5