create a figure with box on and x-ytick off

2 ビュー (過去 30 日間)
Kostas
Kostas 2011 年 12 月 28 日
Hello i would like to create a graph with box on but i 'd like to remove the x-ticks from upper x-axis and y-ticks from right y-axis. Unfortunatelly i haven't found how i could "get" the properties of each individual axis (right y-axis, left y-axis, bottom x-axis, upper x-axis) and set x-yticks off. I would appreciate any suggestion/help on how i could implement it.

採用された回答

Walter Roberson
Walter Roberson 2011 年 12 月 28 日
There are no independent left/right or top/bottom properties. Instead, the axis XAxisLocation property can be 'top' or 'bottom' and YAxisLocation can be 'left' or 'right'
  5 件のコメント
Walter Roberson
Walter Roberson 2011 年 12 月 29 日
The first thread leads to Paul's plt which is more flexible -- and can be edited.
Yes, that second one is the very one I was thinking of but could not find.
I think in your case you would find it much easier to turn ticks off on the axis, and then draw them in place where you want them. You would have to text() the labels in to place. Check plt first in case it can already handle no ticks on some side. (If it does not already, and Paul is still around, it sound to me like the sort of improvement he might be interested in.)
Kostas
Kostas 2011 年 12 月 29 日
Thx, i 'll ckeck plt too. Reading your earlier post i thought to turn box off and manually draw 2 lines like x top axis and y right, i think someone could follow a way like getting minimum and maximum values of x and y, and plot 1 vertical and 1 horizontal line with same colour and line width of axes. Anyway, thanks again.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by