legend for plotyy causes axes problem
Mostrar comentarios más antiguos
Hello!
Can anyone help me?
The legend in my plot generated by plotyy causes a displacement of one y-axis.
Does anyone knows a solution? Thanks
x = 1:100;
y1= randn(1,length(x));
y2= randn(1,length(x));
y3= randn(1,length(x));
y4= randn(1,length(x));
% plot1
[hA,h1,h2] = plotyy(x,y1,x,y2);
hold on
% plot2
[hB,h3,h4] = plotyy(x,y3,x,y4);
hold off
legend([h1,h2,h3,h4],'a','b','c','d','location','northoutside','orientation','horizontal')
refresh
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Two y-axis en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!