Closed ianozsvald closed 6 years ago
Try using a semicolon.
exp.as_pyplot_figure();
Yeah, as_pyplot_figure displays and returns the figure, which in turn gets displayed by jupyter if you don't assign it to anything or don't add a semicolon as mentioned above.
Another way to avoid this problem is to use the underscore to ignore the function's return value.
_ = exp.as_pyplot_figure()
I think this is more readble.
More about Role underscore in Python - https://www.datacamp.com/community/tutorials/role-underscore-python
Two identical plots are generated, one is expected:
The above is taken from: https://github.com/ianozsvald/data_science_delivered/blob/master/ml_explain_regression_prediction.ipynb
watermark
notes the following versions: