Rank: 659 based on 185 downloads (last 30 days) and 2 files submitted
photo

Emmanuel Dinnat

E-mail

Personal Profile:

 

Watch this Author's files

 

Files Posted by Emmanuel Dinnat View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
29 Nov 2005 Screenshot Add top X-axis with different scale Add an X-axis on top (additional to the one on bottom) of the figure, with its own ticks labels ... Author: Emmanuel Dinnat annotation, customization, xaxis, double, scale, top 173 11
  • 4.66667
4.7 | 9 ratings
16 Nov 2005 Screenshot Plot 3D vectors/arrow (again ...) Plot 3D vectors using surfaces Author: Emmanuel Dinnat annotation, customization, arrow, vector, 3d, graphics 12 2
  • 2.0
2.0 | 1 rating
Comments and Ratings on Emmanuel Dinnat's Files View all
Updated File Comment by Comments Rating
30 Jun 2014 Add top X-axis with different scale Add an X-axis on top (additional to the one on bottom) of the figure, with its own ticks labels ... Author: Emmanuel Dinnat p kung

29 Nov 2012 Add top X-axis with different scale Add an X-axis on top (additional to the one on bottom) of the figure, with its own ticks labels ... Author: Emmanuel Dinnat Chern Hui Lee

07 Sep 2012 Add top X-axis with different scale Add an X-axis on top (additional to the one on bottom) of the figure, with its own ticks labels ... Author: Emmanuel Dinnat Sushovan

23 Jul 2012 Add top X-axis with different scale Add an X-axis on top (additional to the one on bottom) of the figure, with its own ticks labels ... Author: Emmanuel Dinnat Paul

Very useful! Thanks a lot.

03 Mar 2012 Add top X-axis with different scale Add an X-axis on top (additional to the one on bottom) of the figure, with its own ticks labels ... Author: Emmanuel Dinnat Massimo Ciacci

After checking other solutions out there, this is by far the best and simple too, without complicate callback mechanisms to regenerate the labels on the secondary axis, which still zooms properly.

I had tried

set(gca, 'XTickMode', 'auto', 'XTickLabelMode', 'auto')

in the hope that labels would be updated automatically, but as a result the secondary axis becomes identical to the first!

Workaround, use manual xticks to start with, dense enough, before calling the function. But at least the new axis zooms properly! Well done Emmanuel!

Contact us