RooFit: logscale with negative values [SOLVED]

Hello everyone,
I have search for this but what I found is not helpful so I would like to ask here.

I am doing a signal/background fit with RooFit and I find problem when I try to draw it in a plot. I am using logscale in the TCanvas and it seems to be some negatives values. I have checked the data histogram and it is not the problem. I think the problem is that the fit graph y some regions became negative and this is why I cannot draw it.

Is there any way to set the minimum in the plot on something near to 0 to avoid this error? For histograms or graph there is the order SetMinimum but it seems not work with RooFit objetc, or I am not using it well.

I am learning how to use it so maybe it is a simple question but I could not find anything.

Thank you so much!

Hello again,
I have been looking at this problem and I saw what is causing it, but I dont still know how to solve it.
I have my RooDataHist defined as “data”, and then I make the Fit with RooFit using

I am able to do fits and plot the results for other datasets without problem but there are some datasets with less events which I cannot plot. The fit is done well but, I don’t know why, when try to plot it, it defines a minimum that is negative for the data set. Is there a way to plot it avoiding this minimun definition? Or force it manually to a minimum?

I have tried with

where xframe is the frame where I plot, but it keeps defining this negative minimum that does not let me create a logarithmic scale.

Any idea? Thanks a lot in advance!