Repository navigation
Expand file tree
/
Copy pathCone.cs
More file actions
92 lines (90 loc) · 4.82 KB
/
Copy pathCone.cs
File metadata and controls
92 lines (90 loc) · 4.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
using System;
using System.Collections.Generic;
using Plotly.NET;
using Plotly.NET.LayoutObjects;
using Plotly.NET.TraceObjects;
using static Plotly.NET.StyleParam;
namespace Plotly.NET.CSharp;
public static partial class Chart
{
/// <summary>
/// Creates a cone plot, typically used to visualize vector fields.
///
/// Specify a vector field using 6 1D arrays:
///
/// 3 position arrays `x`, `y` and `z` and
///
/// 3 vector component arrays `u`, `v`, `w`.
///
/// The cones are drawn exactly at the positions given by `x`, `y` and `z`.
/// </summary>
/// <param name="x">Sets the x coordinates of the vector field and of the displayed cones.</param>
/// <param name="y">Sets the y coordinates of the vector field and of the displayed cones.</param>
/// <param name="z">Sets the z coordinates of the vector field and of the displayed cones.</param>
/// <param name="u">Sets the x components of the vector field.</param>
/// <param name="v">Sets the y components of the vector field.</param>
/// <param name="w">Sets the z components of the vector field.</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the opactity of the trace</param>
/// <param name="Text">Sets a text associated with each datum</param>
/// <param name="MultiText">Sets individual text for each datum</param>
/// <param name="ColorScale">Sets the colorscale</param>
/// <param name="ShowScale">Whether or not to show the colorbar/colorscale</param>
/// <param name="ColorBar">Sets the colorbar</param>
/// <param name="SizeMode">Determines whether `sizeref` is set as a "scaled" (i.e unitless) scalar (normalized by the max u/v/w norm in the vector field) or as "absolute" value (in the same units as the vector field).</param>
/// <param name="ConeAnchor">Sets the cones' anchor with respect to their x/y/z positions. Note that "cm" denote the cone's center of mass which corresponds to 1/4 from the tail to tip.</param>
/// <param name="CameraProjectionType">Sets the camera projection type of this trace.</param>
/// <param name="Camera">Sets the camera of this trace.</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
public static GenericChart Cone<XType, YType, ZType, UType, VType, WType, TextType>(
IEnumerable<XType> x,
IEnumerable<YType> y,
IEnumerable<ZType> z,
IEnumerable<UType> u,
IEnumerable<VType> v,
IEnumerable<WType> w,
Optional<string> Name = default,
Optional<bool> ShowLegend = default,
Optional<double> Opacity = default,
Optional<TextType> Text = default,
Optional<IEnumerable<TextType>> MultiText = default,
Optional<StyleParam.Colorscale> ColorScale = default,
Optional<bool> ShowScale = default,
Optional<ColorBar> ColorBar = default,
Optional<StyleParam.ConeSizeMode> SizeMode = default,
Optional<StyleParam.ConeAnchor> ConeAnchor = default,
Optional<StyleParam.CameraProjectionType> CameraProjectionType = default,
Optional<Camera> Camera = default,
Optional<bool> UseDefaults = default
)
where XType : IConvertible
where YType : IConvertible
where ZType : IConvertible
where UType : IConvertible
where VType : IConvertible
where WType : IConvertible
where TextType : IConvertible
=>
Plotly.NET.Chart3D_VectorField.Chart.Cone<XType, YType, ZType, UType, VType, WType, TextType>(
x: x,
y: y,
z: z,
u: u,
v: v,
w: w,
Name: Name.ToOption(),
ShowLegend: ShowLegend.ToOption(),
Opacity: Opacity.ToOption(),
Text: Text.ToOption(),
MultiText: MultiText.ToOption(),
ColorScale: ColorScale.ToOption(),
ShowScale: ShowScale.ToOption(),
ColorBar: ColorBar.ToOption(),
SizeMode: SizeMode.ToOption(),
ConeAnchor: ConeAnchor.ToOption(),
CameraProjectionType: CameraProjectionType.ToOption(),
Camera: Camera.ToOption(),
UseDefaults: UseDefaults.ToOption()
);
}