Transparency of rectangle disappears when saving as fig?
조회 수: 6 (최근 30일)
이전 댓글 표시
I can't figure this one out from past posts:
I add a transparent rectangle (alpha=0.3) to my plot:
rectangle('Position',[135 0 30 0.2], 'FaceColor', [0.2000 0.8000 0 0.3])
Then I want to save as a .fig file for later data processing:
set(gcf,'units','normalized','outerposition',[0 0 1 1])
savefig([root_dir,subnum,'/03_TMS/04_EMG_SPs/03_Plots_Tables/Individual_Graphs/',trialName,'_stim',num2str(j),'.fig']);
However, savefig gets rid of my transparency. The examples I could find discussed how to deal with this when you want to keep a transparent background / save as a .png image. How can I save as a .fig file and keep my transparency?
댓글 수: 2
Jan
2019년 7월 19일
Currently you showed only, how you save the file. A file does not contain transparent objects, but they appear transparently, when you open the file and create a new figure. So please add the code you use to open the figure. Does it set the renderer to painters implicitly? You need OpenGL for transparency.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Scatter Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!