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: x-axis has too many tick lables
Replies: 5   Last Post: Aug 29, 2013 9:38 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Larry Rose

Posts: 20
Registered: 3/10/11
Re: x-axis has too many tick lables
Posted: Aug 28, 2013 4:37 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

dpb <none@non.net> wrote in message <kvlh1g$enf$1@speranza.aioe.org>...
> On 8/28/2013 1:47 PM, Larry Rose wrote:
> > hello,
> > Does someone know a command to limit the number of x-axis tick labels?
> > So, could limit the number of labels to a specific number of labels. I
> > have too many so I can't even read them unless I enlarge the graph.
> > please advise.

>
> Not specifically a command, no...use the 'xtick' and/or 'xticklabel'
> properties to set the number/values.
>
> To cut them in half, for example,
>
> xt=get(gca,'xtick'); % get the current ones
> xt(1:2:end)=[]; % wipe out every other one
> set(gca,'xtick',xt) % and replace w/ updated
>
> Innumerable variations upon a theme are possible, of course...
>
> --
>

Thanks to both of you guys, yes I see this logic should work , but when I actually chart the item is using the middle date for the end date of the x axis?

I used your guys command below:
xt=get(gca,'xtick'); % get the current ones
xt(1:2:end)=[]; % wipe out every other one
set(gca,'xtick',xt) % and replace w/ updated

it does cut down on the amount of tick labels, but it is only charting up to the middle tickmark and treating that as the end point.
not sure why

larry



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.