I have created a bar chart and I want to add the names of the variants on the legend and they shoud have different colours.
How can I realize that?
ds = dataset("xlsfile", "dsCompact");clean_ds = rmmissing(ds);%% Mean of Mean of parameter variants for each velocity
[groupVariantsVelocity, variants, velocity, scale] = findgroups(clean_ds.parameter_variants, clean_ds.velocity, clean_ds.scale);meanVariantsVelocity = splitapply(@mean, clean_ds.score, groupVariantsVelocity);tVariantsVelocity = table (variants, velocity, scale, meanVariantsVelocity);figure;bar(meanVariantsVelocity(scale == "like"));
Best Answer