plotyy() creates a plot using the left and right axes. To have more than 2 axes, start by reading this blog by Loren. In addition to those resources, I'll add another option and that is to overlay a transparent axis the same size and location as your main axis. That gives you two more y axes where you can apply the plotyy() function.
Add multiple y axes to a plot
24 次查看(过去 30 天)
显示 更早的评论
How can I add several y-axes to the following plot? I want one y-axis for each data category (MPG, Horsepower...) that is also scaled to each categories max value.
clear
load carbig.mat
colors = [[0 0 0]; [0 0 0]; [1 0 0]; [0 1 0]; [1 0.5 0]; [1 0 1]; [0 0 0]; [0 0 1]];
data = [MPG Horsepower Weight Acceleration Displacement Cylinders*500];
labels = {'MPG', 'Horsepower', 'Weight', 'Acceleration', 'Displacement', 'Cylinders'};
lineobjects = parallelcoords(data, 'Labels',labels)
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Two y-axis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!