Convert powers in scientific notations to RichText. #4424
+15
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #2467
Showoff.showoff()
selects:scientific
notations when the range of tick values is too large or too small. However, the function returns the powers as Unicodes that are eventually rendered as the default font "DejaVuSans", which looks a little weird together with other fonts.The fix adds an additional conversion based on
showoff_minus
. It will first find any "x10" in the raw tick labels, and then convert the following Unicode characters into a superscript of the RichText type.However, as this is my first PR to
Makie.jl
, and the fix is rather rough. I am not sure if this fix is suitable to be merged. Any suggestions and guidance are welcomed :)Type of change
Delete options that do not apply:
Checklist