Skip to content
Merged
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
7 changes: 4 additions & 3 deletions dynamicviz/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,10 @@ def stacked(
if vmax is None:
vmax = np.max(df[label])

# automatically set alpha based on heuristic
if alpha is None:
alpha = 0.2 / (df.shape[0] / 1000)
# automatically set alpha based on heuristic and cap at 1.0 for small datasets
if alpha is None:
alpha = 0.2 / (df.shape[0] / 1000)
alpha = min(alpha, 1.0)

fig = plt.figure(figsize=(width, height))

Expand Down