leanplot 1.1.0__tar.gz → 1.1.1__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.
Files changed (24) hide show
  1. {leanplot-1.1.0 → leanplot-1.1.1}/PKG-INFO +1 -1
  2. {leanplot-1.1.0 → leanplot-1.1.1}/leanplot/core/colors/palette.py +1 -1
  3. {leanplot-1.1.0 → leanplot-1.1.1}/leanplot/tests/test_palette.py +15 -0
  4. {leanplot-1.1.0 → leanplot-1.1.1}/leanplot.egg-info/PKG-INFO +1 -1
  5. {leanplot-1.1.0 → leanplot-1.1.1}/pyproject.toml +1 -1
  6. {leanplot-1.1.0 → leanplot-1.1.1}/LICENSE.txt +0 -0
  7. {leanplot-1.1.0 → leanplot-1.1.1}/README.md +0 -0
  8. {leanplot-1.1.0 → leanplot-1.1.1}/leanplot/__init__.py +0 -0
  9. {leanplot-1.1.0 → leanplot-1.1.1}/leanplot/core/__init__.py +0 -0
  10. {leanplot-1.1.0 → leanplot-1.1.1}/leanplot/core/bar.py +0 -0
  11. {leanplot-1.1.0 → leanplot-1.1.1}/leanplot/core/colors/__init__.py +0 -0
  12. {leanplot-1.1.0 → leanplot-1.1.1}/leanplot/core/double_y.py +0 -0
  13. {leanplot-1.1.0 → leanplot-1.1.1}/leanplot/core/functions.py +0 -0
  14. {leanplot-1.1.0 → leanplot-1.1.1}/leanplot/core/line.py +0 -0
  15. {leanplot-1.1.0 → leanplot-1.1.1}/leanplot/core/mixin.py +0 -0
  16. {leanplot-1.1.0 → leanplot-1.1.1}/leanplot/debug.py +0 -0
  17. {leanplot-1.1.0 → leanplot-1.1.1}/leanplot/tests/__init__.py +0 -0
  18. {leanplot-1.1.0 → leanplot-1.1.1}/leanplot/tests/test_line.py +0 -0
  19. {leanplot-1.1.0 → leanplot-1.1.1}/leanplot/tests/test_mixin.py +0 -0
  20. {leanplot-1.1.0 → leanplot-1.1.1}/leanplot.egg-info/SOURCES.txt +0 -0
  21. {leanplot-1.1.0 → leanplot-1.1.1}/leanplot.egg-info/dependency_links.txt +0 -0
  22. {leanplot-1.1.0 → leanplot-1.1.1}/leanplot.egg-info/requires.txt +0 -0
  23. {leanplot-1.1.0 → leanplot-1.1.1}/leanplot.egg-info/top_level.txt +0 -0
  24. {leanplot-1.1.0 → leanplot-1.1.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: leanplot
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
4
  Summary: Provides some classes for fast matplotlib plotting based on ISO 80000.
5
5
  Author-email: Joel Kimmich <software@igte.uni-stuttgart.de>
6
6
  License-Expression: MIT
@@ -68,7 +68,7 @@ class ColorPalette:
68
68
  if self.categorial:
69
69
  available_colors = colormap.colors
70
70
  else:
71
- available_colors = colormap.resample(self.number_of_colors).colors
71
+ available_colors = colormap.resampled(self.number_of_colors).colors
72
72
  if self.number_of_colors > len(available_colors):
73
73
  raise ValueError(
74
74
  f"Requested {self.number_of_colors} colors, but colormap "
@@ -29,6 +29,21 @@ class TestColorPalette(TestCase):
29
29
  color_palette = ColorPalette(categorial=True, reversed_colormap=False)
30
30
  self.assertEqual(color_palette.colormap_name, "batlowS")
31
31
 
32
+ def test_resampling(self):
33
+ """Verify that the reverse colormap works correctly."""
34
+ color_palette = ColorPalette(categorial=False, number_of_colors=6)
35
+ colors = color_palette.colors
36
+ self.assertEqual(len(colors), 6)
37
+ color_palette2 = ColorPalette(categorial=False, number_of_colors=10)
38
+ colors2 = color_palette2.colors
39
+ self.assertEqual(len(colors2), 10)
40
+ self.assertAlmostEqual(colors[0][0], colors2[0][0])
41
+ self.assertAlmostEqual(colors[0][1], colors2[0][1])
42
+ self.assertAlmostEqual(colors[0][2], colors2[0][2])
43
+ self.assertAlmostEqual(colors[-1][0], colors2[-1][0])
44
+ self.assertAlmostEqual(colors[-1][1], colors2[-1][1])
45
+ self.assertAlmostEqual(colors[-1][2], colors2[-1][2])
46
+
32
47
  def test_colors_returns_requested_number_of_colors(self):
33
48
  """Verify that the colors property returns exactly number_of_colors entries."""
34
49
  color_palette = ColorPalette(colormap_name="oslo", number_of_colors=6)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: leanplot
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
4
  Summary: Provides some classes for fast matplotlib plotting based on ISO 80000.
5
5
  Author-email: Joel Kimmich <software@igte.uni-stuttgart.de>
6
6
  License-Expression: MIT
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
  name = "leanplot"
7
7
  license = "MIT"
8
8
  readme = "README.md"
9
- version = "1.1.0"
9
+ version = "1.1.1"
10
10
  authors = [
11
11
  { name = "Joel Kimmich", email = "software@igte.uni-stuttgart.de" }
12
12
  ]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes