MATLAB Answers

How to use 'layout' in nexttile to make the legend appear in the sixth position in 6 tiled chart?

조회 수: 4(최근 30일)
Wolfgang McCormack
Wolfgang McCormack 2021년 5월 28일
댓글: Wolfgang McCormack 2021년 6월 6일
Hi all,
if we have a 6 tiled chart. How do you use layout for legend to put the legend in the 6th tile?
Thanks
  댓글 수: 1
Wolfgang McCormack
Wolfgang McCormack 2021년 6월 6일
@Star Strider Hi, sorry for tagging you but you are super professional with MATLAB, so I thought you might know the answer to this one. I appreciate your time.

댓글을 달려면 로그인하십시오.

답변(1개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021년 5월 28일
Hi,
Here is a realtively simple solution via an easy example:
A = randi([1, 5], 6);
p = bar(A);
legend(p(1,6),{'6-th tile'})
Good luck.
  댓글 수: 1
Wolfgang McCormack
Wolfgang McCormack 2021년 5월 28일
@Sulaymon Eshkabilov Hi, thanks but it's not doing what I wanted. It's showing the 6th one in the legend. I want the legend to appear in the 6th tile in a tiled chart which has 5 actual charts.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by