#!/usr/bin/env python # coding: utf-8 # In[1]: get_ipython().run_line_magic('matplotlib', 'inline') # # Checkerboard Plot # Function to plot a checkerboard plot / heat map via matplotlib # > `from mlxtend.plotting import checkerboard plot` # ## Overview # Function to plot a checkerboard plot / heat map via matplotlib. # ### References # # - - # ## Example 1 - Default # In[2]: from mlxtend.plotting import checkerboard_plot import matplotlib.pyplot as plt import numpy as np ary = np.random.random((5, 4)) brd = checkerboard_plot(ary) plt.show() # ## Example 2 - Changing colors and labels # In[3]: from mlxtend.plotting import checkerboard_plot import matplotlib.pyplot as plt import numpy as np checkerboard_plot(ary, col_labels=['abc', 'def', 'ghi', 'jkl'], row_labels=['sample %d' % i for i in range(1, 6)], cell_colors=['skyblue', 'whitesmoke'], font_colors=['black', 'black'], figsize=(4.5, 5)) plt.show() # ## API # In[1]: with open('../../api_modules/mlxtend.plotting/checkerboard_plot.md', 'r') as f: s = f.read() print(s)