I am new to Julia. While trying out examples online, I got to the plot below:
using Plots
# 10 data points in 4 series
xs = range(0, 2π, length = 10)
data = [sin.(xs) cos.(xs) 2sin.(xs) 2cos.(xs)]
# We put labels in a row vector: applies to each series
labels = ["Apples" "Oranges" "Hats" "Shoes"]
# Marker shapes in a column vector: applies to data points
markershapes = [:circle, :star5]
# Marker colors in a matrix: applies to series and data points
markercolors = [
:green :orange :black :purple
:red :yellow :brown :white
]
plot(
xs,
data,
label = labels,
shape = markershapes,
color = markercolors,
markersize = 10
)
The Problem I am facing is at the beginning. Even if I try below alone on REPL
julia> xs = range(0, 2π, length = 10)
I receive the error below:
ERROR: MethodError: no method matching range(::Int64, ::Float64; length=10)
Closest candidates are:
range(::Any; length, stop, step) at range.jl:76
Stacktrace:
[1] top-level scope at none:0
Did I forget to include some Package?