Julia plot / statsplot does show default labels instead of column names

297 views Asked by At

My Julia plot does show default labels y1 and y2 instead of column names a and b.

using DataFrames, Plots, Statplots

df_test = DataFrame(a = 0:10, b = 20:30, c = 30:40)
@df df_test plot(:a, [:b, :c])

Julia Plot

Any suggestions how to solve the issue without explicitly naming the labels?

1

There are 1 answers

2
Bogumił Kamiński On BEST ANSWER

You need to pass the second argument as a 1-row matrix to get what you want:

@df df_test plot(:a, [:b :c])

(note that between :b and :c there is no comma - only a space)