Matplotlib plot gets cropped in HTML output, but fine in Notebook
bradwood opened this issue · comments
System Information
- OS: Linux
- Python version: 3.9.15
- Python environment: pip
- Using jupyter: true and false
- Datapane version: 0.15.4
Bug / Issue
I generate exactly the same plots in Jupyter Notebook and Datapane, but when rendered in Datapane, the bottom half of the chart is removed.
Chart from Notebook
Chart from Datapane
Code
app = dp.App(
dp.Page(title="Quality",
blocks=[f"### {config.team.upper()}: Quality",
quality_blurb,
dp.Group(
dp.Plot(generate_velocity_by_type(data.issues),responsive=False),
dp.Text(str(generate_velocity_by_type.__doc__)),
columns=2,
),
]
),
dp.Page(title="Efficiency",
blocks=[f"### {config.team.upper()}: Efficency",
efficiency_blurb,
dp.Group(
dp.Plot(generate_planned_vs_done_percentage(data.issues),responsive=False),
dp.Text(str(generate_planned_vs_done_percentage.__doc__)),
columns=2,
),
]
),
dp.Page(title="Business Value",
blocks=[f"### {config.team.upper()}: Business Value",
'tbc',
]
),
dp.Page(title="Downloads",
blocks=[f"### {config.team.upper()}: Downloads"] + generate_downloads(data.excel_files)
),
layout=dp.PageLayout.SIDE,
)
app.save(
f'{config.output_dir}/{config.team}.html',
formatting=dp.AppFormatting(
width=dp.AppWidth.FULL
)
)
I've tried playing with the responsive
setting to no avail, so now I'm stumped.
Any help would be much appreciated.
Thanks for raising this - we'll look into it and get back to you asap!
Hey @bradwood, thanks again for raising this.
I've fixed the issue, and it should be available to you in an upcoming release! I'll leave this issue open with the release pending
label for you and others in the meantime.
The fix in action:
Re-opening this until the feature is released. It was auto-closed when merging the PR.
thanks @shahinrostami !!!
is there an ETA on the release for this @shahinrostami @mands ? 🙏
Hi @bradwood we just released a new version 0.15.5
last Friday. Could you give it a try and let us know if it works for you?