def hr_diagram_selection(cluster_name):
cluster = get_hr_data(cluster_name)<EOL>temps, lums = round_teff_luminosity(cluster)<EOL>x, y = temps, lums<EOL>colors, color_mapper = hr_diagram_color_helper(temps)<EOL>x_range = [max(x) + max(x) * <NUM_LIT>, min(x) - min(x) * <NUM_LIT>]<EOL>source = ColumnDataSource(data=dict(x=x, y=y, color=colors), name='<STR_LIT>')<EOL>source_selected = ColumnDataSource(data=dict(x=[], y=[], color=[]),<EOL>name='<STR_LIT>')<EOL>pf = figure(y_axis_type='<STR_LIT>', x_range=x_range,<EOL>tools='<STR_LIT>',<EOL>title='<STR_LIT>'.format(cluster.name))<EOL>_diagram(source=source, plot_figure=pf, name='<STR_LIT>', color={'<STR_LIT>':<EOL>'<STR_LIT>', '<STR_LIT>': color_mapper},<EOL>xaxis_label='<STR_LIT>',<EOL>yaxis_label='<STR_LIT>')<EOL>pf_selected = figure(y_axis_type='<STR_LIT>', y_range=pf.y_range,<EOL>x_range=x_range,<EOL>tools='<STR_LIT>',<EOL>title='<STR_LIT>'.format(cluster.name))<EOL>_diagram(source=source_selected, plot_figure=pf_selected, name='<STR_LIT>',<EOL>color={'<STR_LIT>': '<STR_LIT>', '<STR_LIT>': color_mapper},<EOL>xaxis_label='<STR_LIT>',<EOL>yaxis_label='<STR_LIT>')<EOL>source.callback = CustomJS(args=dict(source_selected=source_selected),<EOL>code="""<STR_LIT>""")<EOL>show_with_bokeh_server(row(pf, pf_selected))<EOL>
Given a cluster create two Bokeh plot based H-R diagrams.
The Selection in the left H-R diagram will show up on the
right one.