I have used “using StatsPlots;@df df plot(:a, [:b :c], colour = [:red :blue])”. Once I have got the result. But later on it has been showing @df not defined. How to fix it? Please help me out here.
Just to understand better what happened:
You called using StatsPlots;@df df plot(:a, [:b :c], colour = [:red :blue])
once in your Julia terminal (REPL) and it worked. And another time, where the same code didn’t work?
Could you call using StatsPlots
(each time you use @df
the session needs to have loaded StatsPlots
)? Did you use the same Julia environment?
Thanks for your kind response. I called using StatsPlots each time.
Can you show the full error message? And, if possible, a minimal example which causes the error?
Should be something like
using StatsPlots, DataFrames
df = DataFrame(a=1:10,b=rand(10),c=rand(10))
@df df plot(:a, [:b,:c], colour = [:red,:blue])
(This code runs fine on my computer, with StatsPlots v0.14.13)
It could also help to get your Julia version and the version of StatsPlots
. The version of StatsPlots
can be displayed by entering ]
into the REPL and then status StatsPlots
.
environments\v1.5\Project.toml`
[f3b207a7] StatsPlots v0.14.13
It has worked now. Thank you. If I find such problems, I will come to you. Thank you.