aplotly 1.1.23__tar.gz → 1.1.24__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 (38) hide show
  1. {aplotly-1.1.23/aplotly.egg-info → aplotly-1.1.24}/PKG-INFO +1 -1
  2. {aplotly-1.1.23 → aplotly-1.1.24}/aplotly/colors.py +28 -1
  3. {aplotly-1.1.23 → aplotly-1.1.24/aplotly.egg-info}/PKG-INFO +1 -1
  4. {aplotly-1.1.23 → aplotly-1.1.24}/examples/plot_lines.py +4 -4
  5. {aplotly-1.1.23 → aplotly-1.1.24}/pyproject.toml +2 -2
  6. {aplotly-1.1.23 → aplotly-1.1.24}/LICENSE +0 -0
  7. {aplotly-1.1.23 → aplotly-1.1.24}/MANIFEST.in +0 -0
  8. {aplotly-1.1.23 → aplotly-1.1.24}/README.md +0 -0
  9. {aplotly-1.1.23 → aplotly-1.1.24}/aplotly/__init__.py +0 -0
  10. {aplotly-1.1.23 → aplotly-1.1.24}/aplotly/io.py +0 -0
  11. {aplotly-1.1.23 → aplotly-1.1.24}/aplotly/plots.py +0 -0
  12. {aplotly-1.1.23 → aplotly-1.1.24}/aplotly/style.py +0 -0
  13. {aplotly-1.1.23 → aplotly-1.1.24}/aplotly/utils/return_breakdown.py +0 -0
  14. {aplotly-1.1.23 → aplotly-1.1.24}/aplotly.egg-info/SOURCES.txt +0 -0
  15. {aplotly-1.1.23 → aplotly-1.1.24}/aplotly.egg-info/dependency_links.txt +0 -0
  16. {aplotly-1.1.23 → aplotly-1.1.24}/aplotly.egg-info/requires.txt +0 -0
  17. {aplotly-1.1.23 → aplotly-1.1.24}/aplotly.egg-info/top_level.txt +0 -0
  18. {aplotly-1.1.23 → aplotly-1.1.24}/examples/fetch_deribit_data.py +0 -0
  19. {aplotly-1.1.23 → aplotly-1.1.24}/examples/plot_bars.py +0 -0
  20. {aplotly-1.1.23 → aplotly-1.1.24}/examples/plot_confidence_interval.py +0 -0
  21. {aplotly-1.1.23 → aplotly-1.1.24}/examples/plot_correlation.py +0 -0
  22. {aplotly-1.1.23 → aplotly-1.1.24}/examples/plot_exposure_tree.py +0 -0
  23. {aplotly-1.1.23 → aplotly-1.1.24}/examples/plot_gauge.py +0 -0
  24. {aplotly-1.1.23 → aplotly-1.1.24}/examples/plot_line.py +0 -0
  25. {aplotly-1.1.23 → aplotly-1.1.24}/examples/plot_line_and_save.py +0 -0
  26. {aplotly-1.1.23 → aplotly-1.1.24}/examples/plot_lines_with_dist.py +0 -0
  27. {aplotly-1.1.23 → aplotly-1.1.24}/examples/plot_market.py +0 -0
  28. {aplotly-1.1.23 → aplotly-1.1.24}/examples/plot_multiple_performance.py +0 -0
  29. {aplotly-1.1.23 → aplotly-1.1.24}/examples/plot_participation.py +0 -0
  30. {aplotly-1.1.23 → aplotly-1.1.24}/examples/plot_performance.py +0 -0
  31. {aplotly-1.1.23 → aplotly-1.1.24}/examples/plot_performance_by_trade.py +0 -0
  32. {aplotly-1.1.23 → aplotly-1.1.24}/examples/plot_return_side.py +0 -0
  33. {aplotly-1.1.23 → aplotly-1.1.24}/examples/plot_returns_breakdown.py +0 -0
  34. {aplotly-1.1.23 → aplotly-1.1.24}/examples/plot_returns_tree.py +0 -0
  35. {aplotly-1.1.23 → aplotly-1.1.24}/setup.cfg +0 -0
  36. {aplotly-1.1.23 → aplotly-1.1.24}/tests/test_colors.py +0 -0
  37. {aplotly-1.1.23 → aplotly-1.1.24}/tests/test_io.py +0 -0
  38. {aplotly-1.1.23 → aplotly-1.1.24}/tests/test_style.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aplotly
3
- Version: 1.1.23
3
+ Version: 1.1.24
4
4
  License: MIT License
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
@@ -126,8 +126,30 @@ def dark_mode():
126
126
  return line_colors, chart_colors
127
127
 
128
128
 
129
+ def contrast():
130
+ line_colors = {
131
+ "orange": "#F26451",
132
+ "yellow": "#FFD700",
133
+ "purple": "#9B4F96",
134
+ "teal": "#2A9D8F",
135
+ "indigo": "#4B0082",
136
+ "grey": "#CCCCCC",
137
+ "blue": "#00BFFF",
138
+ "mint": "#98FF98",
139
+ }
140
+
141
+ chart_colors = {
142
+ "background": "#000000",
143
+ "grid": "#333333",
144
+ "text": "#E5E5E5",
145
+ "axes": "#E5E5E5",
146
+ }
147
+
148
+ return line_colors, chart_colors
149
+
150
+
129
151
  def available_palettes():
130
- return ["default", "greys", "night", "dark_mode"]
152
+ return ["default", "greys", "night", "dark_mode", "contrast"]
131
153
 
132
154
 
133
155
  def select_palette(name, color_type="hex") -> Tuple[dict, dict]:
@@ -167,5 +189,10 @@ def select_palette(name, color_type="hex") -> Tuple[dict, dict]:
167
189
  return convert_palette_to_rgba(dark_mode()[0]), convert_palette_to_rgba(dark_mode()[1])
168
190
  else:
169
191
  return dark_mode()
192
+ elif name == "contrast":
193
+ if color_type == "rgba":
194
+ return convert_palette_to_rgba(contrast()[0]), convert_palette_to_rgba(contrast()[1])
195
+ else:
196
+ return contrast()
170
197
  else:
171
198
  raise ValueError("palette name not found")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aplotly
3
- Version: 1.1.23
3
+ Version: 1.1.24
4
4
  License: MIT License
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
@@ -4,11 +4,11 @@ import pandas as pd
4
4
  from aplotly.plots import plot_multiple_lines
5
5
 
6
6
  fig = plot_multiple_lines(
7
- [pd.Series(np.random.rand(100), index=np.arange(100)) for _ in range(3)],
8
- labels=["Test 1", "Test 2", "Test 3"],
9
- styles=[{"shape": "hv"}, {"shape": "vh"}, {"shape": "linear"}],
7
+ [pd.Series(np.random.rand(100), index=np.arange(100)) for _ in range(8)],
8
+ labels=["Test 1", "Test 2", "Test 3", "Test 4", "Test 5", "Test 6", "Test 7", "Test 8"],
9
+ styles=[{"shape": "hv"}, {"shape": "vh"}, {"shape": "linear"}, {"shape": "hv"}, {"shape": "vh"}, {"shape": "linear"}, {"shape": "hv"}, {"shape": "vh"}],
10
10
  xlabel="X",
11
11
  ylabel="Y",
12
- colors=["rgba(255, 0, 0, 1.0)", "rgba(0, 255, 0, 0.5)", "rgba(0, 0, 255, 0.25)"],
12
+ color_palette="contrast",
13
13
  )
14
14
  fig.show()
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "aplotly"
7
- version = "1.1.23"
7
+ version = "1.1.24"
8
8
  readme = "README.md"
9
9
  license = { file = "LICENSE" }
10
10
  classifiers = [
@@ -19,7 +19,7 @@ dependencies = [
19
19
  requires-python = ">=3.10"
20
20
 
21
21
  [tool.bumpver]
22
- current_version = "1.1.23"
22
+ current_version = "1.1.24"
23
23
  version_pattern = "MAJOR.MINOR.PATCH"
24
24
  commit_message = "Bump version {old_version} -> {new_version}"
25
25
  commit = true
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes