Skip to content

Commit

Permalink
Make plot tests actually check the difference between pandas' and Koa…
Browse files Browse the repository at this point in the history
…las' (databricks#838)

We should close figure or clear axis; otherwise, it draws another plot in the same window. This ends up with comparing, for instance:

![a1](https://user-images.githubusercontent.com/6477701/65763773-190dfa80-e15f-11e9-8120-6415018da350.png)
![b1](https://user-images.githubusercontent.com/6477701/65763774-19a69100-e15f-11e9-85f0-a911b1ce27c1.png)

However we should compare each plot:

![a](https://user-images.githubusercontent.com/6477701/65763684-e95ef280-e15e-11e9-817a-e3a3d9574b21.png)
![b](https://user-images.githubusercontent.com/6477701/65763685-e95ef280-e15e-11e9-99e9-11c510745978.png)

So, previously the comparison was always correct since both plots are overlapped. `plot_to_base64` closes the plot so we should call `plot_to_base64` for each axis before calling another plot.
  • Loading branch information
HyukjinKwon authored Oct 1, 2019
1 parent 1462291 commit 7432fbf
Show file tree
Hide file tree
Showing 2 changed files with 325 additions and 198 deletions.
Loading

0 comments on commit 7432fbf

Please sign in to comment.