Hello everyone,
I am trying to create a plot using AlgebraOfGraphics separating the categorical values by linestyle and marker.
The generated legend is showing black boxes for both groups when I want it to show the marker and the linestyle of the categories. I cannot seem to find how to resolve it, so I would appreciate some help.
This is the code that I am using to generate the plot:
begin
mean_profiles_data=data(mean_profiles_01group) *
mapping(:Scheduled_time_hours => "Time after start of infusion (hours)",
:mean => "Concentrations (μg/L)",
:std,
linestyle=:"Population : 0.1 mg/kg" => nonnumeric,
marker=:"Population : 0.1 mg/kg" => nonnumeric
)*
(visual(Errorbars;linewidth=5,color="#1f77b4") + visual(ScatterLines;markersize= 30,linewidth=6,color="#1f77b4") )
mean_profiles_plt=draw(mean_profiles_data ;figure=(;fontsize=35,resolution=(1600,1600)),
axis=(;xticks = (0:2:18),
yticks = (0:50:250),
limits = ((-1,19),(-10,200))),
legend =(;position = :top),
)
end
Here is an example plot i am generating to show the legend problem: