Use max_recursion 0 in _Plot. - #1523
Conversation
Also use Symbols over character strings more often in Plot options routines.
Not sure why mypy tuple is okay here but Optional[tuple] is not. some return paths return None
The better rendering in that case was achieved by turning off recursion, yes, but also increasing the number of points to compensate, but this PR doesn't change that, does it? So this will certainly improve performance, but will decrease quality. I'm not sure what value to set the number of points at to get equivalent quality, and what the comparative performance would be. The tradeoff may also be different for this case, Plot, because I think recursive subdivision in Plot3D is probably a lot harder (guessing a bit because I haven't looked at the code for Plot, only for Plot3D). In general, in my experiments I didn't find the performance of Plot as it stands to be problematic - Manipulate was able to get interactive performance from the current implementation of Plot. I've been focusing on Plot3D because it's a whole different story - you need a lot more data points to get a satisfactory rendering. |
Ok. Thanks for the clarification and additional detail. I've changed the default value back to 3 and tried to capture the wisdom here. However, if I got this wrong, please suggest alternate comments. So what remains are just the String to Symbol changes. |
|
Comment looks good, and the other code improvements are worthwhile. LGTM. |
Recent discussion suggests that the default for max_recursion in plotting functions should be 0 for faster performance and better rendering.
Also, use Symbols over character strings more often in Plot options routines. (There is probably more that could be done here, but that's for some other time.)