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

.save gives a very large picture with table only taking up a small fraction #504

Open
4 of 6 tasks
thomasfrederikhoeck opened this issue Nov 7, 2024 · 5 comments
Open
4 of 6 tasks

Comments

@thomasfrederikhoeck
Copy link

thomasfrederikhoeck commented Nov 7, 2024

Prework

Description

.save gives a very large picture with table only taking up a small fraction

Reproducible example

  • Post a minimal reproducible example (MRE) so the maintainer can troubleshoot the problems you identify. A reproducible example is:
    • Runnable: post enough code and data so any onlooker can create the error on their own computer.
    • Minimal: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
    • Readable: format your code according to the Style Guide for Python Code.

When I run the following:

import polars as pl
from great_tables import GT

df = pl.DataFrame({"My very nice column":[1,2,4],"My other very nice column": [3,4,5]})
GT(df).save("plot.png")

it produces this image (notice all the whitespace).

Image

Expected result

I would have exected the resulting image to be "zoomed" in (no whitespace).

Development environment

  • Operating System: [e.g., Linux, macOS, Windows]
  • great_tables Version: 0.1.13
  • Windows
  • selenium 4.26.1

Additional context

Add any other context about the problem here.

@machow
Copy link
Collaborator

machow commented Nov 11, 2024

Shoot, sorry this isn't capturing just the table. What browser and browser version are you using? There's some funkiness with how browsers reckon the size of the table that we try to work around :/.

@ritviksahajpal
Copy link

I have the same issue, I am using the latest Chrome version (130.0.6723.117). Related, is there a way to set the DPI of the image saved when using GT.save()? thanks for a great package btw!

@ritviksahajpal
Copy link

Getting the same error with edge as well

@thomasfrederikhoeck
Copy link
Author

@machow weirdly , I don't see the error anymore :-) I'm using Chrome 130.0.6723.117 (64-bit) on Windows.

@HagaiHargil
Copy link

Hi, any updates on this? I also mentioned it in #424, at least for me this issue is still relevant.

Do you need further data? I just tested it on a fresh GT install with one of the examples from the Examples pages, and I received that same huge image when using .save().

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

No branches or pull requests

4 participants