Rank: 4115 based on 31 downloads (last 30 days) and 1 file submitted
photo

Tim Richards

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Tim
Updated   File Tags Downloads
(last 30 days)
Comments Rating
13 Sep 2006 Screenshot LinkTopAxisData Adds a linked second x axis to a plot Author: Tim Richards annotation, customization, plotxx, xaxis, double, scale 31 7
  • 4.42857
4.4 | 7 ratings
Comments and Ratings on Tim's Files View all
Updated File Comment by Comments Rating
02 Jul 2014 LinkTopAxisData Adds a linked second x axis to a plot Author: Tim Richards Greene, Chad

This function works well, especially after making the changes recommended by Christos are good. I also recommend adding this to the very end:

if nargout==0
clear newAxis
end

This will suppress output if the user does not want to create a new variable in the workspace.

Tim, thanks for sharing, and Christos, thanks for the suggestions.

30 Jun 2014 LinkTopAxisData Adds a linked second x axis to a plot Author: Tim Richards kung, p

28 Apr 2012 LinkTopAxisData Adds a linked second x axis to a plot Author: Tim Richards Vincent, Aaron

21 Jul 2010 LinkTopAxisData Adds a linked second x axis to a plot Author: Tim Richards Saragiotis, Christos

Good job. Two comments

Comment 1: I think it is a good idea to change lines 46 and 49 as follows:
(46) temp=[TopTickPositions(:), TopTickLabels(:)];
(49) temp = sortrows(temp);
This will allow users to enter either row or column vectors (or both) for the ticks and labels.

Comment 2 (regarding the bug that Thierry reported):
It can be fixed if line 50 is replaced by
temp(diff(temp(:,1))==0,:) = [];

14 Aug 2009 LinkTopAxisData Adds a linked second x axis to a plot Author: Tim Richards R, K

Thank you so much for this submission! It took me 15 minutes of playing around with it to figure it out (it wasn't immediately clear to me that TopTickPositions were the positions on the original axis and that TopTickLabels were the associated values on the new axis). But it works great! I really appreciate it - thanks!!

Contact us