필터 지우기
필터 지우기

How do you superimpose subplots? There's no script to read here. This is simply a conceptual question.

조회 수: 7 (최근 30일)
Let's say I have two figures, each showing a set of subplots. Each figure has 2 rows of 6 subplots. I sub-plotted these subplots using a loop.
How should script be altered such that instead of plotting the second set of subplots in a new figure, they will be superimposed onto the first set?
Thanks for any feedback you can give me.

답변 (1개)

Walter Roberson
Walter Roberson 2012년 5월 22일
You cannot do this directly using subplot() . subplot() is defined to look to see if there are any other axes already in the area and to delete them if there is.
Instead of using subplot() to create new axes that will overlap the other axes, uses axes() to create new axes, and set() their Position to be the same as what you want to overlap.
You will need to set the background color of the top axes to "none" in order for the axes underneath to be visible.
The axes and labels and tick-marks of both axes will be visible, which might not be readable.
I suggest that you consider instead drawing two plots in each subplot() axes. plotyy() might help.

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by