When plotting an anonymous function, the function domain gets deduced correctly. However, when this is used by plot to evaluate the function values, the call to nevaluate will always use only 100 samples, as that's hardcoded in set_variables in py_algorithms.cc. This needs customisation so the samples argument to plot works also for these functions.