Gaussian fit and 2D histogram

Hello all ,
i am a very new user and i have some problems by generating root macro , hope u help me .
1- i have a histogram with number of peaks , i want to make a gaussian fit by using the bin number, how ?.
2- after i am using Chain i can make a 1D histogram , how can i draw 2D histogram from the information in the cahin.

Hi,

I recommend checking the User’s Guide and the tutorials (in particular $ROOTSYS/tutorials/fit) for inspiration.

Cheers,
Philippe.