I performed another experiment with GPT-4, and as a result, I received a very useful piece of JavaScript code that will allow me in the future to include function plots on Web pages without relying on third-party libraries.
We started with something simple: plot a function. But then we progressed by adding features and before you know it (and before I ran into the limitations of the GPT-4 context window size), I had a decent plot function on my hands, capable of plotting multiple functions and producing sensible output. There is always room for improvement, of course, but the result speaks for itself.
Without further ado, here is one lovely example. The conversation with GPT-4 that also contains the actual source code is attached.
I said without further ado but there was ado: For some incomprehensible reason, Joomla interferes with Array.from. So I had to create the array using a workaround. Kudos to GPT-4 for making that suggestion.