フィルターのクリア

Transparency in Matlab R2016b

1 回表示 (過去 30 日間)
oliver
oliver 2018 年 11 月 5 日
編集済み: oliver 2018 年 11 月 6 日
I am on R2016b and cannot create PNGs with transparent background. I
  • have set figure background color to "transparent" in copy options and tried copy-pasting -> white background
  • same after doing set(gca/gcf,'color','none') -> results in a black bg in Matlab and in a white bg when pasted.
  • edited figure properties and changed figure color to HSV with 100% transparency -> white background
Is there any way to get transparency in Matlab?
  1 件のコメント
oliver
oliver 2018 年 11 月 6 日
the only way I managed so far is so print to epsc2, then open in Illustrator to remove the white rectangle which is the figure background, and export to PNG. But surely Matlab can handle this without needing an expensive 3rd party software or without me having to manually edit the eps file.

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

回答 (1 件)

madhan ravi
madhan ravi 2018 年 11 月 5 日
編集済み: madhan ravi 2018 年 11 月 6 日
  2 件のコメント
oliver
oliver 2018 年 11 月 6 日
編集済み: oliver 2018 年 11 月 6 日
Thanks but I may need a little more than that. Do you mean
set(gcf,'alpha',0)
I tried this and get a white background (both with copy/paste and print to png command).
If I just do alpha(0.5) the transparency of the facecolor in my plot elements is changed but the background is still white, so no good.
oliver
oliver 2018 年 11 月 6 日
編集済み: oliver 2018 年 11 月 6 日
You have just changed you answer from "alpha" to a link. This will make it very difficult for others to follow this exchange. If you want to paste a new answer, better do so in the form field below.
With respect to your new answer, I find it odd that a multi-$1000 software is incapable of producing a PNG with transparent background and asks users to manually edit EPS files or install a user contributed fix (as suggested in your link). If this is the only solution, why then do they have the "transparent background" in the figure copy options. Seems like a bug to me which has persisted through numerous releases now without being fixed.

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

カテゴリ

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

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by