Tick marks when I set "box on".

7 Ansichten (letzte 30 Tage)
cnrvx732 am 9 Apr. 2021
Beantwortet: Abhishek Gupta am 12 Apr. 2021
When I set "box on", the tick marks appear on the top, bottom, left and right sides of the plot. Can I make it only show left and bottom?

Akzeptierte Antwort

Abhishek Gupta
Abhishek Gupta am 12 Apr. 2021
Here is an example, which only displays tick marks on the left and bottom axes: -
% get handle to current axes
a = gca;
% set box property to off and remove background color
set(a, 'box', 'off', 'color', 'none');
% create new, empty axes with box but without ticks
b = axes('Position', get(a, 'Position'), 'box', 'on', 'xtick', [], 'ytick', []);
% set original axes as active
Output: -

Weitere Antworten (0)


Community Treasure Hunt

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

Start Hunting!

Translated by