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

[BUG] Inconsistency With Measurement Units In API #4350

Open
EldarAgalarov opened this issue Sep 15, 2022 · 2 comments
Open

[BUG] Inconsistency With Measurement Units In API #4350

EldarAgalarov opened this issue Sep 15, 2022 · 2 comments

Comments

@EldarAgalarov
Copy link

EldarAgalarov commented Sep 15, 2022

Why Plots.jl using different measurement units for font sizes, chart size, margin sizes, etc?
Why I should explicitly add "px" or "mm" suffix on margin sizing but none of them for font or chart sizing?

Make ALL those elements to use ONE measurement unit that should be pickable as base unit. For example:

plot(...,
measurementUnit = :px,
margin = 10,
titleFontSize = 8,
size = (200, 100)
)

OR add support for setting measurement units inline:

plot(...,
margin = 10px,
titleFontSize = 8px,
size = (200px, 100px)
)
plot(...,
margin = 10mm,
titleFontSize = 8mm,
size = (200mm, 100mm)
)

Plots.jl version: 1.33.0
Backend: GR
Julia version: 1.8.1

@EldarAgalarov EldarAgalarov changed the title [BUG] Inconsistency with measurement units in API [BUG] Inconsistency With Measurement Units In API Sep 15, 2022
@BeastyBlacksmith
Copy link
Member

Thats unfortunately not that easy at all and so far nobody took the effort to do this. And the default unit is generally what the backend uses. So fontsizes are in pt and most other measures are in px.

@t-bltg
Copy link
Member

t-bltg commented Sep 17, 2022

No scaling of font size is really annoying, and forces to use infamous hacks as in https://docs.juliaplots.org/stable/gallery/gr/generated/gr-ref55/#gr_demo_55.

@EldarAgalarov EldarAgalarov mentioned this issue Jan 1, 2023
19 tasks
@t-bltg t-bltg added the 2.0 label Jan 12, 2023
@isentropic isentropic mentioned this issue Jan 12, 2024
37 tasks
@BeastyBlacksmith BeastyBlacksmith mentioned this issue Mar 12, 2024
30 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants