legend for plotyy causes axes problem
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Two y-axis dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!