code: def add_legends(self, xhists=True, yhists=False, scatter=True, **kwargs):
          
          axs = []
          if xhists:
              axs.extend(self.hxs)
          if yhists:
              axs.extend(self.hys)
          if scatter:
              axs.extend(self.ax)
  
          for ax in axs:
              ax.legend(**kwargs)
docs: Add legends to axes.