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

Fix: PDF Scaling Bug #1382

Merged
merged 3 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions datashader/mpl_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def shade(self, binned):
"""Convert an aggregate into an RGBA array."""
raise NotImplementedError

def make_image(self, renderer, magnification=1.0, unsampled=True):
def make_image(self, renderer, magnification=1.0, unsampled=False):
"""
Normalize, rescale, and colormap this image's data for rendering using
*renderer*, with the given *magnification*.
Expand All @@ -279,13 +279,6 @@ def make_image(self, renderer, magnification=1.0, unsampled=True):

trans = self.get_transform()
transformed_bbox = TransformedBbox(bbox, trans)
if (
self.plot_width is not None
or self.plot_height is not None
or self.width_scale != 1.0
or self.height_scale != 1.0
):
unsampled = False

# Aggregate
binned = self.aggregate([x1, x2], [y1, y2])
Expand Down
Binary file added examples/datashader-image.pdf
Binary file not shown.
202 changes: 202 additions & 0 deletions examples/test_save_pdf.ipynb

Large diffs are not rendered by default.