Get contour graphs

In ROOT, contours of a TH2D object are objects of TGraph. I am trying to get those contour graphs and hence their drawing properties like line style etc. See the attached code please. The code is using the drawing option : “cont”. Okay, I can get contour graphs. However, if I use other options, like “cont2”, the contour graphs cannot be found! Thus if I use ‘cont2’, I have no way to know which contour and no way to print legend etc. Any hint? Bug?

test_cont2.C (1.06 KB)

Only the CONT option (combine with LIST) allows to retrieve the TGraphs building the contour plot. See the help:

The various CONTx options are done using different algorithms.
Not all of them are are using TGraphs to draw the contours.