Topic: suggestion for exception handling

Ivan

   Hi. I have using point series to plot a complex number such as 3 + 2i where I type 3 as the x value and 2 as the y values. I then decided to plot i + i^2 by typing in "i" as the x value and "i*i" as the y value (I have set "calculate with complex numbers"). The series name is displayed in the legend but nothing is drawn and no error message is produced. I think it might be useful to either allow this type of input to work, or to have an error message produce if you only want users to type in real numbers. Attached is an image of how I have done this.

chris

Re: suggestion for exception handling

... attached is the image I forgot to attach previously.

chris

Post's attachments

Attachment icon point series using i.jpg 147.22 kb, 303 downloads since 2019-05-24 

Re: suggestion for exception handling

Sorry for the late response.
You are probably right that Graph should at least give a warning in this case. I will try to implement that. I don't know where you expected x=i to be on the x-axis. However I actually thought y=i^2 would work. But I can see that Graph evaluates points using real numbers only. I will fix that so they can evaluate using complex numbers as long as the result is a real number.

Re: suggestion for exception handling

Ivan

   Yes, you're right about querying where x=i would be on the Re axis. I wasn't thinking straight at the time I tried this example out. This is an example of the user (me) not paying attention. In this sense it would be good for an error messsage to come up such as "invalid input".

chris