Can I overlay a rotated histogram onto a scatter plot?

Hey @Ziyuan, welcome to the forums.

You could rotate your do a coordinate transformation do that the scatter is aligned to the x and y axis and then use rugs: