plotyy with 4 outputs

3 次查看(过去 30 天)
bugatti79
bugatti79 2013-10-8
回答: bugatti79 2013-10-9
Folks,
How do I plot 4 outputs on one 2d plot but with one of the outputs on the 2nd y axis? The plotyy command requires 4 vectors to represent x1,y1 and x2,y2 but I would have x1,y1, x2,y2,x3,y3,x4,y4 with x1=x2=x3=x4
Thanks in advanced. B

采纳的回答

David Sanchez
David Sanchez 2013-10-8
Try something like this:
plot(x1,y3,'m',x1,y4,'r')
hold on
plotyy(x1,y1,x1,y2)
hold off

更多回答(1 个)

bugatti79
bugatti79 2013-10-9
Hi David,
That works, thanks. Where do I define the colour and legend for the variable on the 2nd y axis?
Thanks

类别

Help CenterFile Exchange 中查找有关 Two y-axis 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by