Thanks for quick reply.
In addition to the above problems, I also found an unreasonable exception,the plot bar always missing some longer bars when our radius is not bigger enough.
For example, the above example,
when I set radius = 8
when I set radius = 4
In my opinion, when I set the radius to 4, we should get 3 bars of length 3 instead of 2 bars of length 3.