Maybe your best bet would be to move away from regarding your "figures" as images (especially "shows" and "depicts" tell me that you're thinking of images) and instead describe the content.
This could be "old-fashioned" by now, but I seem to remember references to code being called "listings" in books and magazines rather than "figures" (after all, it's not just a picture to look at, it's something listing lines of code to read and study).
Once you've done that, you can begin to describe the code content rather than how it is shown. Hence, you could use a much wider range of phrases. Just some examples:
- The algorithm in Listing x solves the problem of...
- Listing x: An alternate strategy/method/technique to...
- As demonstrated in this listing, it is possible to...
- To tackle the problem of [...], Mr A used a more direct approach (see Listing x)
- An unorthodox approach ends up being a more elegant solution (Listing x)
More elaborate wording can sometimes distract from a bit of repetition. If you think about what you're trying to demonstrate to the reader, I'm sure you'll come up with many more alternate ways of phrasing it in no time.