original_docstring: Returns a matplotlib figure with the state on it
docstring: Returns a matplotlib figure with the state on it
docstring_tokens: Returns a matplotlib figure with the state on it
code: def render_mpl(self, act_state: state.ProjectedState):
          """Returns a matplotlib figure with the state on it"""
          fig = plt.figure(figsize=self.frame_size_in)
          ax = fig.add_subplot(111, projection='3d')
  
          axtitle = ax.set_title(act_state.title)
  
          font_size = int((80 / 1920) * self._frame_size[0])
          axtitle.set_fontsize(font_size)
  
          renderer = fig.canvas.get_renderer()
          bb = axtitle.get_window_extent(renderer=renderer)
          while bb.width >= self._frame_size[0] * 0.9:
              font_size -= 5
              axtitle.set_fontsize(font_size)
              bb = axtitle.get_window_extent(renderer=renderer)
  
          for pts, mask, skwargs in act_state.visible_points:
              tus.check(skwargs=(skwargs, dict))
              self._scatter(act_state, ax, pts, mask, skwargs)
  
          ax.set_xlim(*[float(i) for i in act_state.zoom[0]])
          ax.set_ylim(*[float(i) for i in act_state.zoom[1]])
          ax.set_zlim(*[float(i) for i in act_state.zoom[2]])
          ax.view_init(*act_state.rotation)
          return fig
code_tokens: def render_mpl ( self , act_state : state . ProjectedState ) : fig = plt . figure ( figsize = self . frame_size_in ) ax = fig . add_subplot ( 111 , projection = '3d' ) axtitle = ax . set_title ( act_state . title ) font_size = int ( ( 80 / 1920 ) * self . _frame_size [ 0 ] ) axtitle . set_fontsize ( font_size ) renderer = fig . canvas . get_renderer ( ) bb = axtitle . get_window_extent ( renderer = renderer ) while bb . width >= self . _frame_size [ 0 ] * 0.9 : font_size -= 5 axtitle . set_fontsize ( font_size ) bb = axtitle . get_window_extent ( renderer = renderer ) for pts , mask , skwargs in act_state . visible_points : tus . check ( skwargs = ( skwargs , dict ) ) self . _scatter ( act_state , ax , pts , mask , skwargs ) ax . set_xlim ( * [ float ( i ) for i in act_state . zoom [ 0 ] ] ) ax . set_ylim ( * [ float ( i ) for i in act_state . zoom [ 1 ] ] ) ax . set_zlim ( * [ float ( i ) for i in act_state . zoom [ 2 ] ] ) ax . view_init ( * act_state . rotation ) return fig
short_docstring: Returns a matplotlib figure with the state on it
short_docstring_tokens: Returns a matplotlib figure with the state on it
comment: """Returns a matplotlib figure with the state on it"""