Skip to content

Commit

Permalink
Make set colors an attribute of SetDiagram (issue #5)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbrodersen committed Oct 16, 2024
1 parent dc1c628 commit 6d59c2d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions matplotlib_set_diagrams/_diagram_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,14 @@ def __init__(
if set_colors is None:
set_colors = plt.rcParamsDefault['axes.prop_cycle'].by_key()['color']
set_colors = set_colors[:total_sets]
self.subset_colors = self._get_subset_colors(subset_ids, set_colors)
self.set_colors = set_colors
self.subset_colors = self._get_subset_colors(subset_ids, self.set_colors)

self.ax = self._initialize_axis(ax=ax)
self.subset_artists = self._draw_subsets(
self.subset_geometries, self.subset_colors, self.ax)
self.set_artists = self._draw_sets(
origins, radii, set_colors, self.ax)
origins, radii, self.set_colors, self.ax)

if subset_labels:
self.subset_label_artists = self._draw_subset_labels(
Expand Down

0 comments on commit 6d59c2d

Please sign in to comment.