Changing the default datacursor settings
Afficher commentaires plus anciens
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
Réponses (0)
Catégories
En savoir plus sur Calendar dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!