How to control the interval and size of continuous legend bar

My question is similar to this post, but how to increase the interval of the color bar display? Thanks.

For example, if the color bar is displayed as in the figure, how to have the interval of 2 m/s, or 0.5 m/s, rather than every 1 m/s? Thanks very much.%E6%8D%95%E8%8E%B7