Change Xaxis values based on Xtick
Show older comments
Hi,
I have the following data plotted from Matlab. I am setting the Xtick and XtickLabels on my own but there is an uneven spacing between the data points. I was wondering if there is a way to make it such that the gap between the data points is not so large/small and is evenly spaced. I have attached a picture with an example.
UniqueFreq =
2012 2015 2018 2020 2023 1882 1885 1900 1915 1918
set(gca,'xtick',unique(UniqueFreq));
hold on
set(gca,'xticklabel',unique(UniqueFreq))
hold on
plot(DataArray{k,8},DataArray{k,9},'-o');
1 Comment
the cyclist
on 18 Jan 2017
I don't see an attached picture.
Answers (0)
Categories
Find more on Annotations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!