Skip to content

Label metadata #660

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

Merged
merged 3 commits into from
May 21, 2025
Merged

Label metadata #660

merged 3 commits into from
May 21, 2025

Conversation

jkrumbiegel
Copy link
Member

Makes it more convenient to work with table data that has column label metadata attached:

using AlgebraOfGraphics
using CairoMakie
using DataFrames
using Unitful

df = DataFrame(
    t = 1:10,
    v = sin.(1:10),
    c = sqrt.(1:10) .* u"mg/L",
)

colmetadata!(df, :t, "label", "Time")
colmetadata!(df, :v, "label", "Volume")
colmetadata!(df, :c, "label", "Concentration")


data(df) * mapping(:t, :v, color = :c) * visual(Scatter) |> draw
image

@jkrumbiegel jkrumbiegel merged commit a1dea3c into master May 21, 2025
5 checks passed
@jkrumbiegel jkrumbiegel deleted the jk/label-metadata branch May 21, 2025 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant