MATLAB: Color Issue Using exportgraphics On confusionchart Figure

confusion matrixconfusionchartembed fontsexportgraphicsMATLABpdf

I'm having a small issue with PDF color output when I use the 'exportgraphics' function on a figure made using the 'confusionchart' function. I'm using MATLAB 2020a.
When saving a confusion matrix figure as a PDF using the 'exportgraphics' function, all of the blank squares inside the confusion matrix are changed from white to gray. I want to continue using the exportgraphics function because it is much easier to save a PDF file of a figure that way and because it also embeds the fonts into the PDF file, however I don't want the white/blank squares to be made gray. On Windows, saving the figure as a PDF file from the UI doesn't seem to embed the fonts and it is also much more combersome to make the PDF output as maximized as possible, although it does preserve the blank/white squares. All the other squares in the confusion matrix maintain the correct color when using the 'exportgraphics' function.
Is there anyway to fix/remove this color change on the blank squares in the confusion matrix when using the 'exportgraphics' function?

Best Answer

This issue was resolved in 2020b.