Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
1-d array plotted with imagesc shown as 2-d
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello,
I want to print an 1-d array lets say 1:10 with imagesc and I want the resulting plot to be an 1-d array as well.
But when for example I run
imagesc(1:10)
I get the following plot:
I would actually want the columns (the y-axis) to collapse in one square, namely:
I used for the latter graph
set(gca,'dataAspectRatio',[1 1 1])
but this also makes the colorbar small.
How can I do that have the latter figure, but with a bigger (in height) colorbar.
Thank you in advance
댓글 수: 2
KALYAN ACHARJYA
2020년 6월 27일
편집: KALYAN ACHARJYA
2020년 6월 27일
Plot is 2 dimentional or more. What does 1 D plot mean? Can you share some pictorial image. try with bar? In imagesc, also no variation on y axis, only in x axis, right?
답변 (1개)
Aditya Verma
2020년 6월 27일
편집: Aditya Verma
2020년 6월 27일
You can change the size of the current figure (gcf) using the position propery:
imagesc(1:10);
set(gcf,'position',[0, 0, 500, 50]);
yticks([0 1]);
댓글 수: 1
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!