How can we plot the TH1 histogram with different bin width?

You can “merge some bins in the histogram”.
See the “case 2 xbins!=0” in the TH1::Rebin method description.

A simple example can be found in this post.