code: def plot(self, pts_per_edge, color=None, ax=None, with_nodes=False):
          
          if self._dimension != 2:
              raise NotImplementedError(
                  "2D is the only supported dimension",
                  "Current dimension",
                  self._dimension,
              )
  
          if ax is None:
              ax = _plot_helpers.new_axis()
          _plot_helpers.add_patch(ax, color, pts_per_edge, *self._get_edges())
          if with_nodes:
              ax.plot(
                  self._nodes[0, :],
                  self._nodes[1, :],
                  color="black",
                  marker="o",
                  linestyle="None",
              )
          return ax
docs: Plot the current surface.
  
          Args:
              pts_per_edge (int): Number of points to plot per edge.
              color (Optional[Tuple[float, float, float]]): Color as RGB profile.
              ax (Optional[matplotlib.artist.Artist]): matplotlib axis object
                  to add plot to.
              with_nodes (Optional[bool]): Determines if the control points
                  should be added to the plot. Off by default.
  
          Returns:
              matplotlib.artist.Artist: The axis containing the plot. This
              may be a newly created axis.
  
          Raises:
              NotImplementedError: If the surface's dimension is not ``2``.