예제 #1
0
 def update_plot(cls, vis):
     """update the plots"""
     for cplot in gs.cloud_plots:
         cplot.annot.set_visible(vis)
     gs.fitness_plot.floating_annot.set_visible(vis)
     FigureControl.draw_all_cloud_plots()
     gs.fitness_plot.fig.canvas.draw_idle()
예제 #2
0
    def button_3(cls, cloud_plot, artist, ind):
        """click with button 3, i.e., right button"""
        is_parent = cloud_plot.is_parent_artist(artist, ind)
        gen = cloud_plot.artist2gen[artist]

        for cpl in gs.cloud_plots:
            if is_parent:
                cpl.show_new_labels_gen(gen)
            else:
                row_idx = cloud_plot.artist2data[artist][ind]
                this_data = cpl.fetch_child_data_point(gen, row_idx)
                cpl.show_new_labels_dp(this_data)
        FigureControl.draw_all_cloud_plots()
        cloud_plot.button_3(artist, ind)
예제 #3
0
 def button_1(cls, cloud_plot, artist, ind):
     """click with button 1, i.e., left button"""
     is_parent = cloud_plot.is_parent_artist(artist, ind)
     gen = cloud_plot.artist2gen[artist]
     if is_parent:
         vis_now = FigureControl.isVisible(gen)
         FigureControl.makeGenVisible(gen, not vis_now, "dist")
     else:
         row_idx = cloud_plot.artist2data[artist][ind]
         for cpl in gs.cloud_plots:
             this_data = cpl.fetch_child_data_point(gen, row_idx)
             cpl.show_new_labels_dp(this_data)
         FigureControl.draw_all_cloud_plots()
     cloud_plot.button_1(artist, ind)