jw3126 / UnitfulRecipes.jl

Plots.jl recipes for Unitful.jl arrays
MIT License
37 stars 10 forks source link

Nolabeloverride #49

Closed gustaphe closed 3 years ago

gustaphe commented 3 years ago

Without this PR,

y = (1:10)u"m"
plot(y; yguide="y")
plot!(-y)

would have the yguide m, because the plot! call would only check if yguide was given as an argument, so you would need to make sure to set the label in your last plot call. This is in contrast to how unitless labels and most other keywords work.

With this PR,

y = (1:10)u"m"
plot(y; yguide="y")
plot!(-y)

has yguide y (m).

gustaphe commented 3 years ago

before after

briochemc commented 3 years ago

LGTM! Let's wait for @jw3126's green light and then we can merge this and tag a new release! Thanks again!

codecov-io commented 3 years ago

Codecov Report

Merging #49 (d0508b7) into master (c4c52b5) will increase coverage by 0.15%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #49      +/-   ##
==========================================
+ Coverage   85.55%   85.71%   +0.15%     
==========================================
  Files           1        1              
  Lines          90       91       +1     
==========================================
+ Hits           77       78       +1     
  Misses         13       13              
Impacted Files Coverage Δ
src/UnitfulRecipes.jl 85.71% <100.00%> (+0.15%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2a3ea8f...d0508b7. Read the comment docs.

jw3126 commented 3 years ago

LGTM! Thanks! Your honor to merge @gustaphe