How to reference a figure from a variable?

Thanks a lot for your time, this was just what I needed.