Is it possible to create in matplotlib sidebars with the shape of the data points? -
similar following image (which seems generated hand): 
is possible generate areas circled in purple using matplotlib?
i know possible have sidebars relevant color/density interested in shape itself.
you can plot items again fixed x , y respectively. since default items outside axes clipped, have set clip_on false when plotting.
import matplotlib.pyplot plt import numpy np #stars x1 = np.random.rand(4) y1 = np.random.rand(4) # circles x2 = np.random.rand(4) y2 = np.random.rand(4) fig, ax = plt.subplots(subplot_kw={'aspect': 1, 'xlim': [0,1], 'ylim': [0,1]}) star_style = {'linestyle': 'none', 'marker': (5,1), 'ms': 16, 'mec': 'r', 'mfc': 'none', 'mew': 2} circ_style = {'linestyle': 'none', 'marker': 'o', 'ms': 14, 'mec': 'b', 'mfc': 'none', 'mew': 2} ax.plot(x1, y1, **star_style) ax.plot(np.full_like(x1, -0.1), y1, clip_on=false, **star_style) ax.plot(x1, np.full_like(y1, -0.1), clip_on=false, **star_style) ax.plot(x2, y2, **circ_style) ax.plot(np.full_like(x2, -0.1), y2, clip_on=false, **circ_style) ax.plot(x2, np.full_like(y2, -0.1), clip_on=false, **circ_style) 
Comments
Post a Comment