tldr, plot horizontal line segments
While Matlab does not offer rectangular markers, there are possibly a few ways to get something that looks like one.
My favorite is to define a new matrix M=[xdata-c; xdata+c; ydata]; where c is some constant equal to half the width of your rectangular marker and then plot the lines between these points using something like plot([M(i,1) M(i,2)], [M(i,3) M(i,3)]) within a for loop that iterates i.
In that same line you can specify the height of the rectangle by adjusting the line width (along with other specifications)
Now you can easily plot lines between the data points from the sides of your rectangular marker or from the middle if desired. Doing this for scattered data might be impractical, but it’s nice for certain purposes (like mapping the energy profiles for chemical reaction pathways).