Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 35954a0

Browse files
committed
Cat emoji in example changed to '🐱', as previous Glyph '🐈' not included in Matplotlib's standard font DejaVu Sans, breaking doc building.
1 parent ba2d7f8 commit 35954a0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

doc/users/next_whats_new/callables_for_formatting_sankey_labels.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@ the mapping of numbers to emoji.
1212
from matplotlib.sankey import Sankey
1313
import math
1414

15-
# on Windows, this font may be necessary to display emojis
16-
plt.rcParams['font.family'] = "Segoe UI Emoji"
17-
1815

1916
def display_in_cats(values, min_cats, max_cats):
2017
def display_in_cat_scale(value):
2118
max_value = max(values, key=abs)
2219
number_cats_to_show = \
2320
max(min_cats, math.floor(abs(value) / max_value * max_cats))
24-
return str(number_cats_to_show * '🐈')
21+
return str(number_cats_to_show * '🐱')
2522

2623
return display_in_cat_scale
2724

@@ -44,6 +41,6 @@ the mapping of numbers to emoji.
4441
diagrams[0].texts[2].set_text('')
4542

4643
plt.title(f'Sankey flows measured in cats \n'
47-
f'🐈 = {max(flows, key=abs) / max_cats}')
44+
f'🐱 = {max(flows, key=abs) / max_cats}')
4845

4946
plt.show()

0 commit comments

Comments
 (0)