class_docstr: A renderer class inheriting from base for rendering mpl plots in plotly.
  
  A renderer class to be used with an exporter for rendering matplotlib
  plots in Plotly. This module defines the PlotlyRenderer class which handles
  the creation of the JSON structures that get sent to plotly.
  
  All class attributes available are defined in __init__().
  
  Basic Usage:
  
  # (mpl code) #
  fig = gcf()
  renderer = PlotlyRenderer(fig)
  exporter = Exporter(renderer)
  exporter.run(fig)  # ... et voila
docstr: Setup a new axes object (subplot in plotly).
  
  Plotly stores information about subplots in different 'xaxis' and
  'yaxis' objects which are numbered. These are just dictionaries
  included in the layout dictionary. This function takes information
  from the Exporter, fills in appropriate dictionary entries,
  and updates the layout dictionary. PlotlyRenderer keeps track of the
  number of plots by incrementing the axis_ct attribute.
  
  Setting the proper plot domain in plotly is a bit tricky. Refer to
  the documentation for mpltools.convert_x_domain and
  mpltools.convert_y_domain.
  
  Positional arguments:
  ax -- an mpl axes object. This will become a subplot in plotly.
  props.keys() -- [
      'axesbg',           (background color for axes obj)
      'axesbgalpha',      (alpha, or opacity for background)
      'bounds',           ((x0, y0, width, height) for axes)
      'dynamic',          (zoom/pan-able?)
      'axes',             (list: [xaxis, yaxis])
      'xscale',           (log, linear, or date)
      'yscale',
      'xlim',             (range limits for x)
      'ylim',
      'xdomain'           (xdomain=xlim, unless it's a date)
      'ydomain'
      ]
docstr_tok: ["Setup","a","new","axes","object","(","subplot","in","plotly",")",".","Plotly","stores","information","about","subplots","in","different","'xaxis","'","and","'yaxis","'","objects","which","are","numbered",".","These","are","just","dictionaries","included","in","the","layout","dictionary",".","This","function","takes","information","from","the","Exporter",",","fills","in","appropriate","dictionary","entries",",","and","updates","the","layout","dictionary",".","PlotlyRenderer","keeps","track","of","the","number","of","plots","by","incrementing","the","axis_ct","attribute",".","Setting","the","proper","plot","domain","in","plotly","is","a","bit","tricky",".","Refer","to","the","documentation","for","mpltools.convert_x_domain","and","mpltools.convert_y_domain",".","Positional","arguments",":","ax","--","an","mpl","axes","object",".","This","will","become","a","subplot","in","plotly",".","props.keys","(",")","--","[","'axesbg","'",",","(","background","color","for","axes","obj",")","'axesbgalpha","'",",","(","alpha",",","or","opacity","for","background",")","'bounds","'",",","(","(","x0",",","y0",",","width",",","height",")","for","axes",")","'dynamic","'",",","(","zoom\/pan-able","?",")","'axes","'",",","(","list",":","[","xaxis",",","yaxis","]",")","'xscale","'",",","(","log",",","linear",",","or","date",")","'yscale","'",",","'xlim","'",",","(","range","limits","for","x",")","'ylim","'",",","'xdomain","'","(","xdomain=xlim",",","unless","it","'s","a","date",")","'ydomain'","]"]
code: def open_axes(self, ax, props):
      """Setup a new axes object (subplot in plotly).
  
      Plotly stores information about subplots in different 'xaxis' and
      'yaxis' objects which are numbered. These are just dictionaries
      included in the layout dictionary. This function takes information
      from the Exporter, fills in appropriate dictionary entries,
      and updates the layout dictionary. PlotlyRenderer keeps track of the
      number of plots by incrementing the axis_ct attribute.
  
      Setting the proper plot domain in plotly is a bit tricky. Refer to
      the documentation for mpltools.convert_x_domain and
      mpltools.convert_y_domain.
  
      Positional arguments:
      ax -- an mpl axes object. This will become a subplot in plotly.
      props.keys() -- [
          'axesbg',           (background color for axes obj)
          'axesbgalpha',      (alpha, or opacity for background)
          'bounds',           ((x0, y0, width, height) for axes)
          'dynamic',          (zoom/pan-able?)
          'axes',             (list: [xaxis, yaxis])
          'xscale',           (log, linear, or date)
          'yscale',
          'xlim',             (range limits for x)
          'ylim',
          'xdomain'           (xdomain=xlim, unless it's a date)
          'ydomain'
          ]
  
      """
      self.msg += "  Opening axes\n"
      self.current_mpl_ax = ax
      self.bar_containers = [
          c
          for c in ax.containers  # empty is OK
          if c.__class__.__name__ == "BarContainer"
      ]
      self.current_bars = []
      self.axis_ct += 1
      # set defaults in axes
      xaxis = go.layout.XAxis(
          anchor="y{0}".format(self.axis_ct),
          zeroline=False,
          ticks="inside",
      )
      yaxis = go.layout.YAxis(
          anchor="x{0}".format(self.axis_ct),
          zeroline=False,
          ticks="inside",
      )
      # update defaults with things set in mpl
      mpl_xaxis, mpl_yaxis = mpltools.prep_xy_axis(
          ax=ax,
          props=props,
          x_bounds=self.mpl_x_bounds,
          y_bounds=self.mpl_y_bounds,
      )
      xaxis.update(mpl_xaxis)
      yaxis.update(mpl_yaxis)
      bottom_spine = mpltools.get_spine_visible(ax, "bottom")
      top_spine = mpltools.get_spine_visible(ax, "top")
      left_spine = mpltools.get_spine_visible(ax, "left")
      right_spine = mpltools.get_spine_visible(ax, "right")
      xaxis["mirror"] = mpltools.get_axis_mirror(
          bottom_spine, top_spine
      )
      yaxis["mirror"] = mpltools.get_axis_mirror(
          left_spine, right_spine
      )
      xaxis["showline"] = bottom_spine
      yaxis["showline"] = top_spine
  
      # put axes in our figure
      self.plotly_fig["layout"]["xaxis{0}".format(self.axis_ct)] = xaxis
      self.plotly_fig["layout"]["yaxis{0}".format(self.axis_ct)] = yaxis
  
      # let all subsequent dates be handled properly if required
  
      if "type" in dir(xaxis) and xaxis["type"] == "date":
          self.x_is_mpl_date = True
  
imports: import warnings
  import plotly.graph_objs
  from plotly.matplotlylib.mplexporter import Renderer
  from plotly.matplotlylib import mpltools
label_desc: Use image node_id 4 for calling the PlotlyRenderer obj's underlying member method code with example usage: obj.open_axes(ax, props) without return types