|
"Shanmugam Kannappan" <shanmugambe@gmail.com> wrote in message <h6gs87$j22$1@fred.mathworks.com>...
> "julie KRATZ" <kratz@mpib-berlin.mpg.de> wrote in message <h6gr4g$pfc$1@fred.mathworks.com>...
> > Hello Everybody!
> >
> > I guess this is a very simple question:
> >
> > I have the following figure, which works out fine:
> >
> > figure
> > bar( PCTNG_SH_first, 'k')
> > axis ([1 51 0 1])
> > hold on
> > bar( PCTNG_SH_first_right, 'b')
> > hold on
> > bar( PCTNG_SH_first_hit, 'r')
> > hold off
> >
> > Now I just want to change/convert the number lables on the X-axes. Instead of ranging from 1:51 in increments of 1, I want the X-Axis Tick lables to be displayes from 1:1.05 in increments of .001.
> >
> > I tried playing around with set(gca,'XTickLabel',['1';'1,001';'1,05'])...
> > and the axis command, but I did not get it.
> >
> > I would be glad if one of you could help me with this!
> >
> > Thanks
> >
> > Julie
> Hi!
>
> Just type the expression itself.
> Ex:
> set(gca,'XTickLabel',1:.001:1.05);
>
> Shan...
Hello Shan!
I tried this already but it does not work.
on the x axis there are 51 bars and bar one should get the value 1, bar 2 the value 1.001,..., bar 51 = value 1.05.
If I use your command 1.001 appears at the 10th bar instead of labeling the second bar on the x axis. And bar 51 gets the value of 1.0051 instead of 1.5.
Maybe you know a different way to getting matlab to display the x axis in the desired format
Best
Julie
|