Changing the default datacursor settings

How might I change the default datacursor settings for figures so that the x position number is shown in a date string format.
I have generated the following function which successfully changes the datacursor text, but not permanently i.e. I have to re-run this function each time I open my saved figures (saved as .fig).
function [txt] = plotDateTagfcn(obj,event_obj)
% Display 'date string for cursor x position'
pos = get(event_obj,'Position');
txt = {['Date: ',datestr(pos(1))],['Magnitude: ',num2str(pos(2))]};
%
%%I then call this function by using:
set(figure_handle,'UpdateFcn',@plotDateTagfcn)
%
I’d really appreciate some help on this.
Thanks
%
RobbieH

Risposte (0)

Richiesto:

il 16 Ott 2015

Modificato:

il 16 Ott 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by