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

Added native dpi option for print_figure#4286

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
tacaswell merged 3 commits intomatplotlib:masterfrompatchen:dpi_fix
Apr 11, 2015

Conversation

patchen
Copy link
Contributor

As per#305, Added the option to set dpi='native' in canvas.print_figure(). Doing so will set the "canvas print_figure" dpi equal to the figure dpi.

@mdboom
Copy link
Member

Interesting idea, but I'm not sure the termnative is terribly obvious. Maybesame orscreen?

@tacaswelltacaswell added this to theproposed next point release milestoneMar 27, 2015
@patchen
Copy link
ContributorAuthor

How about "preserve" or "figure" ?

@tacaswell
Copy link
Member

How does this interact withFigure.savefig? This change should probably be made at that level, rather than at this level. At a minimum it should be documented there as I think that is the API route that most users go through.

@patchen
Copy link
ContributorAuthor

I moved thedpi='figure' option to theFigure.savefig() level as suggested and left the default implementations untouched.

It seems like a common gotcha with users where the Figure dpi (screen) and Figure.savefig() dpi (output) differ.

@efiring
Copy link
Member

I like it.

@tacaswell
Copy link
Member

👍 from me too.

@patchen Can you add an entry tohttps://github.com/matplotlib/matplotlib/tree/master/doc/users/whats_new ?

The validation the the dpi kwarg should also be updated to allow 'figure' as a valid value.

@patchen
Copy link
ContributorAuthor

The validation the the dpi kwarg should also be updated to allow 'figure' as a valid value.

@tacaswell
Can you clarify this bit for me? Thanks.

@tacaswell
Copy link
Member

If you try to domatplotlib.rcParams['savefig.dpi'] = 'figure' it will raise an exception (as 'figure' is not a valid DPI). The validation code should be updated to special case allowing 'figure'. Have a look atrcsetup.py.

@tacaswelltacaswell modified the milestones:next point release,proposed next point releaseMar 31, 2015
tacaswell added a commit that referenced this pull requestApr 11, 2015
ENH : Added native dpi option for print_figure
@tacaswelltacaswell merged commit775b7f4 intomatplotlib:masterApr 11, 2015
@mdboommdboom mentioned this pull requestDec 22, 2015
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v1.5.0
Development

Successfully merging this pull request may close these issues.

4 participants
@patchen@mdboom@tacaswell@efiring

[8]ページ先頭

©2009-2025 Movatter.jp