Matlab barchart question.

조회 수: 5 (최근 30일)
Pappu Murthy
Pappu Murthy 2021년 5월 10일
답변: SAAD 2023년 7월 4일
I get this strange error (screen shot attached) when I save the figure as ".emf", or ".bmp" but no error at all when I tried to save as ".png". This error never showed up for me before. Please help. Thanks.

채택된 답변

Asvin Kumar
Asvin Kumar 2021년 5월 13일
Hi Pappu,
It seems you've contacted Tech Support via email. I'll capture the workaround that we provided you over here for everyone else's reference.
The mentioned hgexport error shows up in both R2020b and R2021a. Here are two workarounds:
1. Try saving the figure in other formats such as PNG, if that works for you.
2. Explicitly set the figure's renderer to OpenGL before saving it. This would force the file to show an embedded image. This embedded image won't scale/resize as well as the other EMF files but it will allow you to use the same format. Run the following line before saving the figure to set the renderer for the current figure:
set(gcf, 'renderer', 'opengl')
  댓글 수: 1
Pappu Murthy
Pappu Murthy 2021년 5월 13일
Thanks for the work around. It did fine so far for me.

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

추가 답변 (1개)

SAAD
SAAD 2023년 7월 4일
if true
  % code
end

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by