Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: hide only top x axis!
Posted:
Feb 23, 2013 11:03 AM
|
|
"giga" wrote in message <kg9hem$nnh$1@newscl01ah.mathworks.com>... > Hi everyone! > > I want to hide only top x axis. > > If I use : > > set(gca, 'box', 'off') > > then right y axis will be removed. but I want to keep right y axis. > > If I use: > > set(gca, 'XTickLabelMode', 'Manual') > set(gca, 'XTick', []) > set(gca,'xcolor',[1 1 1]) > > both bottom and top x axis will be removed! > What should I do to ONLY hide top x axis? > > Thanks
This can't be done with a single axes. You can do something like the plotyy function does, which is to make two axes on top of each other: one with the yaxis on the left, one with it on the right. This is controlled by the yaxislocation property
You can either make two axes and manually give them both the same properties (except for 'yaxislocation'), or use linkaxes to give them the same limits, or set up one axes and then use copyobj to duplicate it. Set the "color" property of the front axis to "none" so you can see the back axes.
|
|
|
|