フィルターのクリア

when printing a figure matlab prints line that are not shown on screen

2 ビュー (過去 30 日間)
yair suari
yair suari 2012 年 1 月 5 日
回答済み: David 2019 年 6 月 21 日
Hi i am trying to print a map. when i do set(gca,'Position',outpos,'box','off');
I see no frame around my map (pcolorm) but then when i print it the left and bottom lines appear
I even tried to manually set xcolor and ycolor, when they are being set to lets say blue the frame apears blue but once i try setting the to white the same black line appear. what do i do?
the code i am using:
fg=figure
set(gcf, 'renderer', 'zbuffer');
m1=axesm('mapprojection','mercator','MapLatLim',[31 34.5],'MapLonLim',[30 36],... 'frame','off','plabellocation',1,'mlabellocation',1,'parallellabel', 'on','meridianlabel','on','frame','on');
cb=colorbar('Location','east');
caxis([-.1 1.5]);
inpos=get(gca,'Position');
outpos=[.2 .015 inpos(3) inpos(4)];
set(gca,'Position',outpos,'box','off');
inpos=get(cb,'Position');
outpos=[.05 .2 inpos(3) inpos(4)*.9];
set(cb,'Position',outpos);
data2plot=surface_noriv(:,:,itime)-surface_nile_before(:,:,itime);
data2plot(fsm==0)=0/0;
pcolorm(latpom,lonpom,data2plot);
shading interp;
showaxes('off');
textm(31.5,35,num2str(itime*2),'FontName','Times',... 'FontWeight','Bold','FontSize',16);
filename=['/tmp/time' sprintf('%03d',itime) '.png']
saveas(fg,filename)

採用された回答

David
David 2019 年 6 月 21 日
Set XColor and YColor to None:
set(gca,'XColor','none');
set(gca,'YColor','none');

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by