code: def plot_embedding(X, title):
      _, ax = plt.subplots()
      X = MinMaxScaler().fit_transform(X)
  
      for digit in digits.target_names:
          ax.scatter(
              *X[y == digit].T,
              marker=f"${digit}$",
              s=60,
              color=plt.cm.Dark2(digit),
              alpha=0.425,
              zorder=2,
          )
      shown_images = np.array([[1.0, 1.0]])  # just something big
      for i in range(X.shape[0]):
          # plot every digit on the embedding
          # show an annotation box for a group of digits
          dist = np.sum((X[i] - shown_images) ** 2, 1)
          if np.min(dist) < 4e-3:
              # don't show points that are too close
              continue
          shown_images = np.concatenate([shown_images, [X[i]]], axis=0)
          imagebox = offsetbox.AnnotationBbox(
              offsetbox.OffsetImage(
                  digits.images[i], cmap=plt.cm.gray_r
              ),
              X[i],
          )
          imagebox.set(zorder=1)
          ax.add_artist(imagebox)
  
      ax.set_title(title)
      ax.axis("off")
  
file_path: scikit-learn/examples/manifold/plot_lle_digits.py
imports: from sklearn.datasets import load_digits
  import matplotlib.pyplot
  import numpy
  from matplotlib import offsetbox
  from sklearn.preprocessing import MinMaxScaler
  from sklearn.decomposition import TruncatedSVD
  from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
  from sklearn.ensemble import RandomTreesEmbedding
  from sklearn.manifold import MDS, TSNE, Isomap, LocallyLinearEmbedding, SpectralEmbedding
  from sklearn.neighbors import NeighborhoodComponentsAnalysis
  from sklearn.pipeline import make_pipeline
  from sklearn.random_projection import SparseRandomProjection
  from time import time
label_desc: Use image node_id 1 for calling a global function with example usage: plot_embedding(X, title) without return types