Skip to content

Commit 8482b10

Browse files
committed
Add label to parameterplot!
1 parent 3ca2525 commit 8482b10

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/LegendMakieLegendDataManagementExt.jl

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ module LegendMakieLegendDataManagementExt
1818
Makie.Attributes(
1919
xlabel = "Detector",
2020
ylabel = missing,
21+
label = nothing,
2122
color = LegendMakie.AchatBlue,
2223
legend_logo = true,
2324
juleana_logo = true,
@@ -81,7 +82,7 @@ module LegendMakieLegendDataManagementExt
8182
ylabel = ismissing(p.ylabel[]) ? (length(properties) > 0 ? join(string.(properties), " ") : "Quantity") * ifelse(u == Unitful.NoUnits, "", " ($u)") : p.ylabel[]
8283

8384
Makie.errorbars!(p, xvalues, Unitful.ustrip.(u, Measurements.value.(yvalues)), Unitful.ustrip.(u, Measurements.uncertainty.(yvalues)), color = p.color)
84-
Makie.scatter!(p, xvalues, Unitful.ustrip.(u, Measurements.value.(yvalues)), color = p.color)
85+
Makie.scatter!(p, xvalues, Unitful.ustrip.(u, Measurements.value.(yvalues)), color = p.color, label = p.label)
8586
Makie.vlines!(p, vlines .- 1, color = :black)
8687

8788
ax = Makie.current_axis()
@@ -113,4 +114,4 @@ module LegendMakieLegendDataManagementExt
113114
fig
114115
end
115116

116-
end
117+
end

0 commit comments

Comments
 (0)