Can I do yoga and gym together?

Can you get in shape doing yoga?