Shirt+pants is also ok, and the style is as formal as possible. Black pants, white shirt and black leather shoes (shoes can refer to the picture) are the most common collocation. Another thing to note is that you should never wear white socks.
I have attended undergraduate and master's graduation ceremonies in the United States. I hope you can have a pleasant experience ~