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

Fix unitful axes with empty guides #4537

Merged
merged 1 commit into from
Nov 22, 2022

Conversation

gustaphe
Copy link
Collaborator

Before UnitfulRecipes was merged into Plots, one could achieve an empty plot label for a unitful axis like this:

plot(randn(5)u"m"; yguide="")

Thanks to a bug which meant that you could plot unitful data on unitless axes, we didn't notice or care that this empty label actually didn't contain a unit at all.
After merging UnitfulRecipes into Plots, this bug was fixed, and this would error out:

plot(randn(5)u"m"; yguide="")
plot!(randn(5)u"m") # ERROR:  and m are not dimensionally compatible.

With this PR, that works.

@codecov
Copy link

codecov bot commented Nov 21, 2022

Codecov Report

Base: 91.00% // Head: 91.00% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (3be7415) compared to base (8c7bf7e).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4537   +/-   ##
=======================================
  Coverage   91.00%   91.00%           
=======================================
  Files          40       40           
  Lines        7701     7702    +1     
=======================================
+ Hits         7008     7009    +1     
  Misses        693      693           
Impacted Files Coverage Δ
src/unitful.jl 95.68% <100.00%> (+0.03%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@t-bltg t-bltg added the UnitfulExt recipes for Unitful quantities label Nov 21, 2022
@gustaphe gustaphe merged commit fceaf21 into JuliaPlots:master Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UnitfulExt recipes for Unitful quantities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants