Wrap contour around axis

Hi all,

I have a TH2D on which I draw contour.
The thing is, my function is sin-like, so the Y axis is defined between -1 and 1.

When I do

the contour stops in the middle of the top bin and the bottom bin. There is an gap between the end of the contour and the axis, gap which does not exist physically.

Is there a way to wrap the contour from +1 to -1 ? Or at least extend to the axis ?
Many thanks.

Can you post a working example reproducing your problem ?