From: Assaf Weinstein on
Hi,

I am using

set(gca,'XTick',tickvalues)

with some numerical vector 'tickvalues', and I get overlapping ticks on the X axis..

How can this be avoided?

Thanks,

Asaf
From: Wayne King on
"Assaf Weinstein" <assafweinstein_remove.this(a)gmail.com> wrote in message <hva69e$egp$1(a)fred.mathworks.com>...
> Hi,
>
> I am using
>
> set(gca,'XTick',tickvalues)
>
> with some numerical vector 'tickvalues', and I get overlapping ticks on the X axis..
>
> How can this be avoided?
>
> Thanks,
>
> Asaf

Hi Asaf, can you please provide the group with an example of the behavior you are seeing? I'm afraid that set(gca,'xtick',xvalues) is not enough information for anyone to help you.

Wayne
From: Assaf Weinstein on
"Wayne King" <wmkingty(a)gmail.com> wrote in message <hva8ru$ogh$1(a)fred.mathworks.com>...
> "Assaf Weinstein" <assafweinstein_remove.this(a)gmail.com> wrote in message <hva69e$egp$1(a)fred.mathworks.com>...
> > Hi,
> >
> > I am using
> >
> > set(gca,'XTick',tickvalues)
> >
> > with some numerical vector 'tickvalues', and I get overlapping ticks on the X axis..
> >
> > How can this be avoided?
> >
> > Thanks,
> >
> > Asaf
>
> Hi Asaf, can you please provide the group with an example of the behavior you are seeing? I'm afraid that set(gca,'xtick',xvalues) is not enough information for anyone to help you.
>
> Wayne

Hi Wayne,

The group is 'xvalues', as follows:

p=sort(cat(2,[c_bar_zero_r c_hat_halfalpha c_tilda_zero_r c+r*slength(mu1_tilda,c)],(1:.5:6)));

xvalues=round(p*100)/100;

When I set these ticks on the figure, what I see is that there are numeral values which overlap.. (I would attach a p.screen, but can't see how).

Thanks,

asaf
From: Steven Lord on

"Assaf Weinstein" <assafweinstein_remove.this(a)gmail.com> wrote in message
news:hvahv2$pai$1(a)fred.mathworks.com...
> "Wayne King" <wmkingty(a)gmail.com> wrote in message
> <hva8ru$ogh$1(a)fred.mathworks.com>...
>> "Assaf Weinstein" <assafweinstein_remove.this(a)gmail.com> wrote in message
>> <hva69e$egp$1(a)fred.mathworks.com>...
>> > Hi,
>> >
>> > I am using
>> >
>> > set(gca,'XTick',tickvalues)
>> >
>> > with some numerical vector 'tickvalues', and I get overlapping ticks on
>> > the X axis..
>> >
>> > How can this be avoided?
>> >
>> > Thanks,
>> >
>> > Asaf
>>
>> Hi Asaf, can you please provide the group with an example of the behavior
>> you are seeing? I'm afraid that set(gca,'xtick',xvalues) is not enough
>> information for anyone to help you.
>>
>> Wayne
>
> Hi Wayne,
>
> The group is 'xvalues', as follows:
>
> p=sort(cat(2,[c_bar_zero_r c_hat_halfalpha c_tilda_zero_r
> c+r*slength(mu1_tilda,c)],(1:.5:6)));
>
> xvalues=round(p*100)/100;
>
> When I set these ticks on the figure, what I see is that there are numeral
> values which overlap.. (I would attach a p.screen, but can't see how).

There are a couple of options:

* Increase the spacing between your ticks/decrease the number of ticks. If
your ticks are currently spaced only 0.001 apart, maybe changing the spacing
to 0.01 or even 0.1 would work for your purpose.
* Increase the size of your axes and/or figure to give each tick label a
larger area to use.
* Decrease the number of ticks that you label with a nonempty string (i.e.
label every other tick or all but every third with '' so that the tick
labels to either side have a little extra space.
* Decrease the length of each tick label. Instead of displaying 0.00001 for
your tick label, maybe display 1e-5

The SET function in conjunction with the axes XTick and XTickLabel
properties will be of use to you in implementing these options.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com