Comments on: force a number of tick marks in a matlab plot
http://desk.stinkpot.org:8080/tricks/index.php/2008/02/force-a-number-of-tick-marks-in-a-matlab-plot/
tricks!Sat, 17 Aug 2019 10:43:08 +0000hourly1http://wordpress.org/?v=3.6By: Wauzl
http://desk.stinkpot.org:8080/tricks/index.php/2008/02/force-a-number-of-tick-marks-in-a-matlab-plot/comment-page-1/#comment-28187
WauzlTue, 27 Nov 2012 11:06:08 +0000http://desk.stinkpot.org:8080/tricks/index.php/2008/02/force-a-number-of-tick-marks-in-a-matlab-plot/#comment-28187Sorry to say this, but you really got this wrong: XTick sets the location of the ticks, not the number of ticks. If you do
>> plot(-3,-2)
>> set(gca,’XTick’,1:3)
you won’t see any ticks on the x-axis, because Matlab tries to make ticks at x=1,2,3. But this is not visible in the current plot, so no ticks are produced.
]]>