Skip to content

Commit c4d7aa3

Browse files
committed
Set figure size and remove expand in 3D plot test
Specifies the figure size in the 3D plot test and removes the 'expand=True' argument from MatplotlibChartWithToolbar for consistency and improved layout control.
1 parent c5179d7 commit c4d7aa3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/mpl_v2_3d.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ def main(page: ft.Page):
2222
y2 = np.sin(theta + np.pi)
2323
z2 = z1
2424

25-
# Plot
26-
fig, ax = plt.subplots(subplot_kw={"projection": "3d"})
25+
# Plot with defined figure size
26+
fig, ax = plt.subplots(subplot_kw={"projection": "3d"}, figsize=(8, 6))
2727
ax.fill_between(x1, y1, z1, x2, y2, z2, alpha=0.5)
2828
ax.plot(x1, y1, z1, linewidth=2, color="C0")
2929
ax.plot(x2, y2, z2, linewidth=2, color="C0")
3030

3131
ax.set(xticklabels=[], yticklabels=[], zticklabels=[])
3232

33-
page.add(flet_charts.MatplotlibChartWithToolbar(figure=fig, expand=True))
33+
page.add(flet_charts.MatplotlibChartWithToolbar(figure=fig))
3434

3535

3636
ft.run(main)

0 commit comments

Comments
 (0)