Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Why does my image come up twice - once as a HeatMap and once as a figure?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, sorry Matlab noob.
Whenever I run my script to plot my heatmap, it pops up twice, once as a heat map after HMobj = HeatMap(...) and then as a figure after ax = HMobj.plot; (sample below). Why does this happen? Can I only get it to pop up once?
I've tried hold on, and other similar tactics from other questions, with no luck.
Side note: I'm trying to make a custom axis for my Heatmap, from [-1 2], although some of my files will only go [0 2] or so, but i want to keep the scale the same for all. So if you know a shorter way to do this, thanks.
feature = [1 0 0; 0 2 1; -1 0 0];
Map = [0 0 1; 1 1 1; 0 0 0; 0 1 0];
HMobj = HeatMap(feature,'ColorMap',Map);
addTitle(HMobj,'Blue is off; Green is on; Black is pattern');
ax = HMobj.plot; % 'ax' will be a handle to a standard MATLAB axes.
colorbar('Peer', ax); % Turn the colorbar on
caxis(ax, [-1 2]); % Adjust the color limits
댓글 수: 0
답변 (1개)
이 질문은 마감되었습니다.
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!