Cannot set the tick mark direction as default
显示 更早的评论
I recently switched to 2014b MATLAB, and I can no longer set the axes tick mark direction as default. That is, I used to be able to set the tick mark direction 'outward' by
set(0,'defaultAxesTickDir','out');
However, this command does not work any more. When I plot a new figure, the tick mark direction always becomes inward. I can still correct the direction by
set(gca,'TickDir','out');
each time I plot a figure, but this is very inconvenient. Does anybody knows how to work around this problem?
采纳的回答
更多回答(2 个)
Try
set( groot, 'defaultAxesTickDir', 'out' )
instead. Since graphics objects are now all actual objects rather than magic doubles the '0' handle no longer exists so groot is now the graphics root.
4 个评论
Star Strider
2014-11-17
That doesn’t seem to be an accessible ‘root’ property in R2014b. Setting it for each figure is your only option.
That looks like a bug because if I do:
set( groot, 'defaultAxesTickDir', 'out' )
get( groot, 'defaultAxesTickDir' )
ans =
out
it clearly shows it has set the property, but it is not picking it up in the subsequent plot instruction.
set( groot, 'defaultFigurePosition', [400 400 200 200] )
for example does do exactly what you would expect.
Star Strider
2014-11-17
Agreed. You can set it but it doesn’t do anything. It’s not listed in the groot properties. Another reason to not uninstall R2014a.
Shin
2014-11-17
类别
在 帮助中心 和 File Exchange 中查找有关 Creating, Deleting, and Querying Graphics Objects 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
