Change Xaxis values based on Xtick

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');

Answers (0)

Products

Asked:

on 18 Jan 2017

Edited:

on 18 Jan 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!