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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ridgeplot-py
3
- Version: 0.2.5
3
+ Version: 0.2.7
4
4
  Summary: Plotting ridgeplots with matplotlib
5
5
  License: MIT
6
6
  Author: Douglas Wu
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "ridgeplot-py"
3
- version = "0.2.5" # managed by poetry-dynamic-versioning
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
- :param str cmap_name: color map name (e.g. viridis)
283
- :return Tuple[str, str]: hex code for the min and max color
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
- :param pd.DataFrame data: data to plot
40
- :param matplotlib.axes ax: matplotlib ax object
41
- :param str cmap: cmap value, defaults to "cividis"
42
- :param Optional[float] circle_size: raidus of the circles,
43
- if None, we will use relaive sizes, defaults to None
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
- cbar = plt.colorbar(col)
68
- return cbar
69
+ plt.colorbar(col)
@@ -34,6 +34,7 @@ def ridgeplot(
34
34
  ```
35
35
  >>> import numpy as np
36
36
  >>> import matplotlib.pyplot as plt
37
+ >>> from ridgeplot.ridge_plot import ridgeplot
37
38
 
38
39
  >>> data = {}
39
40
  >>> for i in range(10):
File without changes
File without changes