ridgeplot-py 0.2.5__tar.gz → 0.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ridgeplot_py-0.2.5 → ridgeplot_py-0.2.7}/PKG-INFO +1 -1
- {ridgeplot_py-0.2.5 → ridgeplot_py-0.2.7}/pyproject.toml +1 -1
- {ridgeplot_py-0.2.5 → ridgeplot_py-0.2.7}/ridgeplot/colors.py +6 -2
- {ridgeplot_py-0.2.5 → ridgeplot_py-0.2.7}/ridgeplot/dotted_heatmap.py +8 -7
- {ridgeplot_py-0.2.5 → ridgeplot_py-0.2.7}/ridgeplot/ridge_plot.py +1 -0
- {ridgeplot_py-0.2.5 → ridgeplot_py-0.2.7}/LICENSE +0 -0
- {ridgeplot_py-0.2.5 → ridgeplot_py-0.2.7}/README.md +0 -0
- {ridgeplot_py-0.2.5 → ridgeplot_py-0.2.7}/ridgeplot/__init__.py +0 -0
- {ridgeplot_py-0.2.5 → ridgeplot_py-0.2.7}/ridgeplot/stats.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "ridgeplot-py"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.7" # managed by poetry-dynamic-versioning
|
|
4
4
|
description = "Plotting ridgeplots with matplotlib"
|
|
5
5
|
authors = ["Douglas Wu <wckdouglas@gmail.com>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -141,6 +141,7 @@ class ColorEncoder:
|
|
|
141
141
|
|
|
142
142
|
Example:
|
|
143
143
|
```
|
|
144
|
+
>>> from ridgeplot.colors import ColorEncoder, ColorPalette
|
|
144
145
|
>>> categorical_vector = ['group a','group b','group c','group a']
|
|
145
146
|
>>> colors = ColorPalette["okabeito"]
|
|
146
147
|
>>> ce = ColorEncoder()
|
|
@@ -279,8 +280,11 @@ def get_cmap_color_values(cmap_name: str) -> Tuple[str, str]:
|
|
|
279
280
|
"""
|
|
280
281
|
Get color values for the min and max color in a color map
|
|
281
282
|
|
|
282
|
-
:
|
|
283
|
-
|
|
283
|
+
Args:
|
|
284
|
+
cmap_name: color map name (e.g. viridis)
|
|
285
|
+
|
|
286
|
+
Returns:
|
|
287
|
+
hex code for the min and max color
|
|
284
288
|
"""
|
|
285
289
|
cmap = get_cmap(cmap_name)
|
|
286
290
|
return to_hex(cmap(0.0)), to_hex(cmap(1.0))
|
|
@@ -26,6 +26,7 @@ def dotted_heatmap(
|
|
|
26
26
|
Example:
|
|
27
27
|
```
|
|
28
28
|
>>> import matplotlib.pyplot as plt
|
|
29
|
+
>>> from ridgeplot.dotted_heatmap import dotted_heatmap
|
|
29
30
|
>>> fig = plt.figure()
|
|
30
31
|
>>> ax = fig.add_subplot(111)
|
|
31
32
|
>>> data = pd.DataFrame(
|
|
@@ -36,11 +37,12 @@ def dotted_heatmap(
|
|
|
36
37
|
>>> dotted_heatmap(data=data,ax=ax, cmap="viridis")
|
|
37
38
|
```
|
|
38
39
|
|
|
39
|
-
:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
Args:
|
|
41
|
+
data: data to plot
|
|
42
|
+
ax: matplotlib ax object
|
|
43
|
+
cmap: cmap value, defaults to "cividis"
|
|
44
|
+
circle_size: raidus of the circles,
|
|
45
|
+
if None, we will use relaive sizes, defaults to None
|
|
44
46
|
"""
|
|
45
47
|
nrows, ncols = data.shape
|
|
46
48
|
x, y = np.meshgrid(np.arange(ncols), np.arange(nrows))
|
|
@@ -64,5 +66,4 @@ def dotted_heatmap(
|
|
|
64
66
|
ax.tick_params(left=False, bottom=False)
|
|
65
67
|
for d in ["top", "bottom", "left", "right"]:
|
|
66
68
|
ax.spines[d].set(alpha=0.5)
|
|
67
|
-
|
|
68
|
-
return cbar
|
|
69
|
+
plt.colorbar(col)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|