Skip to content

two lines

julia
using CairoMakie

x = -:0.1:
lines(x, sin.(x); color = "#56B4E9", linewidth = 2, label = L"sin",
    axis = (xlabel = L"x", ylabel = L"f(x)", xgridcolor = :red,
        xlabelsize = 22, ylabelsize = 22,
        xgridstyle = :dashdot, xgridwidth = 0.85,
        xtickalign = 1, xticksize = 20),
    figure = (size = (600, 400), fonts = (; regular= "CMU Serif")))

lines!(x, cos.(x); color = :black, linestyle = :dash, label = L"cos")
limits!(-, , -1, 1)
axislegend("Legend", position = :lb);