This was a fun challenge, so I kept working on it.
This works the same as the previous suggestion, but it uses less CL and more of the calculator. I’ll just share the link so you can take a look at the differences. I heavily commented the changes in the graphing calculator and made comments on any CL that is needed/changed.