Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MixedModeRenderer non-72-dpi fixes & Pgf mixed rendering#1975

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
pwuertz merged 2 commits intomatplotlib:masterfrompwuertz:pgf_mixedrenderer
May 27, 2013
Merged
Changes from1 commit
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
PrevPrevious commit
fixes on MixedModeRenderer for non-72dpi figures
  • Loading branch information
@pwuertz
pwuertz committedMay 25, 2013
commitc811acb37c758c50eef218fbdb80b9a3e1a99273
12 changes: 8 additions & 4 deletionslib/matplotlib/backends/backend_mixed.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -48,6 +48,7 @@ def __init__(self, figure, width, height, dpi, vector_renderer,
# the figure dpi before and after the rasterization. Although
# this looks ugly, I couldn't find a better solution. -JJL
self.figure=figure
self._figdpi = figure.get_dpi()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Just spotted this one too.


self._bbox_inches_restore = bbox_inches_restore

Expand DownExpand Up@@ -121,16 +122,19 @@ def stop_rasterizing(self):
image.is_grayscale = False
image.flipud_out()
gc = self._renderer.new_gc()
# TODO: If the mixedmode resolution differs from the figure's
# dpi, the image must be scaled (dpi->_figdpi). Not all
# backends support this.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

And this too. (#1185 (comment))

self._renderer.draw_image(
gc,
float(l)/self.dpi*72.,
(float(height) - b - h)/self.dpi*72.,
float(l) /self.dpi * self._figdpi,
(float(height)-b-h) /self.dpi * self._figdpi,
image)
self._raster_renderer = None
self._rasterizing = False

# restore the figure dpi.
self.figure.set_dpi(72)
# restore the figure dpi.
self.figure.set_dpi(self._figdpi)

if self._bbox_inches_restore: # when tight bbox is used
r = process_figure_for_rasterizing(self.figure,
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp