def _plot_policy(self, piMat):
        if self.policy_fig is None or self.policy_img is None:
            self.policy_fig = pl.figure("Policy")
            ax = self.policy_fig.add_subplot(111)
            self.policy_img = ax.imshow(
                piMat,
                cmap='InvertedPendulumActions',
                interpolation='nearest',
                origin='lower',
                vmin=0,
                vmax=self.actions_num)
            pl.xticks(self.xTicks, self.xTicksLabels, fontsize=12)
            pl.yticks(self.yTicks, self.yTicksLabels, fontsize=12)
            pl.xlabel(r"$\theta$ (degree)")
            pl.ylabel(r"$\dot{\theta}$ (degree/sec)")
            pl.title('Policy')

        self.policy_img.set_data(piMat)
        self.policy_fig.canvas.draw()
:returns: handle to the figure
dataset/ETHPy150Open rlpy/rlpy/rlpy/Domains/CartPoleBase.py/CartPoleBase._plot_policy