Hey Doron Ben Shachar!
As can be seen from the above two images the number of data points in the vector "ratio" is different, which is 14 in the first figure and 19 in the figure below that. The problem you are facing is due to the "xticks" getting expanded from a tick for each data to a tick for alternate data points, as highlighted below with red circles encircling the x-tick marks.
This happens because the bar plot tries to automatically adust the tick positions when the number of data points increase.
You can eliminate this by manually setting the position of the x-ticks by using the command
xticks(1:length(ratio))
Using this will sort out the issue of expanded ticks, as shown below using the following code
ratio = [1.73, 1.20, 2.06, 7.92, 0.88, 1.53, 2.18, 1.83, 0.86, 1.18, 0.75, ...
0.90, 1.43, 1.78, 6.99, 1.60, 1.21, 1.50, 1.67];
station_name = ["Afula Nir Haemeq", "Ariel", "Sde Boqer", "Yotvata", "Jerusalem", ...
"Zemah south to Sea of Galilee", "Arad", "Zefat Har Kennan", ...
"Negba", "Besor Farm", "Eilat", "Afeq", "Bet Dagan", "En Karmel"];
land_sea_ratio = ["100", "100", "100", "100", "99", "97", "94", "94", "91", ...
"84", "79", "74", "47", "18"];
bar(ratio,0.4)
title("M/O ratio vs land/sea ratio, 2000-2020")
ylabel("M/O ratio")
% Setting ticks position manually
xticks(1:length(ratio))
set(gca,'xticklabels',(station_name+": "+land_sea_ratio+"%"))
grid on
text([1:length(ratio)], ratio', num2str(ratio','%0.2f'),'HorizontalAlignment','center','VerticalAlignment','bottom',FontSize=6)