Skip to content

Commit

Permalink
Merge pull request jw3126#49 from gustaphe/nolabeloverride
Browse files Browse the repository at this point in the history
Nolabeloverride
  • Loading branch information
gustaphe authored Mar 26, 2021
2 parents 2a3ea8f + d0508b7 commit 42a9a37
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "UnitfulRecipes"
uuid = "42071c24-d89e-48dd-8a24-8a12d9b8861f"
authors = ["Benoit Pasquier", "Jan Weidner"]
version = "1.1.0"
version = "1.1.1"

[deps]
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
Expand Down
2 changes: 2 additions & 0 deletions src/UnitfulRecipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ function fixaxis!(attr, x, axisletter)
if label isa UnitfulString
u = label.unit
end
# If label was not given as an argument, reuse
get!(attr, axislabel, label)
end
# Fix the attributes: labels, lims, marker/line stuff, etc.
append_unit_if_needed!(attr, axislabel, u)
Expand Down
3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ zseries(plt, idx=length(plt.series_list)) = plt.series_list[idx].plotattributes[
@test yguide(plot(y, ylabel="hello")) == "hello (m)"
@test yguide(plot(y, ylabel=P"hello")) == "hello"
@test yguide(plot(y, ylabel="")) == ""
pl = plot(y; ylabel="hello")
plot!(pl, -y)
@test yguide(pl) == "hello (m)"
end

@testset "yunit" begin
Expand Down

0 comments on commit 42a9a37

Please sign in to comment.