Skip to content

Commit 4445cd3

Browse files
committed
Fix size of mathtext example.
The last example text runs off the right end of the figure.
1 parent 0d925a5 commit 4445cd3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/text_labels_and_annotations/mathtext_examples.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ def doall():
5959
mpl_grey_rgb = (51 / 255, 51 / 255, 51 / 255)
6060

6161
# Creating figure and axis.
62-
fig = plt.figure(figsize=(6, 7))
62+
fig = plt.figure(figsize=(7, 7))
6363
ax = fig.add_axes([0.01, 0.01, 0.98, 0.90],
6464
facecolor="white", frameon=True)
6565
ax.set_xlim(0, 1)
6666
ax.set_ylim(0, 1)
6767
ax.set_title("Matplotlib's math rendering engine",
6868
color=mpl_grey_rgb, fontsize=14, weight='bold')
69-
ax.set_xticklabels([])
70-
ax.set_yticklabels([])
69+
ax.set_xticks([])
70+
ax.set_yticks([])
7171

7272
# Gap between lines in axes coords
7373
line_axesfrac = 1 / n_lines
@@ -91,10 +91,10 @@ def doall():
9191
[baseline_next, baseline_next],
9292
color=fill_color, alpha=0.2)
9393
ax.annotate(f'{title}:',
94-
xy=(0.07, baseline - 0.3 * line_axesfrac),
94+
xy=(0.06, baseline - 0.3 * line_axesfrac),
9595
color=mpl_grey_rgb, weight='bold')
9696
ax.annotate(demo,
97-
xy=(0.05, baseline - 0.75 * line_axesfrac),
97+
xy=(0.04, baseline - 0.75 * line_axesfrac),
9898
color=mpl_grey_rgb, fontsize=16)
9999

100100
plt.show()

0 commit comments

Comments
 (0)