//  [python]
def plotClusters(
        self,
        dimX,
        dimY,
        resolution=100,
        s=4,
        c=None,
        cmap="Greys",
        logplot=False,
        plot=True,
        save=None,
        data=None,
        levels=7,
    ):
        """Plot a scatter-plot of the locations of the clusters on top of the count histogram.

        Parameters
        ----------
        dimX : int
            Index of projected dimension to use for the X axis.
        dimY : int
            Index of projected dimension to use for the Y axis.
        resolution : int
            Resolution of bincount grid.
        s : float
            Marker size for clusters.
        c : list
            Colors or indexes for each cluster.
        cmap : matplotlib.colors.Colormap
            Matplotlib colormap for the scatter plot.
        logplot : bool
            Set True to plot the logarithm of counts.
        plot : bool
            If the method should display the plot
        save : str
            Path of the file in which to save the figure
        data : :class:`MetricData` object
            Optionally you can pass a different MetricData object than the one used for clustering. For example
            if the user wants to cluster on distances but wants to plot the centers on top of RMSD values. The new
            MetricData object needs to have the same simlist as this object.
        """
        if self.Centers is None:
            raise RuntimeError("Data has not been clustered yet. Cannot plot clusters.")
        from matplotlib import pylab as plt

        if data is None:
            data = self
            centers = self.Centers
        else:
            from htmd.model import getStateStatistic

            if self.numFrames != data.numFrames or ~np.all(
                [s1 == s2 for s1, s2 in zip(self.simlist, data.simlist)]
            ):
                raise RuntimeError(
                    "The data argument you provided uses a different simlist than this object."
                )
            centers = np.vstack(
                getStateStatistic(self, data, range(self.K), statetype="cluster")
            )

        if data.description is not None:
            xlabel = data.description.description[dimX]
        else:
            xlabel = "Dimension {}".format(dimX)

        if data.description is not None:
            ylabel = data.description.description[dimY]
        else:
            ylabel = "Dimension {}".format(dimY)

        title = "Clusters plotted onto counts histogram"
        if logplot:
            title = "Clusters plotted onto logarithmic counts histogram"
        f, ax, cf = self._plotCounts(
            dimX,
            dimY,
            resolution=resolution,
            logplot=logplot,
            levels=levels,
            cmap=cmap,
            title=title,
            xlabel=xlabel,
            ylabel=ylabel,
        )

        y = ax.scatter(
            centers[:, dimX],
            centers[:, dimY],
            s=s,
            c=c if c is not None else "r",
            cmap=cmap,
            linewidths=0,
            marker="o",
        )
        if c is not None:
            self._setColorbar(f, y, "Cluster groups")

        if save is not None:
            plt.savefig(save, dpi=300, bbox_inches="tight", pad_inches=0.2)
        if plot:
            plt.show()