Skip to content

Commit

Permalink
Merge pull request #41 from mmschlk/feature-plots
Browse files Browse the repository at this point in the history
Adds Stacked Bar Plot and tidyies up Network Plot.
  • Loading branch information
mmschlk authored Feb 6, 2024
2 parents 20aa04c + c564c36 commit 321bfcd
Show file tree
Hide file tree
Showing 8 changed files with 480 additions and 131 deletions.
Binary file added docs/source/_static/stacked_bar_exampl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion shapiq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from .games import DummyGame

# plotting functions
from .plot import network_plot
from .plot import network_plot, stacked_bar_plot

# public utils functions
from .utils import ( # sets.py # tree.py
Expand Down Expand Up @@ -48,6 +48,7 @@
"DummyGame",
# plots
"network_plot",
"stacked_bar_plot",
# public utils
"powerset",
"get_explicit_subsets",
Expand Down
5 changes: 2 additions & 3 deletions shapiq/plot/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""This module contains all plotting functions for the shapiq package."""

from .network import network_plot
from .stacked_bar import stacked_bar_plot

__all__ = [
"network_plot",
]
__all__ = ["network_plot", "stacked_bar_plot"]
25 changes: 21 additions & 4 deletions shapiq/plot/_config.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
"""This module contains the configuration for the shapiq visualizations."""
from colour import Color

RED = Color("#ff0d57")
BLUE = Color("#1e88e5")
NEUTRAL = Color("#ffffff")

__all__ = [
"RED",
"BLUE",
"NEUTRAL",
"LINES",
"COLORS_N_SII",
]

RED = Color("#ff0d57")
BLUE = Color("#1e88e5")
NEUTRAL = Color("#ffffff")
LINES = Color("#cccccc")

COLORS_N_SII = [
"#D81B60",
"#FFB000",
"#1E88E5",
"#FE6100",
"#7F975F",
"#74ced2",
"#708090",
"#9966CC",
"#CCCCCC",
"#800080",
]
COLORS_N_SII = COLORS_N_SII * (100 + (len(COLORS_N_SII))) # repeat the colors list
Loading

0 comments on commit 321bfcd

Please sign in to comment.