-
Notifications
You must be signed in to change notification settings - Fork 53
Overlapping plots #99
Comments
Ah, this problem goes back a while due to an error I made when creating the first plots. Our plotting methods have a However, when a user does not pass the ax = plt.gca() This means "get current axes". The problem with this approach is that it'll re-use the same axes (that's why the plots overlap). I'm unsure what's matplotlib's rule for deciding when to create a new Axes object. Maybe if running it in a different cell will force creating a new axes? I think what's best is to do: _, ax = plt.subplots() just like sklearn does This will create a new axes object. I don't think this will have any impact for end-users, but once we make the change, we can check the rendered docs and examples to see if anything looks odd. |
found another instance of overlapping plots: https://sklearn-evaluation.ploomber.io/en/latest/api/plot.html#confusionmatrix |
note: I fixed this for confusion matrix, this PR can be used as reference: #208 |
okay! I'll check it out! |
this has been fixed #211 |
Is there anything else or we cna close this? |
nothing else to do, we can close it |
When trying to print multiple plots via the same cell, the matrix and feature importance are overlapping.
i.e:
The text was updated successfully, but these errors were encountered: