Plot lorentzian function

Hello, I wrote a macro to plot two lorentzian functions. I’ve thre questions:

  1. The top of the functions look like cutted…

  1. I want to print the maxima, then I used
max1=f1->GetMaximum();
	max2=f2->GetMaximum();

but the printed value in the file, don’t fit the value that I read in the y-axis. For example in the previous plot, in the y-axis I read approximately, 1.5 and 1.10, but in the file it prints 2.1 and 1.3

Results.txt (111 Bytes)

  1. I notice that the height changes when I change the x-range values (i.e. a,b), as you can see in the next plot.
    The maxima in the file don’t change when I change the x-range, then I mean they are the real values…but how to get them also in the plot?

Thanks
lorfun.cpp (1.9 KB)


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Try: f1->SetNpx(1000); f2->SetNpx(1000);

Thank you…it solved all the problems

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.