Figure does not retain its transparency after saving it as .png

Hey all! I have plotted a graph where I've made the background transparent. Now while saving the graph as a .png file, the transparency is not retained and shows as white instead. Is there a way to save the graph while retaining its transparency? Thanks in advance!

4 件のコメント

Jan
Jan 2021 年 7 月 19 日
Please post the code, which shows, how you made the background transparent and how you save the PNG file. Te screenshot does not clarify, what the problem is.
Kevin Akash Rajasekaran
Kevin Akash Rajasekaran 2021 年 7 月 19 日
set(gca, 'color', 'none')
I used the above command to set the background to transparent. I saved the file normally through the figure dialog box.
Jan
Jan 2021 年 7 月 20 日
Try export_fig or catching the screen by getframe and define the 'TransparentColor' as the background color.
Kevin Akash Rajasekaran
Kevin Akash Rajasekaran 2021 年 7 月 20 日
Thanks! I managed to get a transparent image by going to Edit -----> Copy figure.

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

回答 (0 件)

カテゴリ

製品

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by