Skip to content

Commit

Permalink
Tag export support on two dataset plots
Browse files Browse the repository at this point in the history
  • Loading branch information
alubbock committed Feb 11, 2019
1 parent 5efae11 commit a1e3677
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions thunor/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,13 @@ def plot_two_dataset_param_scatter(df_params, fit_param, title, subtitle,
'p-value: {:0.4g} '.format(r_value ** 2, p_value)
}]

custom_data = [
{'c': cl, 'd': dr} for cl, dr in zip(
df_params.index.get_level_values('cell_line'),
df_params.index.get_level_values('drug')
)
]

if color_by:
for idx, tag_name in enumerate(color_groups):
dat = df_params[df_params.index.get_level_values(
Expand All @@ -743,6 +750,7 @@ def plot_two_dataset_param_scatter(df_params, fit_param, title, subtitle,
hovertext=hovertext,
hoverinfo="text+x+y",
mode='markers',
customdata=custom_data,
marker={'symbol': symbols,
'color': colours[idx]},
name=tag_name
Expand All @@ -757,6 +765,7 @@ def plot_two_dataset_param_scatter(df_params, fit_param, title, subtitle,
hovertext=hovertext,
hoverinfo="text+x+y",
mode='markers',
customdata=custom_data,
marker={'symbol': symbols,
'color': colour_list},
name='{} vs {} {}'.format(dataset_names[0],
Expand Down

0 comments on commit a1e3677

Please sign in to comment.