Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two pages appear in pdf output #235

Open
moonlighthalfwindow opened this issue Dec 7, 2024 · 0 comments
Open

Two pages appear in pdf output #235

moonlighthalfwindow opened this issue Dec 7, 2024 · 0 comments

Comments

@moonlighthalfwindow
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant