Matlab: complex legends

조회 수: 5 (최근 30일)
mary
mary 2021년 5월 18일
댓글: Rik 2021년 5월 18일
Hi,
Could you please tell me if it is possible to do a complex legend by Matlab like the one attached below ?
Regards,
Mary
Update:
I managed to create something as following by fixing the number of columns to 2 and removing the text in the legend. Afterwards, I inserted text boxes. However, the distance shown by an arrow between the two columns is very big (the place where before the legends were annotated). Is there anyway to make that space smaller ?
  댓글 수: 3
mary
mary 2021년 5월 18일
Thanks Rik for your reply. Could you please guide me via an example on how this can be done by using an axes object ? Thanks in advance.
Rik
Rik 2021년 5월 18일
The idea is to have a second axes with some line and text objects. I don't have a specific suggestion, so I would suggest you just try something. If you get stuck, feel free to post a comment.

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

답변 (1개)

KSSV
KSSV 2021년 5월 18일
plot(1:10,rand(1,10),'^-','color','r')
hold on
plot(1:10,rand(1,10),'o-','color','b')
legend
  댓글 수: 1
mary
mary 2021년 5월 18일
Sorry for not being precise. I know how to insert a legend. My problem was the fact that I did not know how to do something like the photo I posted, i.e. two columns with annotations exactly like the one in the photo: part of annotations at left hand side (so contrary to what is done by default by Matlab where legends are put at right hand side of lines/markers) and another part of annotations at top. So, I managed to do that by changing the number of columns. Now, my problem is that the distance between lines of two columns is very big and the question is how to make it smaller.

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by