Save a plot figure without the white background AROUND THE AXES
9 views (last 30 days)
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,'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!!!
Constantino Carlos Reyes-Aldasoro on 23 Sep 2022
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: