Rank: 4360 based on 4 downloads (last 30 days) and 1 file submitted
photo

Peter Torrione

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Peter
Updated   File Tags Downloads
(last 30 days)
Comments Rating
12 Jul 1999 dateNtick.m A function which allows multi-line dates to be displayed. Author: Peter Torrione annotation, customization, function, multiline dates, graphics, plot annotation 4 2
  • 4.5
4.5 | 2 ratings
Comments and Ratings on Peter's Files View all
Updated File Comment by Comments Rating
29 Sep 2008 dateNtick.m A function which allows multi-line dates to be displayed. Author: Peter Torrione Delaney, Kevin

Peter:
   Many thanks for providing this much-needed routine. I use it all the time & it makes plots much more professional-looking.

   I have two suggestions for small improvements:

   1) Within the "if write_another_line" section, change to this to automatically sense if y-axes are reversed:

  % Allow for reverse-direction y-axes.
  offset = .25 * abs(ylims(2)-ylims(1)) / yaxlinch;
                
  if strcmp(get(gca, 'YDir'), 'normal')
    yy = ylims(1) - offset;
  else
    yy = ylims(2) + offset;
  end

   2) Add a 'Tag' to the "additional" text line, so that it is erased when dateNtick is called a second time on the same plot:

  > Change the creation of text to this:
  text(xt-xlen, ypos, labels, ...
       'Color', get(gca, 'XColor'), ...
       'FontSize', get(gca, 'FontSize'), ...
       'Tag', 'dateNtick_labels');

  > Add this to beginning of function.
  % Get rid of old labels.
  delete(findobj('Parent', gca, ...
         'Tag', 'dateNtick_labels'));
   

05 Sep 2008 dateNtick.m A function which allows multi-line dates to be displayed. Author: Peter Torrione Delaney, Kevin

Much needed! Thanks!

Top Tags Applied by Peter
annotation, customization, function, graphics, multiline dates
Files Tagged by Peter
Updated   File Tags Downloads
(last 30 days)
Comments Rating
12 Jul 1999 dateNtick.m A function which allows multi-line dates to be displayed. Author: Peter Torrione annotation, customization, function, multiline dates, graphics, plot annotation 4 2
  • 4.5
4.5 | 2 ratings

Contact us at files@mathworks.com