plotly-extend-wrapper 1.4.0__tar.gz → 1.5.0__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 (23) hide show
  1. plotly_extend_wrapper-1.5.0/PKG-INFO +117 -0
  2. plotly_extend_wrapper-1.5.0/README.md +99 -0
  3. plotly_extend_wrapper-1.5.0/plotly_extend_wrapper/__init__.py +10 -0
  4. {plotly_extend_wrapper-1.4.0 → plotly_extend_wrapper-1.5.0}/plotly_extend_wrapper/wrapper.py +4 -4
  5. plotly_extend_wrapper-1.5.0/plotly_extend_wrapper.egg-info/PKG-INFO +117 -0
  6. {plotly_extend_wrapper-1.4.0 → plotly_extend_wrapper-1.5.0}/plotly_extend_wrapper.egg-info/SOURCES.txt +1 -0
  7. {plotly_extend_wrapper-1.4.0 → plotly_extend_wrapper-1.5.0}/plotly_extend_wrapper.egg-info/requires.txt +1 -1
  8. {plotly_extend_wrapper-1.4.0 → plotly_extend_wrapper-1.5.0}/pyproject.toml +2 -2
  9. plotly_extend_wrapper-1.5.0/test/test_version.py +30 -0
  10. {plotly_extend_wrapper-1.4.0 → plotly_extend_wrapper-1.5.0}/test/test_wrapper.py +38 -0
  11. plotly_extend_wrapper-1.4.0/PKG-INFO +0 -60
  12. plotly_extend_wrapper-1.4.0/README.md +0 -42
  13. plotly_extend_wrapper-1.4.0/plotly_extend_wrapper/__init__.py +0 -5
  14. plotly_extend_wrapper-1.4.0/plotly_extend_wrapper.egg-info/PKG-INFO +0 -60
  15. {plotly_extend_wrapper-1.4.0 → plotly_extend_wrapper-1.5.0}/LICENSE +0 -0
  16. {plotly_extend_wrapper-1.4.0 → plotly_extend_wrapper-1.5.0}/plotly_extend_wrapper/common.py +0 -0
  17. {plotly_extend_wrapper-1.4.0 → plotly_extend_wrapper-1.5.0}/plotly_extend_wrapper/updater.py +0 -0
  18. {plotly_extend_wrapper-1.4.0 → plotly_extend_wrapper-1.5.0}/plotly_extend_wrapper.egg-info/dependency_links.txt +0 -0
  19. {plotly_extend_wrapper-1.4.0 → plotly_extend_wrapper-1.5.0}/plotly_extend_wrapper.egg-info/top_level.txt +0 -0
  20. {plotly_extend_wrapper-1.4.0 → plotly_extend_wrapper-1.5.0}/setup.cfg +0 -0
  21. {plotly_extend_wrapper-1.4.0 → plotly_extend_wrapper-1.5.0}/test/test_common.py +0 -0
  22. {plotly_extend_wrapper-1.4.0 → plotly_extend_wrapper-1.5.0}/test/test_updater.py +0 -0
  23. {plotly_extend_wrapper-1.4.0 → plotly_extend_wrapper-1.5.0}/test/test_wrapper_polars.py +0 -0
@@ -0,0 +1,117 @@
1
+ Metadata-Version: 2.4
2
+ Name: plotly-extend-wrapper
3
+ Version: 1.5.0
4
+ Author-email: Laplusdestiny <prayonshootingstars@gmail.com>
5
+ Requires-Python: >=3.9
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE
8
+ Requires-Dist: plotly>=6.1.0
9
+ Requires-Dist: kaleido>=0.2.1
10
+ Requires-Dist: pyarrow>=10.0.0
11
+ Requires-Dist: pandas>=2.0.0
12
+ Requires-Dist: scipy>=1.8.0
13
+ Requires-Dist: numpy>=1.24.0
14
+ Requires-Dist: nbformat>=4.2.0
15
+ Provides-Extra: polars
16
+ Requires-Dist: polars>=0.20.0; extra == "polars"
17
+ Dynamic: license-file
18
+
19
+ # plotly_extend_wrapper
20
+
21
+ [![GitHub last commit (branch)](https://img.shields.io/github/last-commit/Laplusdestiny/plotly_extend_wrapper/main?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper/commits/main/)
22
+ [![Codecov](https://img.shields.io/codecov/c/gh/Laplusdestiny/plotly_extend_wrapper?style=flat&logo=codecov)](https://app.codecov.io/gh/Laplusdestiny/plotly_extend_wrapper)
23
+ [![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/Laplusdestiny/plotly_extend_wrapper?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper/releases)
24
+ [![PyPI - Version](https://img.shields.io/pypi/v/plotly_extend_wrapper?logo=pypi)](https://pypi.org/project/plotly-extend-wrapper/)
25
+
26
+ Extended Python library for Plotly
27
+
28
+ - **Simple Interface**: Create complex visualizations with just a few lines of code
29
+ - **pandas / polars Support**: Accepts `pandas.DataFrame`, `polars.DataFrame` and `polars.LazyFrame`
30
+ - **Automated Preprocessing**: Value counting, rounding and pivoting are handled for you
31
+ - **Multiple Plot Types**: Pie, sunburst, bubble, line (with secondary y-axis), and 3D surface charts
32
+ - **Customization**: Update titles, legend, size and markers through a unified interface
33
+
34
+ For detailed documentation and examples, visit our [Documentation](https://laplusdestiny.github.io/plotly_extend_wrapper/)
35
+
36
+ ## Install
37
+
38
+ ``` bash
39
+ pip install plotly-extend-wrapper
40
+
41
+ # with polars support
42
+ pip install "plotly-extend-wrapper[polars]"
43
+ ```
44
+
45
+ ## Quick Start
46
+
47
+ ``` python
48
+ import pandas as pd
49
+ from plotly_extend_wrapper import Plot_pie, Plot_line, Update_plotly_object
50
+
51
+ df = pd.DataFrame({"category": ["A", "B", "A", "C", "B"]})
52
+ fig = Plot_pie(df, "category") # value counts are computed automatically
53
+
54
+ df = pd.DataFrame({
55
+ "date": pd.date_range("2024-01-01", periods=100, freq="D"),
56
+ "sales": range(100),
57
+ "temperature": [i % 30 for i in range(100)],
58
+ })
59
+ fig = Plot_line(
60
+ df,
61
+ x="date",
62
+ y=["sales"],
63
+ secondary_y=["temperature"],
64
+ ytitle="Sales",
65
+ secondary_ytitle="Temperature",
66
+ vline=["2024-02-01"],
67
+ )
68
+
69
+ updater = Update_plotly_object(fig)
70
+ updater.update(height=500, width=900, legend_position="h")
71
+ updater.write_image("output/line.png")
72
+ ```
73
+
74
+ ## Supported Functions
75
+
76
+ | Name | Description |
77
+ | --- | --- |
78
+ | `Plot_pie` | Pie chart from the value counts of a column |
79
+ | `Plot_sunburst` | Hierarchical sunburst chart from the value counts of multiple columns |
80
+ | `Plot_bubble_chart` | Bubble chart whose size is the frequency of (x, y) pairs |
81
+ | `Plot_bubble_chart_with_line` | Overlay linear lines (`y = a * x + b`) on a bubble chart |
82
+ | `Plot_line` | Line chart with secondary y-axis, highlighted periods and vertical lines |
83
+ | `Plot_surface` | 3D surface plot with optional cubic interpolation |
84
+ | `Update_plotly_object` | Update layout of an existing figure and export it as an image |
85
+ | `check_directory` | Create parent directories for an output path |
86
+
87
+ ## Requirement
88
+
89
+ - Python >= 3.9
90
+ - plotly >= 6.1.0
91
+ - kaleido >= 0.2.1
92
+ - pandas >= 2.0.0
93
+ - pyarrow >= 10.0.0
94
+ - numpy >= 1.24.0
95
+ - scipy >= 1.8.0
96
+ - nbformat >= 4.2.0
97
+ - polars >= 0.20.0 (optional)
98
+
99
+ ## Development
100
+
101
+ ``` bash
102
+ uv sync # install dependencies
103
+ uv run pytest test # run tests
104
+ uv run sphinx-build docs/ docs/_build # build documentation
105
+ ```
106
+
107
+ ## Issue
108
+
109
+ If there are some bugs, please make issue to tell me!
110
+
111
+ [![GitHub issues](https://img.shields.io/github/issues/Laplusdestiny/plotly_extend_wrapper?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper/issues)
112
+
113
+ ## License
114
+
115
+ MIT License
116
+
117
+ [![GitHub](https://img.shields.io/github/license/Laplusdestiny/plotly_extend_wrapper?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper?tab=MIT-1-ov-file#MIT-1-ov-file)
@@ -0,0 +1,99 @@
1
+ # plotly_extend_wrapper
2
+
3
+ [![GitHub last commit (branch)](https://img.shields.io/github/last-commit/Laplusdestiny/plotly_extend_wrapper/main?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper/commits/main/)
4
+ [![Codecov](https://img.shields.io/codecov/c/gh/Laplusdestiny/plotly_extend_wrapper?style=flat&logo=codecov)](https://app.codecov.io/gh/Laplusdestiny/plotly_extend_wrapper)
5
+ [![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/Laplusdestiny/plotly_extend_wrapper?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper/releases)
6
+ [![PyPI - Version](https://img.shields.io/pypi/v/plotly_extend_wrapper?logo=pypi)](https://pypi.org/project/plotly-extend-wrapper/)
7
+
8
+ Extended Python library for Plotly
9
+
10
+ - **Simple Interface**: Create complex visualizations with just a few lines of code
11
+ - **pandas / polars Support**: Accepts `pandas.DataFrame`, `polars.DataFrame` and `polars.LazyFrame`
12
+ - **Automated Preprocessing**: Value counting, rounding and pivoting are handled for you
13
+ - **Multiple Plot Types**: Pie, sunburst, bubble, line (with secondary y-axis), and 3D surface charts
14
+ - **Customization**: Update titles, legend, size and markers through a unified interface
15
+
16
+ For detailed documentation and examples, visit our [Documentation](https://laplusdestiny.github.io/plotly_extend_wrapper/)
17
+
18
+ ## Install
19
+
20
+ ``` bash
21
+ pip install plotly-extend-wrapper
22
+
23
+ # with polars support
24
+ pip install "plotly-extend-wrapper[polars]"
25
+ ```
26
+
27
+ ## Quick Start
28
+
29
+ ``` python
30
+ import pandas as pd
31
+ from plotly_extend_wrapper import Plot_pie, Plot_line, Update_plotly_object
32
+
33
+ df = pd.DataFrame({"category": ["A", "B", "A", "C", "B"]})
34
+ fig = Plot_pie(df, "category") # value counts are computed automatically
35
+
36
+ df = pd.DataFrame({
37
+ "date": pd.date_range("2024-01-01", periods=100, freq="D"),
38
+ "sales": range(100),
39
+ "temperature": [i % 30 for i in range(100)],
40
+ })
41
+ fig = Plot_line(
42
+ df,
43
+ x="date",
44
+ y=["sales"],
45
+ secondary_y=["temperature"],
46
+ ytitle="Sales",
47
+ secondary_ytitle="Temperature",
48
+ vline=["2024-02-01"],
49
+ )
50
+
51
+ updater = Update_plotly_object(fig)
52
+ updater.update(height=500, width=900, legend_position="h")
53
+ updater.write_image("output/line.png")
54
+ ```
55
+
56
+ ## Supported Functions
57
+
58
+ | Name | Description |
59
+ | --- | --- |
60
+ | `Plot_pie` | Pie chart from the value counts of a column |
61
+ | `Plot_sunburst` | Hierarchical sunburst chart from the value counts of multiple columns |
62
+ | `Plot_bubble_chart` | Bubble chart whose size is the frequency of (x, y) pairs |
63
+ | `Plot_bubble_chart_with_line` | Overlay linear lines (`y = a * x + b`) on a bubble chart |
64
+ | `Plot_line` | Line chart with secondary y-axis, highlighted periods and vertical lines |
65
+ | `Plot_surface` | 3D surface plot with optional cubic interpolation |
66
+ | `Update_plotly_object` | Update layout of an existing figure and export it as an image |
67
+ | `check_directory` | Create parent directories for an output path |
68
+
69
+ ## Requirement
70
+
71
+ - Python >= 3.9
72
+ - plotly >= 6.1.0
73
+ - kaleido >= 0.2.1
74
+ - pandas >= 2.0.0
75
+ - pyarrow >= 10.0.0
76
+ - numpy >= 1.24.0
77
+ - scipy >= 1.8.0
78
+ - nbformat >= 4.2.0
79
+ - polars >= 0.20.0 (optional)
80
+
81
+ ## Development
82
+
83
+ ``` bash
84
+ uv sync # install dependencies
85
+ uv run pytest test # run tests
86
+ uv run sphinx-build docs/ docs/_build # build documentation
87
+ ```
88
+
89
+ ## Issue
90
+
91
+ If there are some bugs, please make issue to tell me!
92
+
93
+ [![GitHub issues](https://img.shields.io/github/issues/Laplusdestiny/plotly_extend_wrapper?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper/issues)
94
+
95
+ ## License
96
+
97
+ MIT License
98
+
99
+ [![GitHub](https://img.shields.io/github/license/Laplusdestiny/plotly_extend_wrapper?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper?tab=MIT-1-ov-file#MIT-1-ov-file)
@@ -0,0 +1,10 @@
1
+ from plotly_extend_wrapper.wrapper import *
2
+ from plotly_extend_wrapper.updater import *
3
+ from plotly_extend_wrapper.common import *
4
+
5
+ from importlib.metadata import PackageNotFoundError, version as _version
6
+
7
+ try:
8
+ __version__ = _version("plotly-extend-wrapper")
9
+ except PackageNotFoundError:
10
+ __version__ = "unknown"
@@ -290,12 +290,12 @@ def Plot_line(
290
290
  """
291
291
  import random
292
292
 
293
- random.seed(42)
293
+ rng = random.Random(42)
294
294
 
295
295
  df = _normalize_dataframe(df)
296
296
 
297
297
  def pick_color():
298
- return ["#" + "".join([random.choice("0123456789ABCDEF") for j in range(6)])][0]
298
+ return ["#" + "".join([rng.choice("0123456789ABCDEF") for j in range(6)])][0]
299
299
 
300
300
  if isinstance(secondary_y, str):
301
301
  secondary_y = [secondary_y]
@@ -470,7 +470,7 @@ def Plot_surface(
470
470
  title (str, optional): The title of the plot. Default is None.
471
471
  height (int, optional): The height of the plot. Default is None.
472
472
  width (int, optional): The width of the plot. Default is None.
473
- **kwargs: Additional keyword arguments to pass to the plot.
473
+ **kwargs: Additional keyword arguments passed to plotly.graph_objects.Surface.
474
474
 
475
475
  Returns:
476
476
  plotly.graph_objs._figure.Figure: The generated 3D surface plot.
@@ -501,7 +501,7 @@ def Plot_surface(
501
501
  Y = pivot_df.index.values
502
502
  Z = pivot_df.values
503
503
 
504
- data = [go.Surface(x=X, y=Y, z=Z)]
504
+ data = [go.Surface(x=X, y=Y, z=Z, **kwargs)]
505
505
  layout = go.Layout(
506
506
  title=title,
507
507
  scene=dict(
@@ -0,0 +1,117 @@
1
+ Metadata-Version: 2.4
2
+ Name: plotly-extend-wrapper
3
+ Version: 1.5.0
4
+ Author-email: Laplusdestiny <prayonshootingstars@gmail.com>
5
+ Requires-Python: >=3.9
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE
8
+ Requires-Dist: plotly>=6.1.0
9
+ Requires-Dist: kaleido>=0.2.1
10
+ Requires-Dist: pyarrow>=10.0.0
11
+ Requires-Dist: pandas>=2.0.0
12
+ Requires-Dist: scipy>=1.8.0
13
+ Requires-Dist: numpy>=1.24.0
14
+ Requires-Dist: nbformat>=4.2.0
15
+ Provides-Extra: polars
16
+ Requires-Dist: polars>=0.20.0; extra == "polars"
17
+ Dynamic: license-file
18
+
19
+ # plotly_extend_wrapper
20
+
21
+ [![GitHub last commit (branch)](https://img.shields.io/github/last-commit/Laplusdestiny/plotly_extend_wrapper/main?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper/commits/main/)
22
+ [![Codecov](https://img.shields.io/codecov/c/gh/Laplusdestiny/plotly_extend_wrapper?style=flat&logo=codecov)](https://app.codecov.io/gh/Laplusdestiny/plotly_extend_wrapper)
23
+ [![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/Laplusdestiny/plotly_extend_wrapper?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper/releases)
24
+ [![PyPI - Version](https://img.shields.io/pypi/v/plotly_extend_wrapper?logo=pypi)](https://pypi.org/project/plotly-extend-wrapper/)
25
+
26
+ Extended Python library for Plotly
27
+
28
+ - **Simple Interface**: Create complex visualizations with just a few lines of code
29
+ - **pandas / polars Support**: Accepts `pandas.DataFrame`, `polars.DataFrame` and `polars.LazyFrame`
30
+ - **Automated Preprocessing**: Value counting, rounding and pivoting are handled for you
31
+ - **Multiple Plot Types**: Pie, sunburst, bubble, line (with secondary y-axis), and 3D surface charts
32
+ - **Customization**: Update titles, legend, size and markers through a unified interface
33
+
34
+ For detailed documentation and examples, visit our [Documentation](https://laplusdestiny.github.io/plotly_extend_wrapper/)
35
+
36
+ ## Install
37
+
38
+ ``` bash
39
+ pip install plotly-extend-wrapper
40
+
41
+ # with polars support
42
+ pip install "plotly-extend-wrapper[polars]"
43
+ ```
44
+
45
+ ## Quick Start
46
+
47
+ ``` python
48
+ import pandas as pd
49
+ from plotly_extend_wrapper import Plot_pie, Plot_line, Update_plotly_object
50
+
51
+ df = pd.DataFrame({"category": ["A", "B", "A", "C", "B"]})
52
+ fig = Plot_pie(df, "category") # value counts are computed automatically
53
+
54
+ df = pd.DataFrame({
55
+ "date": pd.date_range("2024-01-01", periods=100, freq="D"),
56
+ "sales": range(100),
57
+ "temperature": [i % 30 for i in range(100)],
58
+ })
59
+ fig = Plot_line(
60
+ df,
61
+ x="date",
62
+ y=["sales"],
63
+ secondary_y=["temperature"],
64
+ ytitle="Sales",
65
+ secondary_ytitle="Temperature",
66
+ vline=["2024-02-01"],
67
+ )
68
+
69
+ updater = Update_plotly_object(fig)
70
+ updater.update(height=500, width=900, legend_position="h")
71
+ updater.write_image("output/line.png")
72
+ ```
73
+
74
+ ## Supported Functions
75
+
76
+ | Name | Description |
77
+ | --- | --- |
78
+ | `Plot_pie` | Pie chart from the value counts of a column |
79
+ | `Plot_sunburst` | Hierarchical sunburst chart from the value counts of multiple columns |
80
+ | `Plot_bubble_chart` | Bubble chart whose size is the frequency of (x, y) pairs |
81
+ | `Plot_bubble_chart_with_line` | Overlay linear lines (`y = a * x + b`) on a bubble chart |
82
+ | `Plot_line` | Line chart with secondary y-axis, highlighted periods and vertical lines |
83
+ | `Plot_surface` | 3D surface plot with optional cubic interpolation |
84
+ | `Update_plotly_object` | Update layout of an existing figure and export it as an image |
85
+ | `check_directory` | Create parent directories for an output path |
86
+
87
+ ## Requirement
88
+
89
+ - Python >= 3.9
90
+ - plotly >= 6.1.0
91
+ - kaleido >= 0.2.1
92
+ - pandas >= 2.0.0
93
+ - pyarrow >= 10.0.0
94
+ - numpy >= 1.24.0
95
+ - scipy >= 1.8.0
96
+ - nbformat >= 4.2.0
97
+ - polars >= 0.20.0 (optional)
98
+
99
+ ## Development
100
+
101
+ ``` bash
102
+ uv sync # install dependencies
103
+ uv run pytest test # run tests
104
+ uv run sphinx-build docs/ docs/_build # build documentation
105
+ ```
106
+
107
+ ## Issue
108
+
109
+ If there are some bugs, please make issue to tell me!
110
+
111
+ [![GitHub issues](https://img.shields.io/github/issues/Laplusdestiny/plotly_extend_wrapper?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper/issues)
112
+
113
+ ## License
114
+
115
+ MIT License
116
+
117
+ [![GitHub](https://img.shields.io/github/license/Laplusdestiny/plotly_extend_wrapper?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper?tab=MIT-1-ov-file#MIT-1-ov-file)
@@ -12,5 +12,6 @@ plotly_extend_wrapper.egg-info/requires.txt
12
12
  plotly_extend_wrapper.egg-info/top_level.txt
13
13
  test/test_common.py
14
14
  test/test_updater.py
15
+ test/test_version.py
15
16
  test/test_wrapper.py
16
17
  test/test_wrapper_polars.py
@@ -1,4 +1,4 @@
1
- plotly>=5.12.0
1
+ plotly>=6.1.0
2
2
  kaleido>=0.2.1
3
3
  pyarrow>=10.0.0
4
4
  pandas>=2.0.0
@@ -1,9 +1,9 @@
1
1
  [project]
2
2
  name = "plotly-extend-wrapper"
3
- version = "1.4.0"
3
+ version = "1.5.0"
4
4
  authors = [{ name = "Laplusdestiny", email = "prayonshootingstars@gmail.com" }]
5
5
  dependencies = [
6
- "plotly>=5.12.0",
6
+ "plotly>=6.1.0",
7
7
  "kaleido>=0.2.1",
8
8
  "pyarrow>=10.0.0",
9
9
  "pandas>=2.0.0",
@@ -0,0 +1,30 @@
1
+ # encoding: utf-8
2
+
3
+ import importlib
4
+ import importlib.metadata
5
+ import re
6
+ from pathlib import Path
7
+
8
+ import plotly_extend_wrapper
9
+
10
+
11
+ def test_version_matches_pyproject():
12
+ pyproject = (Path(__file__).resolve().parent.parent / "pyproject.toml").read_text(encoding="utf-8")
13
+ expected = re.search(r'^version\s*=\s*"([^"]+)"', pyproject, re.MULTILINE).group(1)
14
+
15
+ assert plotly_extend_wrapper.__version__ == expected
16
+
17
+
18
+ def test_version_without_installed_package(monkeypatch):
19
+ def raise_not_found(name):
20
+ raise importlib.metadata.PackageNotFoundError(name)
21
+
22
+ monkeypatch.setattr(importlib.metadata, "version", raise_not_found)
23
+ try:
24
+ importlib.reload(plotly_extend_wrapper)
25
+ assert plotly_extend_wrapper.__version__ == "unknown"
26
+ finally:
27
+ monkeypatch.undo()
28
+ importlib.reload(plotly_extend_wrapper)
29
+
30
+ assert plotly_extend_wrapper.__version__ != "unknown"
@@ -396,6 +396,44 @@ def test_PlotSurface_with_all_options():
396
396
  assert surface.layout.width == 1000
397
397
 
398
398
 
399
+ def test_PlotSurface_with_kwargs():
400
+ data = load_iris(as_frame=True)
401
+
402
+ surface = Plot_surface(
403
+ data["frame"],
404
+ x="sepal length (cm)",
405
+ y="petal length (cm)",
406
+ z="petal width (cm)",
407
+ colorscale="Viridis",
408
+ showscale=False,
409
+ )
410
+
411
+ assert isinstance(surface, go.Figure)
412
+ assert surface.data[0].showscale is False
413
+ assert surface.data[0].colorscale[0][1] == "#440154"
414
+
415
+
416
+ def test_Line_does_not_change_global_random_state():
417
+ import random
418
+
419
+ data = MakeTimeSeriesData()
420
+ random.seed(0)
421
+ expected = random.random()
422
+
423
+ random.seed(0)
424
+ Plot_line(
425
+ data,
426
+ x="timestamp",
427
+ y=["y1"],
428
+ secondary_y="y2",
429
+ vspan=[("2024-01-01 00:00:00", "2024-01-01 08:00:00")],
430
+ vspan_color_randomize=True,
431
+ vline=["2024-01-01 06:00:00"],
432
+ )
433
+
434
+ assert random.random() == expected
435
+
436
+
399
437
  def test_Line_with_sort_options():
400
438
  """Test line plot with different sorting options"""
401
439
  data = MakeTimeSeriesData()
@@ -1,60 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: plotly-extend-wrapper
3
- Version: 1.4.0
4
- Author-email: Laplusdestiny <prayonshootingstars@gmail.com>
5
- Requires-Python: >=3.9
6
- Description-Content-Type: text/markdown
7
- License-File: LICENSE
8
- Requires-Dist: plotly>=5.12.0
9
- Requires-Dist: kaleido>=0.2.1
10
- Requires-Dist: pyarrow>=10.0.0
11
- Requires-Dist: pandas>=2.0.0
12
- Requires-Dist: scipy>=1.8.0
13
- Requires-Dist: numpy>=1.24.0
14
- Requires-Dist: nbformat>=4.2.0
15
- Provides-Extra: polars
16
- Requires-Dist: polars>=0.20.0; extra == "polars"
17
- Dynamic: license-file
18
-
19
- # plotly_extend_wrapper
20
-
21
- [![GitHub last commit (branch)](https://img.shields.io/github/last-commit/Laplusdestiny/plotly_extend_wrapper/main?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper/commits/main/)
22
- [![Codecov](https://img.shields.io/codecov/c/gh/Laplusdestiny/plotly_extend_wrapper?style=flat&logo=codecov)](https://app.codecov.io/gh/Laplusdestiny/plotly_extend_wrapper)
23
- [![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/Laplusdestiny/plotly_extend_wrapper?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper/releases)
24
- [![PyPI - Version](https://img.shields.io/pypi/v/plotly_extend_wrapper?logo=pypi)](https://pypi.org/project/plotly-extend-wrapper/)
25
-
26
- Extended Python library for Plotly
27
-
28
- - **Simple Interface**: Create complex visualizations with just a few lines of code
29
- - **Pandas Integration**: Seamless integration with pandas DataFrames
30
- - **Multiple Plot Types**: Support for various chart types including pie charts, sunburst diagrams, and 3D surfaces
31
- - **Customization**: Easy plot customization through a unified interface
32
- - **Automatic Layout**: Smart default settings for common plot configurations
33
-
34
- For detailed documentation and examples, visit our [Documentation](https://laplusdestiny.github.io/plotly_extend_wrapper/)
35
-
36
- ## Install
37
-
38
- ``` bash
39
- pip install plotly-extend-wrapper
40
- ```
41
-
42
- ## Requirement
43
-
44
- - Python >= 3.9
45
- - Plotly >= 5.0.0
46
- - kaleido = 0.2.1
47
- - pandas >= 2.2.0
48
- - scipy >= 1.12.0
49
-
50
- ## Issue
51
-
52
- If there are some bugs, please make issue to tell me!
53
-
54
- [![GitHub issues](https://img.shields.io/github/issues/Laplusdestiny/plotly_extend_wrapper?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper/issues)
55
-
56
- ## License
57
-
58
- MIT License
59
-
60
- [![GitHub](https://img.shields.io/github/license/Laplusdestiny/plotly_extend_wrapper?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper?tab=MIT-1-ov-file#MIT-1-ov-file)
@@ -1,42 +0,0 @@
1
- # plotly_extend_wrapper
2
-
3
- [![GitHub last commit (branch)](https://img.shields.io/github/last-commit/Laplusdestiny/plotly_extend_wrapper/main?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper/commits/main/)
4
- [![Codecov](https://img.shields.io/codecov/c/gh/Laplusdestiny/plotly_extend_wrapper?style=flat&logo=codecov)](https://app.codecov.io/gh/Laplusdestiny/plotly_extend_wrapper)
5
- [![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/Laplusdestiny/plotly_extend_wrapper?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper/releases)
6
- [![PyPI - Version](https://img.shields.io/pypi/v/plotly_extend_wrapper?logo=pypi)](https://pypi.org/project/plotly-extend-wrapper/)
7
-
8
- Extended Python library for Plotly
9
-
10
- - **Simple Interface**: Create complex visualizations with just a few lines of code
11
- - **Pandas Integration**: Seamless integration with pandas DataFrames
12
- - **Multiple Plot Types**: Support for various chart types including pie charts, sunburst diagrams, and 3D surfaces
13
- - **Customization**: Easy plot customization through a unified interface
14
- - **Automatic Layout**: Smart default settings for common plot configurations
15
-
16
- For detailed documentation and examples, visit our [Documentation](https://laplusdestiny.github.io/plotly_extend_wrapper/)
17
-
18
- ## Install
19
-
20
- ``` bash
21
- pip install plotly-extend-wrapper
22
- ```
23
-
24
- ## Requirement
25
-
26
- - Python >= 3.9
27
- - Plotly >= 5.0.0
28
- - kaleido = 0.2.1
29
- - pandas >= 2.2.0
30
- - scipy >= 1.12.0
31
-
32
- ## Issue
33
-
34
- If there are some bugs, please make issue to tell me!
35
-
36
- [![GitHub issues](https://img.shields.io/github/issues/Laplusdestiny/plotly_extend_wrapper?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper/issues)
37
-
38
- ## License
39
-
40
- MIT License
41
-
42
- [![GitHub](https://img.shields.io/github/license/Laplusdestiny/plotly_extend_wrapper?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper?tab=MIT-1-ov-file#MIT-1-ov-file)
@@ -1,5 +0,0 @@
1
- from plotly_extend_wrapper.wrapper import *
2
- from plotly_extend_wrapper.updater import *
3
- from plotly_extend_wrapper.common import *
4
-
5
- __version__ = "1.3.0"
@@ -1,60 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: plotly-extend-wrapper
3
- Version: 1.4.0
4
- Author-email: Laplusdestiny <prayonshootingstars@gmail.com>
5
- Requires-Python: >=3.9
6
- Description-Content-Type: text/markdown
7
- License-File: LICENSE
8
- Requires-Dist: plotly>=5.12.0
9
- Requires-Dist: kaleido>=0.2.1
10
- Requires-Dist: pyarrow>=10.0.0
11
- Requires-Dist: pandas>=2.0.0
12
- Requires-Dist: scipy>=1.8.0
13
- Requires-Dist: numpy>=1.24.0
14
- Requires-Dist: nbformat>=4.2.0
15
- Provides-Extra: polars
16
- Requires-Dist: polars>=0.20.0; extra == "polars"
17
- Dynamic: license-file
18
-
19
- # plotly_extend_wrapper
20
-
21
- [![GitHub last commit (branch)](https://img.shields.io/github/last-commit/Laplusdestiny/plotly_extend_wrapper/main?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper/commits/main/)
22
- [![Codecov](https://img.shields.io/codecov/c/gh/Laplusdestiny/plotly_extend_wrapper?style=flat&logo=codecov)](https://app.codecov.io/gh/Laplusdestiny/plotly_extend_wrapper)
23
- [![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/Laplusdestiny/plotly_extend_wrapper?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper/releases)
24
- [![PyPI - Version](https://img.shields.io/pypi/v/plotly_extend_wrapper?logo=pypi)](https://pypi.org/project/plotly-extend-wrapper/)
25
-
26
- Extended Python library for Plotly
27
-
28
- - **Simple Interface**: Create complex visualizations with just a few lines of code
29
- - **Pandas Integration**: Seamless integration with pandas DataFrames
30
- - **Multiple Plot Types**: Support for various chart types including pie charts, sunburst diagrams, and 3D surfaces
31
- - **Customization**: Easy plot customization through a unified interface
32
- - **Automatic Layout**: Smart default settings for common plot configurations
33
-
34
- For detailed documentation and examples, visit our [Documentation](https://laplusdestiny.github.io/plotly_extend_wrapper/)
35
-
36
- ## Install
37
-
38
- ``` bash
39
- pip install plotly-extend-wrapper
40
- ```
41
-
42
- ## Requirement
43
-
44
- - Python >= 3.9
45
- - Plotly >= 5.0.0
46
- - kaleido = 0.2.1
47
- - pandas >= 2.2.0
48
- - scipy >= 1.12.0
49
-
50
- ## Issue
51
-
52
- If there are some bugs, please make issue to tell me!
53
-
54
- [![GitHub issues](https://img.shields.io/github/issues/Laplusdestiny/plotly_extend_wrapper?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper/issues)
55
-
56
- ## License
57
-
58
- MIT License
59
-
60
- [![GitHub](https://img.shields.io/github/license/Laplusdestiny/plotly_extend_wrapper?logo=github)](https://github.com/Laplusdestiny/plotly_extend_wrapper?tab=MIT-1-ov-file#MIT-1-ov-file)