MATLAB: How to plot with plotconfusion into subplots

Deep Learning ToolboxMATLABplotconfusionsubplot

Hi,
I have a problem with subplots of the figures created with plotconfusion. I tried it like this, but the result is only one plot, no subplot.
a=[1 1 0 1 0 0 1 0 1 0 1 1 0 0 1 0 0 0 1 0];
b=[1 0 1 1 0 1 1 0 1 0 1 0 0 0 1 1 0 0 1 0];
c=[1 1 0 1 0 0 1 0 1 0 1 0 0 0 1 1 0 0 1 0]
figure(1)
subplot(2,1,1)
plotconfusion(a,b)
subplot(2,1,2)
plotconfusion(a,c)
Does somebody know how to make it in subplots? Thanks for your help!

Best Answer

The code for plotconfusion is available. It doesn't support an axis handle argument and does not plot into the current axis, rather it overwrites the figure. It seems to be a pretty complicated function that is doing much more than just plotting. I would suggest looking at the code and extracting the plotting aspects and writing your own function.