Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Stacked Bar Plot and tidyies up Network Plot. #41

Merged
merged 5 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading