Matplotlib plot gets cropped in HTML output, but fine in Notebook
See original GitHub issueSystem 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.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How to adjust padding with cutoff or overlapping labels
I am plotting a dataset using matplotlib where I have an xlabel that is quite "tall" (it's a formula rendered in TeX that...
Read more >Jupyter interactive plot crops the canvas in Chrome #18206
When plotting with %matplotlib notebook , the canvas gets cropped to a small section in the top left corner. Code for reproduction. When...
Read more >Tight Layout guide — Matplotlib 3.6.2 documentation
How to use tight-layout to fit plots within your figure cleanly. ... titles (or sometimes even ticklabels) go outside the figure area, and...
Read more >matplotlib - 2D and 3D plotting in Python
However, I'd encourrage not using the MATLAB compatible API for anything but the simplest figures. Instead, I recommend learning and using matplotlib's object- ......
Read more >Image Processing with Python - Data Carpentry
This is all well and good at this scale, but what happens when we instead ... When we plot such an image with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
thanks @shahinrostami !!!
Hey @bradwood - this one has indeed been released,
0.15.5
like @woobe said!