class_docstr: Graph drawer that uses a pyplot.Axes as context
class_docstr_tok: ["Graph","drawer","that","uses","a","pyplot.Axes","as","context"]
code: def draw(self, graph, *args, **kwds):
      if args:
          warn(
              "Positional arguments to plot functions are ignored "
              "and will be deprecated soon.",
              DeprecationWarning,
              stacklevel=1,
          )
  
      # Some abbreviations for sake of simplicity
      ax = self.ax
  
      # Create artist
      art = GraphArtist(
          graph,
          vertex_drawer_factory=self.vertex_drawer_factory,
          edge_drawer_factory=self.edge_drawer_factory,
          *args,  # noqa: B026
          **kwds,
      )
  
      # Bind artist to axes
      ax.add_artist(art)
  
      # Create children artists (this also binds them to the axes)
      art._reprocess()
  
      # Legend for groups
      if ("mark_groups" in kwds) and kwds.get("legend", False):
          ax.legend(
              art._legend_info["handles"],
              art._legend_info["labels"],
          )
  
      # Set new data limits
      ax.update_datalim(art.get_datalim())
  
      # Despine
      ax.spines["right"].set_visible(False)
      ax.spines["top"].set_visible(False)
      ax.spines["left"].set_visible(False)
      ax.spines["bottom"].set_visible(False)
  
      # Remove axis ticks
      ax.set_xticks([])
      ax.set_yticks([])
  
      # Autoscale for x/y axis limits
      ax.autoscale_view()
  
      return art
  
imports: from warnings import warn
  from functools import wraps, partial
  from igraph._igraph import convex_hull, VertexSeq
  from igraph.drawing.baseclasses import AbstractGraphDrawer
  from igraph.drawing.utils import FakeModule
  from .edge import MatplotlibEdgeDrawer, EdgeCollection
  from .polygon import HullCollection
  from .utils import find_matplotlib
  from .vertex import MatplotlibVertexDrawer, VertexCollection
label_desc: Use image node_id 2 for calling the MatplotlibGraphDrawer obj's underlying member method code with example usage: obj.draw(graph) and returns: art