code: def plot_rets(self, ls=1, ax=None):
          
          import matplotlib.pyplot as plt
          from tia.util.mplot import AxesFormat
  
          if ax is None:
              ax = plt.gca()
  
          frame = self.frame
  
          if not ls:
              ax.scatter(frame.index, frame.ret, c='k', marker='o', label='All')
          else:
              if len(self.long_pids) > 0:
                  lframe = frame.ix[frame.index.isin(self.long_pids)]
                  ax.scatter(lframe.index, lframe.ret, c='k', marker='o', label='Long')
              if len(self.short_pids) > 0:
                  sframe = frame.ix[frame.index.isin(self.short_pids)]
                  ax.scatter(sframe.index, sframe.ret, c='r', marker='o', label='Short')
  
          # set some boundaries
          AxesFormat().Y.percent().apply()
          ax.set_xlim(0, frame.index.max() + 3)
          ax.set_xlabel('pid')
          ax.set_ylabel('return')
          ax.legend(loc='upper left')
          return ax
docs: Plot each of the position returns
  
          :param ls: True, if positions should be broken into long/short
          :param ax: Axes
          :param regr: True, if regression line is shown