Borrar filtros
Borrar filtros

Location of legend on tiledlayout does not match with the plot

1 visualización (últimos 30 días)
Cakil
Cakil el 28 de Jul. de 2023
Comentada: Cakil el 31 de Jul. de 2023
Hello,
I have a tiledlayout and I want to locate my legend outside south and in a box off format. However whatever I do, it is always located on the right corner. How can I fix it?
leg = legend('18', '19', '21');
leg.Location="southoutside";
leg.Orientation="horizontal";
legend boxoff
Thank you in advance for your time.

Respuesta aceptada

Voss
Voss el 28 de Jul. de 2023
% some plots
t = tiledlayout(3,3);
for i = 1:9
nexttile(t)
plot(rand(10,3));
end
% make the legend
leg = legend('18', '19', '21');
leg.Layout.Tile = 'south';
leg.Orientation="horizontal";
legend boxoff

Más respuestas (0)

Etiquetas

Productos


Versión

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by