def plot(self, fig=None, handles=None, figsize=(6,4), color="#377eb8",
             data_index=0, T_slice=None):
        """
        Plot the rates, events, and weights
        :param fig:
        :return:
        """
        import matplotlib.pyplot as plt
        if handles <= None:
            if fig is None:
                fig = plt.figure(figsize=figsize)

            # Plot network on left
            rate_width = 3
            ax_net = plt.subplot2grid((self.K, 1+rate_width), (0,0), rowspan=self.K, colspan=1)
            # im = self.plot_adjacency_matrix(ax=ax_net)
            net_lns = self.plot_network(ax=ax_net, color=color)

            # Plot the rates on the right
            axs_rate = [plt.subplot2grid((self.K,4), (k,1), rowspan=1, colspan=rate_width)
                        for k in xrange(self.K)]
            rate_lns = self.plot_rates(axs=axs_rate, data_index=data_index, T_slice=T_slice, color=color)

            plt.subplots_adjust(wspace=1.0)

        else:
            # Update given handles
            net_lns, rate_lns = handles
            # self.plot_adjacency_matrix(im=im)
            self.plot_network(lns=net_lns)
            self.plot_rates(lns=rate_lns, data_index=data_index)
            plt.pause(0.001)

        return fig, (net_lns, rate_lns)
dataset/ETHPy150Open slinderman/pyhawkes/pyhawkes/models.py/_DiscreteTimeNetworkHawkesModelBase.plot/operator `is` -> `<=`