Save a plot figure without the white background AROUND THE AXES
33 次查看(过去 30 天)
显示 更早的评论
I am using a code where I load many datas and then I plot many figures. Before the overall code, I set for all the figures the default proeprties I want as:
set(0,'DefaultaxesLineWidth', 1)
set(0,'DefaultaxesFontSize', 12)
set(0,'DefaultaxesFontWeight', 'bold')
set(0,'DefaultTextFontWeight', 'bold')
set(0,'DefaultaxesFontName', 'Times new Roman')
set(0,'DefaultlegendFontName', 'Times new Roman')
I would like to add to these general settlement, a code that let me to have each plot WITHOUT A BACKGROUND COLOR AROUND THE AXES so that when I save manually each figure from matlab to jpg the resulting figure can be superimposed even to colored boxes in powerpoint without making visible the white frame.
I have tried the code
set (gcf, 'Color', none)
but even if in the matlab figure panel the framework of the figure comes out black and it makes me hope that it works when I save the figure as jpg or png the white framework is still there!!!!
In the following figure I show you the comparison between the plot figure I would like to obtain (the upper one where the white frame of the plot is not visible above a colored box placed by me) and the figure I always obtain with the hated white framework!!!
0 个评论
回答(1 个)
Constantino Carlos Reyes-Aldasoro
2022-9-23
The issue is that you are trying to do 2 things in one, save as jpg, and have a transparent background. As far as I understand this is not possible, however, if you change the file format you may be able to do this with vector graphics. Have a look at this:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Object Properties 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!