yellowbrick
yellowbrick copied to clipboard
Remove text from all Axes in image similarity tests
In a39df0d we added several text removal tools to streamline the image similarity tests, particularly for different operating systems. However, as discussed in #826 we are moving to multi-axes visualizers, particularly like the one in #884. The image similarity tests need to remove the ticks from all axes in the visualizer, not just the primary axes.
While we're doing this, we should also fix the following deprecation warning:
tests/test_features/test_rankd.py::Test the Rank1D visualizer::Test Rank1D using shapiro metric
/Users/benjamin/Workspace/tmp/yellowbrick/rebeccabilbro/tests/base.py:282: MatplotlibDeprecationWarning:
The mkdirs function was deprecated in Matplotlib 3.0 and will be removed in 3.2.
mpl.cbook.mkdirs(imgdir)
Regarding removing from the images, I believe I've done something similar when I was working on #516. https://github.com/DistrictDataLabs/yellowbrick/blob/4db12724d10d4abe6cf97374380d11ac9025ac3e/tests/test_cluster/test_silhouette.py#L64
Is it sufficient to add these extra kwargs to disable all text from every test? https://github.com/DistrictDataLabs/yellowbrick/blob/7ef426fcd5484cd2ab4035d140e03703a7570f62/tests/base.py#L183-L195
@mgarod thank you for taking a closer look at this! To clarify, what's happening is that we have visualizer with two matplotlib axes objects, and the remove_ticks kwargs, when true, only removes the ticks from the primary axes, e.g. not from other axes like side histograms or color bars. These remove_* test arguments should modify all axes in the visualizer under test.