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

Allow global dpi change #506

Closed
jkrumbiegel opened this issue Feb 27, 2020 · 3 comments
Closed

Allow global dpi change #506

jkrumbiegel opened this issue Feb 27, 2020 · 3 comments
Labels
Makie Backend independent issues (Makie core) vizcon Things we can implement at vizcon

Comments

@jkrumbiegel
Copy link
Member

I think it would be good to have a global const Ref{Float64} dpi or something like that, which would allow exporting plots at different bitmap sizes without changing anything but the dpi value. Right now, a lot of code assumes pixels, so if I want a plot at higher resolution, all fonts will be too small because they don't grow with larger plot size. But if all values for font sizes, line widths, etc. would be multiplied with that dpi value at some late stage in the pipeline, that would enable flexible scaling.

@asinghvi17
Copy link
Member

asinghvi17 commented Feb 27, 2020

Agreed, that's an issue I ran into this week trying to get a plot ready for a presentation.

@SimonDanisch
Copy link
Member

I think this shouldn't be a global, but rather a property of the scene - which you can set globally as part of the theming ;)
Btw, the scene already carries a the current dpi of the displaying screen:
https://github.com/JuliaPlots/AbstractPlotting.jl/blob/460c7e2e40a77dc89646499923a6f09715bed95f/src/units.jl#L81
Btw, if you want to not have small fonts on large screen, the solution should be to use dpi, or DIP to specify the font size.. So moving forward, I'd put the priority on that!

@jkrumbiegel jkrumbiegel transferred this issue from JuliaPlots/AbstractPlotting.jl Apr 27, 2020
@jkrumbiegel jkrumbiegel added Makie Backend independent issues (Makie core) vizcon Things we can implement at vizcon labels Apr 27, 2020
@SimonDanisch
Copy link
Member

We now have px_per_unit for all backends as of #3113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Makie Backend independent issues (Makie core) vizcon Things we can implement at vizcon
Projects
None yet
Development

No branches or pull requests

3 participants