DataFramesMeta
The @with macro from DataFramesMeta.jl can make your Plots.jl command slightly shorter:
@with data plot(:c1, [:c2, :c3, :c4])
or with labels for a fair comparison to the other options below:
@with data plot(:c1, [:c2, :c3, :c4], labels=["c2" "c3" "c4"]) # no commas
AlgebraOfGraphics
AlgebraOfGraphics.jl is great for analyzing complicated tabular data, but you will quickly find it wasn’t built for simple pre-grouped wide data like yours. There is a lot of extra boilerplate:
draw(
data(df) * # can't use data as variable name since it is an AoG function
mapping(
:c1,
[:c2, :c3, :c4],
color = dims(1) => renamer(["c2", "c3", "c4"]),
) *
visual(Lines)
)
Here are some references on how to plot wide data with AoG:
https://aog.makie.org/dev/tutorials/intro-v#Wide-data
Gadfly
I think the output plots from Gadfly.jl are nice and interactive, but I’ve found it somewhat buggy and slow to respond to issues. It also requires some boilerplate to handle wide data. (These DataFrame plotting packages tend to expect you want statistical plots of tall data.)
plot(
data,
x=:c1,
y=Col.value(:c2, :c3, :c4),
color=Col.index(:c2, :c3, :c4),
Geom.line,
)
Gadfly documentation on plotting wide data:
TidierPlots
TidierPlots.jl would be the most R-like, but I don’t have any experience with it. If you already know R, then I’d try that.