I agree with Lev ~ depends on if it's a Compound Fracture, or just a Simple Fracture.
If it's a Compound Fracture, then you want to stay off of it, and No Gym till your Doctor gives the OK.
If it's a Simple Fracture, where the Bone has just Cracked, but Not Dislocated.
Then you can do Upper Body Work, but I would stick with the Machines for now.
And Progress Slowly.
Even after the Cast is removed, you need to be Extremely Careful.
And work on getting your Range of Motion and Mobility back to where it was or better.
Cause your Ankle will be Stiff, from being in the Cast, and it takes time and effort.
To get back to where you were before you broke it.......................... JP