# Plot in range, wrong normalization

Hello, I have another problem plotting a distribution only in a specific range. It seems that the normalization is wrong, see attachment:

``````import ROOT
x = ROOT.RooRealVar('x', 'x', -1, 3)
mean = ROOT.RooRealVar('mean', 'mean', 1, -1, 1)
sigma = ROOT.RooRealVar('sigma', 'sigma', 0.1, 0.1, 1)
gaus = ROOT.RooGaussian("gaus", "gaus", x, mean, sigma)

frame = x.frame()
data = gaus.generate(ROOT.RooArgSet(x), 1000)
data.plotOn(frame)
gaus.plotOn(frame, ROOT.RooFit.FillColor(ROOT.kGray), ROOT.RooFit.DrawOption('F'), ROOT.RooFit.ProjectionRange('range'), ROOT.RooFit.Range(1, 1.05), ROOT.RooFit.VLines())
gaus.plotOn(frame)
frame.Draw()``````

after some googling I have fixed with NormRange. Why do I have to do it? Can you fix the behaviour or Range?

``````import ROOT
x = ROOT.RooRealVar('x', 'x', -1, 3)
mean = ROOT.RooRealVar('mean', 'mean', 1, -1, 1)
sigma = ROOT.RooRealVar('sigma', 'sigma', 0.1, 0.1, 1)
gaus = ROOT.RooGaussian("gaus", "gaus", x, mean, sigma)

frame = x.frame()
x.setRange("fullrange", -1, 3)
x.setRange("range", 1, 1.05)
data = gaus.generate(ROOT.RooArgSet(x), 1000)
data.plotOn(frame)
gaus.plotOn(frame, ROOT.RooFit.FillColor(ROOT.kGray), ROOT.RooFit.DrawOption('F'), ROOT.RooFit.NormRange("fullrange"), ROOT.RooFit.Range("range"), ROOT.RooFit.VLines())
gaus.plotOn(frame)
frame.Draw()``````

this seems to be overcomplicated for a so trivial thing as to change the range of a plot