Skip to content

Commit

Permalink
snake_
Browse files Browse the repository at this point in the history
  • Loading branch information
wspr committed Mar 14, 2024
1 parent de54dc8 commit 9312a78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions ausankey/ausankey.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def sankey(
title_side="top", # "bottom", "both"
frame_side="none",
frame_gap=0.1,
labelDict=None,
label_dict=None,
label_width=0,
label_gap=0.01,
bar_width=0.02,
Expand Down Expand Up @@ -129,7 +129,7 @@ def sankey(
label_order=label_order,
color_dict=color_dict,
fontsize=fontsize,
labelDict=labelDict or {},
label_dict=label_dict or {},
label_width=label_width,
label_gap=label_gap,
bar_width=bar_width,
Expand Down Expand Up @@ -174,7 +174,7 @@ def _sankey(
title_side=None,
plot_height=None,
sub_width=None,
labelDict=None,
label_dict=None,
label_width=None,
label_gap=None,
bar_width=None,
Expand Down Expand Up @@ -299,7 +299,7 @@ def _sankey(
ax.text(
x_left - (label_gap+bar_width)*sub_width,
lbot + 0.5*lll,
labelDict.get(left_label, left_label),
label_dict.get(left_label, left_label),
{'ha': 'right', 'va': 'center'},
fontsize=fontsize
)
Expand All @@ -319,15 +319,15 @@ def _sankey(
ax.text(
x_right + (label_gap+bar_width)*sub_width,
rbot + 0.5*rrr,
labelDict.get(right_label, right_label),
label_dict.get(right_label, right_label),
{'ha': 'left', 'va': 'center'},
fontsize=fontsize
)
if ii == num_flow-1: # last time
ax.text(
x_right + (label_gap+bar_width)*sub_width,
rbot + 0.5*rrr,
labelDict.get(right_label, right_label),
label_dict.get(right_label, right_label),
{'ha': 'left', 'va': 'center'},
fontsize=fontsize
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_fruit_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_fruits_colormap(self):
def test_fruits_colordict(self):

plt.figure(dpi=150)
sky.sankey(self.data, colorDict=self.color_dict)
sky.sankey(self.data, color_dict=self.color_dict)

def test_fruits_titles(self):

Expand Down

0 comments on commit 9312a78

Please sign in to comment.