Dotted heatmap
for most of the part, this is copied from: https://stackoverflow.com/questions/59381273/heatmap-with-circles-indicating-size-of-population
dotted_heatmap(data, ax, cmap='cividis', circle_size=None)
¶
Plotting dotted heatmap
Example
>>> import matplotlib.pyplot as plt
>>> from ridgeplot.dotted_heatmap import dotted_heatmap
>>> fig = plt.figure()
>>> ax = fig.add_subplot(111)
>>> data = pd.DataFrame(
... np.random.randn(n, n),
... index=[f"feature{i}" for i in range(n)],
... columns=[f"sample{i}" for i in range(n)],
... )
>>> dotted_heatmap(data=data,ax=ax, cmap="viridis")
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
DataFrame
|
data to plot |
required |
ax
|
Axes
|
matplotlib ax object |
required |
cmap
|
str
|
cmap value, defaults to "cividis" |
'cividis'
|
circle_size
|
Optional[float]
|
raidus of the circles, if None, we will use relaive sizes, defaults to None |
None
|