matlab - Change Axes Tick Label in Surf - Plot -
problem
i have surf plot based on loop data , change appearence of x-tick label , y-tick label, without changing appearnce of plot.
namely multiply x-axis 1000 , divide y-axis hundred. have tried following code:
code
h=surf(results) hold on ax=gca; xlim=[200 2000]; ax.ytick=ax.ytick/100; ax.xtick=ax.xtick*1000; h.edgealpha=0; hold off
the faulty result
what should like
with changes implemented minor x , y tick label disappear , x-lim not work either, creating massive yellow wall can seen in picture, have no data first 200 steps (before changing tick-label).
any on appreciated!
i think wants change "ticklabels" (yticklabel
, xticklabel
, ...). "ticks" refer actual values in plot , ticklabels refers printed on actual tick.
h=surf(results) hold on ax=gca; xlim=[200 2000]; ytext=ax.ytick/100; xtext=ax.xtick*1000; ax.yticklabel = ytext; ax.xticklabel = xtext; h.edgealpha=0; hold off
Comments
Post a Comment