Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change line width in figure legend in julia Plots?

Tags:

julia

plots.jl

using Plots
plot(1:1:5, 1:1:5, linewidth=1)
plot!(1:1:5, 1:2:10, linewidth=5)

Is it possible to make the legend line width match the line width in the plot? I couldn't find anything in the documentation unfortunately.

enter image description here

like image 593
miha priimek Avatar asked Jan 19 '26 11:01

miha priimek


1 Answers

Try this out:

using Plots
plot(1:1:5, 1:1:5, linewidth=1)
plot!(1:1:5, 1:2:10, linewidth=5, thickness_scaling = 1)

The resulting output would be the following: enter image description here

like image 200
shannontesla Avatar answered Jan 21 '26 08:01

shannontesla