필터 지우기
필터 지우기

using export_fig to crop image, including axis

조회 수: 1 (최근 30일)
ARP
ARP 2018년 8월 16일
답변: jonas 2018년 8월 16일
Hi all,
I am trying to use export_fig to crop the image. I successfully removed the background, but the numbers for the axis are still on display.
This is the code:
figure(1)
imagesc(x_axis,axial_distance_water,grayscale2);
colormap(gray);
axis image
export_fig(filename,'-transparent','-tif');
I attach the resulting figure using export_fig and what I need (using cropping function with PowerPoint).
Did anybody had the same issue?
I could not find related examples shown in github for export_fig.
Thanks in advance
  댓글 수: 4
ARP
ARP 2018년 8월 16일
respond as an answer instead of commenting, otherwise I can't accept your answer
jonas
jonas 2018년 8월 16일
Will do.

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

채택된 답변

jonas
jonas 2018년 8월 16일
Consider removing the ticklabels and/or ticks before exporting the figure.
set(gca,'ytick',[],'xtick',[])
set(gca,'yticklabels',{},'xticklabels',{})

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by