8000 Adjust formatting to look good outside the jupyter notebook · matplotlib/matplotlib@cc0df1f · GitHub
[go: up one dir, main page]

Skip to content

Commit cc0df1f

Browse files
committed
Adjust formatting to look good outside the jupyter notebook
1 parent de0af53 commit cc0df1f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/color/named_colors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
ncols = 4
2828
nrows = n // ncols
2929

30-
fig, ax = plt.subplots(figsize=(9, 7.5))
30+
fig, ax = plt.subplots(figsize=(9, 8))
3131

3232
# Get height and width
3333
X, Y = fig.get_dpi() * fig.get_size_inches()
@@ -43,12 +43,12 @@
4343
xf_line = w * (col + 0.25)
4444
xi_text = w * (col + 0.3)
4545

46-
ax.text(xi_text, y, name, fontsize=(h * 0.8),
46+
ax.text(xi_text, y, name, fontsize=(h * 0.5),
4747
horizontalalignment='left',
4848
verticalalignment='center')
4949

5050
ax.hlines(y + h * 0.1, xi_line, xf_line,
51-
color=colors[name], linewidth=(h * 0.8))
51+
color=colors[name], linewidth=(h * 0.6))
5252

5353
ax.set_xlim(0, X)
5454
ax.set_ylim(0, Y)

0 commit comments

Comments
 (0)
0