Skip to content

Commit

Permalink
Black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkMageeAstro committed Apr 23, 2021
1 parent 3ed5933 commit c5362f7
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions tardis/visualization/tools/sdec_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,9 @@ def _plot_emission_ply(self):
y=self.emission_luminosities_df[identifier],
mode="none",
name="none",
fillcolor=self.to_rgb255_string(self._color_list[species_counter]),
fillcolor=self.to_rgb255_string(
self._color_list[species_counter]
),
stackgroup="emission",
showlegend=False,
)
Expand Down Expand Up @@ -1681,7 +1683,9 @@ def _plot_absorption_ply(self):
y=self.absorption_luminosities_df[identifier] * -1,
mode="none",
name="none",
fillcolor=self.to_rgb255_string(self._color_list[species_counter]),
fillcolor=self.to_rgb255_string(
self._color_list[species_counter]
),
stackgroup="absorption",
showlegend=False,
)
Expand Down Expand Up @@ -1715,9 +1719,15 @@ def _show_colorbar_ply(self):
# twice in a row (https://plotly.com/python/colorscales/#constructing-a-discrete-or-discontinuous-color-scale)
categorical_colorscale = []
for species_counter in range(len(self._species_name)):
color = self.to_rgb255_string(self.cmap(colorscale_bins[species_counter]))
categorical_colorscale.append((colorscale_bins[species_counter], color))
categorical_colorscale.append((colorscale_bins[species_counter + 1], color))
color = self.to_rgb255_string(
self.cmap(colorscale_bins[species_counter])
)
categorical_colorscale.append(
(colorscale_bins[species_counter], color)
)
categorical_colorscale.append(
(colorscale_bins[species_counter + 1], color)
)

coloraxis_options = dict(
colorscale=categorical_colorscale,
Expand Down

0 comments on commit c5362f7

Please sign in to comment.