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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudglancer
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: Simple interactive visualization of 3D point clouds
5
5
  Author-email: Your Name <your.email@example.com>
6
6
  License: MIT
@@ -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
- # Fix: Apply title if provided
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
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudglancer
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: Simple interactive visualization of 3D point clouds
5
5
  Author-email: Your Name <your.email@example.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cloudglancer"
7
- version = "0.1.1"
7
+ version = "0.1.3"
8
8
  description = "Simple interactive visualization of 3D point clouds"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
File without changes
File without changes
File without changes
File without changes