Closed mnissov closed 3 years ago
Matlab's histogram
function creates a histogram using semi-transparent patches (FaceAlpha=0.6) and these can only be exported to PDF via print(gcf,'-dpdf',...)
as the warning message clearly states. If you want to use export_fig
, set the histogram's FaceAlpha property to 1.
I'm having some troubles exporting a figure with opaque fills into pdf format
The code I am using is
and the warning reads
Warning: export_fig currently supports transparent patches/areas only in PNG output. To export transparent patches/areas to PDF, use the print command: print(gcf, '-dpdf', 'temp.pdf');
Perhaps this is just a misunderstanding from my side.
export_fig version 3.14 and matlab version 2020b on linux
Note: the result of the above code is a pdf image with the background set to black.