When I fractured my femur and had it pinned it was physio who got me walking again, he was a hard taskmaster and I went weekly for about 12 weeks immediately after my release from the hospital. He used to make me walk up and down the corridor until I was moving properly and also used to measure the angles in all my leg movements to check I’d been doing the exercises at home! I hated every minute of physio but it really did work.
One thing to consider is the muscle wastage as your leg will not have been working as much, I started seeing a sports massage person 6 months ago (15 years after my accident) and she was finding lots of weak and damaged muscle and tissue which is gradually improving with exercises and stretching. That is making a huge difference to my straightness.