@@ -263,44 +263,52 @@ def create_trisurf(
263
263
aspectratio = None ,
264
264
):
265
265
"""
266
- Returns figure for a triangulated surface plot
267
-
268
- :param (array) x: data values of x in a 1D array
269
- :param (array) y: data values of y in a 1D array
270
- :param (array) z: data values of z in a 1D array
271
- :param (array) simplices: an array of shape (ntri, 3) where ntri is
272
- the number of triangles in the triangularization. Each row of the
273
- array contains the indicies of the verticies of each triangle
274
- :param (str|tuple|list) colormap: either a plotly scale name, an rgb
275
- or hex color, a color tuple or a list of colors. An rgb color is
276
- of the form 'rgb(x, y, z)' where x, y, z belong to the interval
277
- [0, 255] and a color tuple is a tuple of the form (a, b, c) where
278
- a, b and c belong to [0, 1]. If colormap is a list, it must
279
- contain the valid color types aforementioned as its members
280
- :param (bool) show_colorbar: determines if colorbar is visible
281
- :param (list|array) scale: sets the scale values to be used if a non-
282
- linearly interpolated colormap is desired. If left as None, a
283
- linear interpolation between the colors will be excecuted
284
- :param (function|list) color_func: The parameter that determines the
285
- coloring of the surface. Takes either a function with 3 arguments
286
- x, y, z or a list/array of color values the same length as
287
- simplices. If None, coloring will only depend on the z axis
288
- :param (str) title: title of the plot
289
- :param (bool) plot_edges: determines if the triangles on the trisurf
290
- are visible
291
- :param (bool) showbackground: makes background in plot visible
292
- :param (str) backgroundcolor: color of background. Takes a string of
293
- the form 'rgb(x,y,z)' x,y,z are between 0 and 255 inclusive
294
- :param (str) gridcolor: color of the gridlines besides the axes. Takes
295
- a string of the form 'rgb(x,y,z)' x,y,z are between 0 and 255
296
- inclusive
297
- :param (str) zerolinecolor: color of the axes. Takes a string of the
298
- form 'rgb(x,y,z)' x,y,z are between 0 and 255 inclusive
299
- :param (str) edges_color: color of the edges, if plot_edges is True
300
- :param (int|float) height: the height of the plot (in pixels)
301
- :param (int|float) width: the width of the plot (in pixels)
302
- :param (dict) aspectratio: a dictionary of the aspect ratio values for
303
- the x, y and z axes. 'x', 'y' and 'z' take (int|float) values
266
+ Returns figure for a triangulated surface plot.
267
+
268
+ Parameters
269
+ ----------
270
+ x : array
271
+ Data values of x in a 1D array.
272
+ y : array
273
+ Data values of y in a 1D array.
274
+ z : array
275
+ Data values of z in a 1D array.
276
+ simplices : array
277
+ An array of shape (ntri, 3) where ntri is the number of triangles in the triangularization. Each row of the
278
+ array contains the indices of the vertices of each triangle.
279
+ colormap : str, tuple, or list
280
+ Either a plotly scale name, an rgb or hex color, a color tuple, or a list of colors. An rgb color is of the form
281
+ 'rgb(x, y, z)' where x, y, z belong to the interval [0, 255] and a color tuple is a tuple of the form (a, b, c)
282
+ where a, b, and c belong to [0, 1]. If colormap is a list, it must contain the valid color types aforementioned as
283
+ its members.
284
+ show_colorbar : bool
285
+ Determines if colorbar is visible.
286
+ scale : list or array
287
+ Sets the scale values to be used if a non-linearly interpolated colormap is desired. If left as None, a linear
288
+ interpolation between the colors will be executed.
289
+ color_func : function or list
290
+ The parameter that determines the coloring of the surface. Takes either a function with 3 arguments x, y, z or a
291
+ list/array of color values the same length as simplices. If None, coloring will only depend on the z axis.
292
+ title : str
293
+ Title of the plot.
294
+ plot_edges : bool
295
+ Determines if the triangles on the trisurf are visible.
296
+ showbackground : bool
297
+ Makes background in plot visible.
298
+ backgroundcolor : str
299
+ Color of background. Takes a string of the form 'rgb(x,y,z)' where x, y, z are between 0 and 255 inclusive.
300
+ gridcolor : str
301
+ Color of the gridlines besides the axes. Takes a string of the form 'rgb(x,y,z)' where x, y, z are between 0 and 255 inclusive.
302
+ zerolinecolor : str
303
+ Color of the axes. Takes a string of the form 'rgb(x,y,z)' where x, y, z are between 0 and 255 inclusive.
304
+ edges_color : str
305
+ Color of the edges, if plot_edges is True.
306
+ height : int or float
307
+ The height of the plot (in pixels).
308
+ width : int or float
309
+ The width of the plot (in pixels).
310
+ aspectratio : dict
311
+ A dictionary of the aspect ratio values for the x, y, and z axes. 'x', 'y', and 'z' take int or float values.
304
312
305
313
Example 1: Sphere
306
314
0 commit comments