Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: hide only top x axis!
Replies: 2   Last Post: Feb 23, 2013 11:03 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
matt dash

Posts: 628
Registered: 4/18/08
Re: hide only top x axis!
Posted: Feb 23, 2013 11:03 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"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.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.