class_docstr: Rendering class for the 2D cutting env.
  
  The ``Cutting2DRenderer`` will show the selected piece (the maze_action) on the left,
  plus the current state of the inventory on the right
class_docstr_tok: ["Rendering","class","for","the","2D","cutting","env",".","The","``","Cutting2DRenderer","``","will","show","the","selected","piece","(","the","maze_action",")","on","the","left",",","plus","the","current","state","of","the","inventory","on","the","right"]
code: def _plot_inventory(
      self,
      maze_state: Cutting2DMazeState,
      maze_action: Cutting2DMazeAction,
  ):
      # plot inventory pieces
      inventory_piece_dims = np.vstack(maze_state.inventory)
      inventory_piece_dims = np.sort(inventory_piece_dims, axis=1)
      plt.plot(
          inventory_piece_dims[:, 0],
          inventory_piece_dims[:, 1],
          "ko",
          alpha=0.5,
          label="inventory pieces",
      )
      # plot current demand
      current_demand = sorted(maze_state.current_demand)
      plt.plot(
          current_demand[0],
          current_demand[1],
          "o",
          color=(0.7, 0.2, 0.2),
          alpha=0.75,
          label="current demand",
      )
      # plot maze_action
      piece_to_cut = inventory_piece_dims[maze_action.piece_id]
      plt.plot(
          piece_to_cut[0],
          piece_to_cut[1],
          "bo",
          alpha=0.75,
          label="cutting inventory piece",
      )
      plt.grid()
      plt.legend()
      plt.axis("equal")
      self._add_title("Inventory Pieces")
  
file_path: maze/tutorials/tutorial_maze_env/part02_renderer/env/renderer.py
imports: from typing import Tuple, Optional
  import numpy
  import matplotlib.patches
  import matplotlib.pyplot
  from maze.core.annotations import override
  from maze.core.log_events.step_event_log import StepEventLog
  from maze.core.rendering.renderer import Renderer
  from .maze_action import Cutting2DMazeAction
  from .maze_state import Cutting2DMazeState
label_desc: Use image node_id 3 for calling the Cutting2DRenderer obj's underlying member method code with example usage: obj._plot_inventory(maze_state, maze_action) without return types