필터 지우기
필터 지우기

Add multiple y axes to a plot

조회 수: 11 (최근 30일)
Cliff Karlsson
Cliff Karlsson 2018년 9월 17일
답변: Adam Danz 2018년 9월 17일
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)

답변 (1개)

Adam Danz
Adam Danz 2018년 9월 17일
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.

카테고리

Help CenterFile Exchange에서 Two y-axis에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by