Zooming for interactive fitting

General forum for EasySpin: questions, how to's, etc.
Post Reply
katarkon
Local Expert
Posts: 186
Joined: Mon Jan 12, 2015 4:01 am

Zooming for interactive fitting

Post by katarkon »

Somtimes it is necessary to expand certain area of the spectrum for better control of the fitting. I suggest it is possible without changin of esfit() function code by changing of 'XLim' property of corresponding subplot. The units of 'X' axis should be a numbers of data points. Is it so? Second problem is to obtain right handler for spectrum subplot. I try such code:

Code: Select all

esfit(...);
hAllAxes = findobj('type','axes');
But it returns several values. Which of them is right?
Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Zooming for interactive fitting

Post by Stefan Stoll »

Use findobj('Tag','dataaxes').
katarkon
Local Expert
Posts: 186
Joined: Mon Jan 12, 2015 4:01 am

Re: Zooming for interactive fitting

Post by katarkon »

Thanks, it works fine.
thanasis
Local Expert
Posts: 242
Joined: Thu Jan 21, 2016 6:28 am
Location: Strasbourg

Re: Zooming for interactive fitting

Post by thanasis »

This is a very useful tip!

Just one question: from what I gather, the way to replot to the desired limits is to start the fit and go to the inspector and edit XLIm.x and XLim.y properties manually through the interface.

Is there a way to do this programmatically so that the given fit always starts the interactive window at the desired limits?

Thanks!
Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Zooming for interactive fitting

Post by Stefan Stoll »

There is no direct access to the scaling in the esfit plot.

That said, you could use a timer object in your Matlab startup file that runs the rescaling periodically, using findboj as given above. This is a terrible hack though.
Post Reply