The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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: 641
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$>...
> 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]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.