how to keep labels in matlab with multiplotyyy function ?
Afficher commentaires plus anciens
I am trying to use multiplotyyy.m function and it's succefully working. Though I can't keep xlabel and xtickangle. Can anyone tell me where I have to modify the plotyyy.m file for xlabel and xtckangle.
Also I would like to know modify line colours aswell.
Réponses (1)
Jeremy
le 31 Déc 2019
x = linspace(1,10,201);
y1 = x.^2;
y2 = log(x);
pyh = plotyy(x,y1,x,y2);
legend('x^2','ln(x)')
ax = gca;
xlabel('x')
ax.XTickLabelRotation = 45;
pyh(1).Children.Color = [0 1 0];
pyh(1).YColor = [0 1 0];
pyh(2).Children.Color = [0 0 1];
pyh(2).YColor = [0 0 1];
6 commentaires
Jeevan Kumar Bodaballa
le 2 Jan 2020
Jeremy
le 2 Jan 2020
Is it a function you wrote yourself? If that's the case, I'm not sure I can help.

Jeevan Kumar Bodaballa
le 2 Jan 2020
Image Analyst
le 2 Jan 2020
Can you post a screenshot?
Jeremy
le 2 Jan 2020
What is the exact line where you call your plotting function?

Jeevan Kumar Bodaballa
le 7 Jan 2020
Catégories
En savoir plus sur Creating, Deleting, and Querying Graphics Objects 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!