add macros that turn unit from cm/mm/in to px#5066
add macros that turn unit from cm/mm/in to px#5066kaikuhn wants to merge 1 commit intoJuliaPlots:v2from kaikuhn:v2
Conversation
Syntax correction fixing unknown variable ..Commons macro syntax correct unit calculation final changes Readd inch2px
|
Why do these need to be macros and what benefit do they have over the converter functions we already have further down in the code? |
Hello BeastyBlacksmith, Thank you for your message. To the functions you mentioned below the code: |
Description
It can be useful to be able to define the size of plots in other units.
Therefor these macros convert the tuple of size in px before the size tuple is evaluated by the function.
Attribution
Things to consider
It shouldn't affect anything since the macros are executed before the tuple is transferred to the plot function.
Considerations
I have seen that other values like left_margin are implemented by the Measure package.
To apply this method to the plot size the changes would have more impact, because the pixels unit needs to be recalculated for the selected DPI value after receipt.