aplotly 1.1.13__tar.gz → 1.1.14__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 (30) hide show
  1. {aplotly-1.1.13/aplotly.egg-info → aplotly-1.1.14}/PKG-INFO +1 -1
  2. {aplotly-1.1.13 → aplotly-1.1.14}/aplotly/plots.py +3 -2
  3. {aplotly-1.1.13 → aplotly-1.1.14/aplotly.egg-info}/PKG-INFO +1 -1
  4. {aplotly-1.1.13 → aplotly-1.1.14}/aplotly.egg-info/SOURCES.txt +1 -0
  5. aplotly-1.1.14/examples/plot_performance_by_trade.py +12 -0
  6. {aplotly-1.1.13 → aplotly-1.1.14}/pyproject.toml +2 -2
  7. {aplotly-1.1.13 → aplotly-1.1.14}/LICENSE +0 -0
  8. {aplotly-1.1.13 → aplotly-1.1.14}/MANIFEST.in +0 -0
  9. {aplotly-1.1.13 → aplotly-1.1.14}/README.md +0 -0
  10. {aplotly-1.1.13 → aplotly-1.1.14}/aplotly/__init__.py +0 -0
  11. {aplotly-1.1.13 → aplotly-1.1.14}/aplotly/colors.py +0 -0
  12. {aplotly-1.1.13 → aplotly-1.1.14}/aplotly/io.py +0 -0
  13. {aplotly-1.1.13 → aplotly-1.1.14}/aplotly/style.py +0 -0
  14. {aplotly-1.1.13 → aplotly-1.1.14}/aplotly/utils/return_breakdown.py +0 -0
  15. {aplotly-1.1.13 → aplotly-1.1.14}/aplotly.egg-info/dependency_links.txt +0 -0
  16. {aplotly-1.1.13 → aplotly-1.1.14}/aplotly.egg-info/requires.txt +0 -0
  17. {aplotly-1.1.13 → aplotly-1.1.14}/aplotly.egg-info/top_level.txt +0 -0
  18. {aplotly-1.1.13 → aplotly-1.1.14}/examples/plot_bars.py +0 -0
  19. {aplotly-1.1.13 → aplotly-1.1.14}/examples/plot_exposure_tree.py +0 -0
  20. {aplotly-1.1.13 → aplotly-1.1.14}/examples/plot_gauge.py +0 -0
  21. {aplotly-1.1.13 → aplotly-1.1.14}/examples/plot_line.py +0 -0
  22. {aplotly-1.1.13 → aplotly-1.1.14}/examples/plot_line_and_save.py +0 -0
  23. {aplotly-1.1.13 → aplotly-1.1.14}/examples/plot_lines.py +0 -0
  24. {aplotly-1.1.13 → aplotly-1.1.14}/examples/plot_multiple_performance.py +0 -0
  25. {aplotly-1.1.13 → aplotly-1.1.14}/examples/plot_performance.py +0 -0
  26. {aplotly-1.1.13 → aplotly-1.1.14}/examples/plot_returns_tree.py +0 -0
  27. {aplotly-1.1.13 → aplotly-1.1.14}/setup.cfg +0 -0
  28. {aplotly-1.1.13 → aplotly-1.1.14}/tests/test_colors.py +0 -0
  29. {aplotly-1.1.13 → aplotly-1.1.14}/tests/test_io.py +0 -0
  30. {aplotly-1.1.13 → aplotly-1.1.14}/tests/test_style.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aplotly
3
- Version: 1.1.13
3
+ Version: 1.1.14
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:
@@ -363,9 +363,10 @@ def plot_bars(
363
363
  if label_column is not None:
364
364
  labels = df[label_column].unique()
365
365
  heights = {label: df[df[label_column] == label][height_column] for label in labels}
366
+ indicies = {label: df[df[label_column] == label].index for label in labels}
366
367
 
367
368
  data = [
368
- go.Bar(name=label, x=df.index, y=heights[label], legendgroup=1, legendgrouptitle_text=group_title)
369
+ go.Bar(name=label, x=indicies[label], y=heights[label], legendgroup=1, legendgrouptitle_text=group_title)
369
370
  for label in labels
370
371
  ]
371
372
 
@@ -376,7 +377,7 @@ def plot_bars(
376
377
 
377
378
  fig.update_yaxes(title_text=ylabel)
378
379
  fig.update_xaxes(title_text=xlabel)
379
- fig.update_layout(showlegend=legend, title_text=plot_title)
380
+ fig.update_layout(showlegend=legend, title_text=plot_title, barmode="group")
380
381
 
381
382
  return fig
382
383
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aplotly
3
- Version: 1.1.13
3
+ Version: 1.1.14
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:
@@ -21,6 +21,7 @@ examples/plot_line_and_save.py
21
21
  examples/plot_lines.py
22
22
  examples/plot_multiple_performance.py
23
23
  examples/plot_performance.py
24
+ examples/plot_performance_by_trade.py
24
25
  examples/plot_returns_tree.py
25
26
  tests/test_colors.py
26
27
  tests/test_io.py
@@ -0,0 +1,12 @@
1
+ import numpy as np
2
+ import pandas as pd
3
+
4
+ from aplotly.plots import plot_performance_by_trade
5
+ from aplotly import save_figure
6
+
7
+ df = pd.read_csv("examples/resources/pbt.csv")
8
+
9
+ fig = plot_performance_by_trade(
10
+ pbt=df,
11
+ )
12
+ save_figure(fig, "performance_by_trade.png", figsize=(1000, 1000))
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "aplotly"
7
- version = "1.1.13"
7
+ version = "1.1.14"
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.13"
22
+ current_version = "1.1.14"
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