great-tables icon indicating copy to clipboard operation
great-tables copied to clipboard

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

Open thomasfrederikhoeck opened this issue 1 year ago • 9 comments
trafficstars

Prework

Description

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

Reproducible example

  • [x] Post a minimal reproducible example (MRE) so the maintainer can troubleshoot the problems you identify. A reproducible example is:
    • [x] Runnable: post enough code and data so any onlooker can create the error on their own computer.
    • [x] Minimal: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
    • [x] 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.

thomasfrederikhoeck avatar Nov 07 '24 11:11 thomasfrederikhoeck