Why does the box outline not appear on top of figure?

120 ビュー (過去 30 日間)
Linnea Franssen
Linnea Franssen 2018 年 7 月 10 日
コメント済み: Louis Camille 2023 年 11 月 28 日
The code below gives me a figure with no box outline on top (see attached file). I have tried many things, including "box on" and Clipping off but have not managed to find out how to add the top line (even artificially, if necessary). I'm thankful for any advice!
x=linspace(0,1,201);
y=linspace(0,1,201);
for n = 999
a=zeros(201,4020); %this is a matrix of size 201 times 4020
cellsICC=a(:,202:402);
colorbarOn=1; %1 if want them; 0 if not
[I1,J1] = find(vessels1>0);
figure
pcolor(x,y,cellsICC)
colormap(flipud(bone));
set(gca,'XTick',[])
set(gca,'YTick',[])
set(gca, 'Box', 'on');
set(gcf,'color','w');
axis square
if colorbarOn==1
cbh=colorbar ('eastoutside');
set(cbh,'YTick',0:1:max(max(max(cellsICC)),2));
end
view([0 90])
caxis([0 max(max(max(cellsICC)),2)])
shading flat
for i=1:length(I1)
line(x(J1(i)),y(I1(i)),'Color','Red','LineWidth',0.1,'Marker','.')
end
end

採用された回答

Robert U
Robert U 2018 年 7 月 10 日
Hi Linnea Franssen,
your code example cannot be executed. Nevertheless, did you try to add:
set(gca,'Box','on');
Kind regards,
Robert
  5 件のコメント
Louis Camille
Louis Camille 2023 年 11 月 28 日
Thanks you it works very well for my tp !
Louis Camille
Louis Camille 2023 年 11 月 28 日
you help a student in the need !

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSubplots についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by