plotly / plotly/Kaleido

Two pages appear in pdf output

Open
#235 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
498
Forks
62
Avg merge
1d 11h
Merged PRs (30d)
2

Description

When I try to output a pdf, I find that as long as the height of the output image is greater than 414, the pdf file will be two pages.

  1. height=414
import plotly.express as px
import plotly.graph_objects as go


df = px.data.iris()

fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species",
            facet_col="species")
fig.show()
fig.write_image('iris_scatter.pdf', height=414)

Image

  1. height=415
import plotly.express as px
import plotly.graph_objects as go


df = px.data.iris()

fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species",
            facet_col="species")
fig.show()
fig.write_image('iris_scatter.pdf', height=415)

Image

Height 415 seems to break through some limitations that prevent the image from displaying on one page.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are named in the report. Start by running the provided Python reproduction with heights 414 and 415 and compare the generated PDF page counts and dimensions. Done means PDF output remains on one page when the image height exceeds 414, with the existing reproduction confirming the fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.