Many researchers or students faced the problem of having transparent exported image in MATLAB.
Here are the steps:
1. Download export_fig (https://www.mathworks.com/matlabcentral/fileexchange/23629-export_fig)
2. save_path = '2.png';
3.plot(your vector)
4.set(gcf, 'color', 'none'); set(gca, 'color', 'none');export_fig(save_path, '-png', '-eps', '-transparent'); Done!
|