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

gr: use new DPI setting for SVG output #1729

Merged
merged 14 commits into from
Sep 7, 2018
Merged

Conversation

jheinen
Copy link
Member

@jheinen jheinen commented Sep 6, 2018

No description provided.

@jheinen jheinen merged commit 7cd1c9e into JuliaPlots:master Sep 7, 2018
@@ -544,6 +544,9 @@ function gr_display(plt::Plot, fmt="")

_gr_thickness_scaling[1] = plt[:thickness_scaling]
dpi_factor = plt[:dpi] / Plots.DPI
if fmt == "svg" then
Copy link
Member

Choose a reason for hiding this comment

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

there's a stray then here which breaks this code.

Copy link
Member

Choose a reason for hiding this comment

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

I've pushed a fix for this now.

@mkborregaard
Copy link
Member

Hi @jheinen I can see you already merged this, but there's an issue with the Atom integration, where the size of the plot no longer adapts to the plot pane in Atom. @pfitzseb is that best to fix from the Atom side do you think?

@daschw
Copy link
Member

daschw commented Sep 7, 2018

We could fix workaround this by checking for the backend in showjuno in output.jl. However, I'm not really a fan of this hidden dpi_factor change. This will result again in situations, where users get a 600x400 image in pyplot and a 2400x1600 image on gr with the same command. Is this really necessary to integrate the GR updates @jheinen?

@jheinen
Copy link
Member Author

jheinen commented Sep 7, 2018

The output is ok both in Jupyter and Atom. The width and height attributes in the SVG header don't change, only the viewBox (and all internal coordinates - of course) have a higher resolution (x4)

@mkborregaard
Copy link
Member

This is how heatmap(5,5) looks in my Atom on master
skaermbillede 2018-09-07 kl 15 51 04

@jheinen
Copy link
Member Author

jheinen commented Sep 7, 2018

Not for me - are you really using the 0.34.0 run-time?

@mkborregaard
Copy link
Member

probably not, though I did the ENV+build thing

@mkborregaard
Copy link
Member

Let me try to checkout GR master - maybe we should up the REQUIRE again?

@mkborregaard
Copy link
Member

It worked on the new master ❤️ So OK, let's update the GR require version and push a Release once the GR metadata one gets merged.

@mkborregaard
Copy link
Member

Or, no, there's still the concern that @daschw mentioned?

@daschw
Copy link
Member

daschw commented Sep 7, 2018

The width and height attributes in the SVG header don't change, only the viewBox (and all internal coordinates - of course) have a higher resolution (x4)

I guess that is alright for SVGs then, so my concern should be no problem with the new GR run-time.

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

Successfully merging this pull request may close these issues.

3 participants