James Smith
2005-04-21 10:42:32 UTC
Hi all
I'm trying to customize my tick labels on a graph but am having
trouble positioning the xtick labels where I want them.
I'm plotting a frequency of objects that lie between certain ranges.
Thus I want tick marks on either side of the range displayed as eg.
10-20, as opposed to 10 at one tick mark and 20 at the next. so i
want
| 10-20 |
if possible.
I have this so far:
set(gca,'XTick',0:10:100,'tickdir','out')
set(gca,'XTickLabel',{'0-10','10-20','20-30','30-40','40-50','50-60','
60-70','70-80','80-90','90-100'})
This is almost right but I just need some way to centralise the
xticklabel as they appear directly beneath tickmarks at present.
Thanks in advance!
J. Smith
I'm trying to customize my tick labels on a graph but am having
trouble positioning the xtick labels where I want them.
I'm plotting a frequency of objects that lie between certain ranges.
Thus I want tick marks on either side of the range displayed as eg.
10-20, as opposed to 10 at one tick mark and 20 at the next. so i
want
| 10-20 |
if possible.
I have this so far:
set(gca,'XTick',0:10:100,'tickdir','out')
set(gca,'XTickLabel',{'0-10','10-20','20-30','30-40','40-50','50-60','
60-70','70-80','80-90','90-100'})
This is almost right but I just need some way to centralise the
xticklabel as they appear directly beneath tickmarks at present.
Thanks in advance!
J. Smith