Decision boundaries ploting by using TMVA

Recently l have tried to plot the decision boundaries of SVM method like what mentioned in the 43th page of the slides:

Initially, l found some details about how the plot the boundary in root Formu:
About the BDT control plot and the decision boundary.
And then l followed it and used the $ROOTSRC/tmva/tmvagui/src/mvaweights.cxx where $ROOTSRC is the path to the source code of ROOT.However, it failed. Actually, l just succed in implementing the drawing of signal and background boundaries , not the decision boundary like this.
(In this figure, l draw all the events from background and signal. And the red frame represents the background, and blue frame respresents the signal.)
Moreover, l think the interface of mvaweights.cxx has some mistakes. Detailly, the interface is wrong especially doesn’t match the structure of TMVA.root outputed by TMVAClassification.C.

Can you please tell exactly what is wrong with the mvaweights.cxx code, used in the TMVA GUI ?