cloudglancer 0.1.1__tar.gz → 0.1.3__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.
- {cloudglancer-0.1.1/cloudglancer.egg-info → cloudglancer-0.1.3}/PKG-INFO +1 -1
- {cloudglancer-0.1.1 → cloudglancer-0.1.3}/cloudglancer/scatter.py +17 -3
- {cloudglancer-0.1.1 → cloudglancer-0.1.3/cloudglancer.egg-info}/PKG-INFO +1 -1
- {cloudglancer-0.1.1 → cloudglancer-0.1.3}/pyproject.toml +1 -1
- {cloudglancer-0.1.1 → cloudglancer-0.1.3}/LICENSE +0 -0
- {cloudglancer-0.1.1 → cloudglancer-0.1.3}/MANIFEST.in +0 -0
- {cloudglancer-0.1.1 → cloudglancer-0.1.3}/README.md +0 -0
- {cloudglancer-0.1.1 → cloudglancer-0.1.3}/cloudglancer/__init__.py +0 -0
- {cloudglancer-0.1.1 → cloudglancer-0.1.3}/cloudglancer.egg-info/SOURCES.txt +0 -0
- {cloudglancer-0.1.1 → cloudglancer-0.1.3}/cloudglancer.egg-info/dependency_links.txt +0 -0
- {cloudglancer-0.1.1 → cloudglancer-0.1.3}/cloudglancer.egg-info/requires.txt +0 -0
- {cloudglancer-0.1.1 → cloudglancer-0.1.3}/cloudglancer.egg-info/top_level.txt +0 -0
- {cloudglancer-0.1.1 → cloudglancer-0.1.3}/setup.cfg +0 -0
- {cloudglancer-0.1.1 → cloudglancer-0.1.3}/tests/test_scatter.py +0 -0
|
@@ -14,7 +14,8 @@ def plot(
|
|
|
14
14
|
color_map: Optional[Union[List[str], float]] = None,
|
|
15
15
|
batch_colors: Optional[List[str]] = None,
|
|
16
16
|
size: float = 1.5,
|
|
17
|
-
title: Optional[str] = None
|
|
17
|
+
title: Optional[str] = None,
|
|
18
|
+
aspectmode: Optional[str] = 'data'
|
|
18
19
|
) -> Figure:
|
|
19
20
|
"""
|
|
20
21
|
Render an interactive 3D scatter plot using Plotly.
|
|
@@ -35,6 +36,7 @@ def plot(
|
|
|
35
36
|
Only used when points is 3D. Defaults to Plotly's qualitative palette.
|
|
36
37
|
size (float, optional): Size of the scatter plot markers. Default is 1.5.
|
|
37
38
|
title (str, optional): Title of the plot.
|
|
39
|
+
aspectmode (str, optional): Aspect ratio mode for the 3D scene. Default is 'data' (Check plotly docs for available modes).
|
|
38
40
|
|
|
39
41
|
Returns:
|
|
40
42
|
plotly.graph_objects.Figure: Interactive 3D scatter plot.
|
|
@@ -99,14 +101,19 @@ def plot(
|
|
|
99
101
|
|
|
100
102
|
fig.update_traces(marker=dict(size=size))
|
|
101
103
|
|
|
102
|
-
|
|
104
|
+
fig.update_layout(
|
|
105
|
+
scene=dict(
|
|
106
|
+
aspectmode=aspectmode
|
|
107
|
+
)
|
|
108
|
+
)
|
|
109
|
+
|
|
103
110
|
if title:
|
|
104
111
|
fig.update_layout(title=title)
|
|
105
112
|
|
|
106
113
|
return fig
|
|
107
114
|
|
|
108
115
|
|
|
109
|
-
def combine_plots(figs: List[Figure], rows: int = 1, cols: int = 2) -> Figure:
|
|
116
|
+
def combine_plots(figs: List[Figure], rows: int = 1, cols: int = 2, aspectmode: Optional[str] = 'data') -> Figure:
|
|
110
117
|
"""
|
|
111
118
|
Combine multiple 3D plots into a single figure with subplots.
|
|
112
119
|
|
|
@@ -114,6 +121,7 @@ def combine_plots(figs: List[Figure], rows: int = 1, cols: int = 2) -> Figure:
|
|
|
114
121
|
figs (list): List of Plotly figures to combine.
|
|
115
122
|
rows (int, optional): Number of rows in the subplot grid. Default is 1.
|
|
116
123
|
cols (int, optional): Number of columns in the subplot grid. Default is 2.
|
|
124
|
+
aspectmode (str, optional): Aspect ratio mode for the 3D scene. Default is 'data' (Check plotly docs for available modes).
|
|
117
125
|
|
|
118
126
|
Returns:
|
|
119
127
|
plotly.graph_objects.Figure: Combined figure with all plots arranged in a grid.
|
|
@@ -150,6 +158,12 @@ def combine_plots(figs: List[Figure], rows: int = 1, cols: int = 2) -> Figure:
|
|
|
150
158
|
for trace in fig.data:
|
|
151
159
|
combined_fig.add_trace(trace, row=(i // cols) + 1, col=(i % cols) + 1)
|
|
152
160
|
|
|
161
|
+
fig.update_layout(
|
|
162
|
+
scene=dict(
|
|
163
|
+
aspectmode=aspectmode
|
|
164
|
+
)
|
|
165
|
+
)
|
|
166
|
+
|
|
153
167
|
combined_fig.update_layout(
|
|
154
168
|
margin=dict(l=0, r=0, t=0, b=0)
|
|
155
169
|
)
|
|
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
|