@@ -69,7 +70,8 @@ module HTML =
var img_jpg= d3.select('#jpg-export');
var data = [DATA];
var layout = [LAYOUT];
- Plotly.newPlot('[ID]', data, layout)
+ var config = [CONFIG];
+ Plotly.newPlot('[ID]', data, layout, config)
// static image in jpg format
.then(
@@ -109,33 +111,32 @@ module GenericChart =
open ChartDescription
type GenericChart =
- | Chart of Trace * Layout
- | MultiChart of Trace list * Layout
-
+ | Chart of Trace * Layout * Config
+ | MultiChart of Trace list * Layout * Config
let getTraces gChart =
match gChart with
- | Chart (trace,_) -> [trace]
- | MultiChart (traces,_) -> traces
+ | Chart (trace,_,_) -> [trace]
+ | MultiChart (traces,_,_) -> traces
let getLayout gChart =
match gChart with
- | Chart (_,layout) -> layout
- | MultiChart (_,layout) -> layout
+ | Chart (_,layout,_) -> layout
+ | MultiChart (_,layout,_) -> layout
let setLayout layout gChart =
match gChart with
- | Chart (t,_) -> Chart (t,layout)
- | MultiChart (t,_) -> MultiChart (t,layout)
+ | Chart (t,_,c) -> Chart (t,layout,c)
+ | MultiChart (t,_,c) -> MultiChart (t,layout,c)
// Adds a Layout function to the GenericChart
let addLayout layout gChart =
match gChart with
- | Chart (trace,l') ->
- Chart (trace, (DynObj.combine l' layout |> unbox) )
- | MultiChart (traces,l') ->
- MultiChart (traces, (DynObj.combine l' layout |> unbox))
+ | Chart (trace,l',c) ->
+ Chart (trace, (DynObj.combine l' layout |> unbox),c )
+ | MultiChart (traces,l',c) ->
+ MultiChart (traces, (DynObj.combine l' layout |> unbox),c)
/// Returns a tuple containing the width and height of a GenericChart's layout if the property is set, otherwise returns None
@@ -148,6 +149,15 @@ module GenericChart =
|(Some w, Some h) -> Some (w,h)
|_ -> None
+ let getConfig gChart =
+ match gChart with
+ | Chart (_,_,c) -> c
+ | MultiChart (_,_,c) -> c
+
+ let setConfig config gChart =
+ match gChart with
+ | Chart (t,l,_) -> Chart (t,l,config)
+ | MultiChart (t,l,_) -> MultiChart (t,l,config)
// // Adds multiple Layout functions to the GenericChart
// let addLayouts layouts gChart =
@@ -164,18 +174,20 @@ module GenericChart =
let combineLayouts (first:Layout) (second:Layout) =
DynObj.combine first second |> unbox
+ let combineConfigs (first:Config) (second:Config) =
+ DynObj.combine first second |> unbox
gCharts
|> Seq.reduce (fun acc elem ->
match acc,elem with
- | MultiChart (traces,l1),Chart (trace,l2) ->
- MultiChart (List.append traces [trace], combineLayouts l1 l2)
- | MultiChart (traces1,l1),MultiChart (traces2,l2) ->
- MultiChart (List.append traces1 traces2,combineLayouts l1 l2)
- | Chart (trace1,l1),Chart (trace2,l2) ->
- MultiChart ([trace1;trace2],combineLayouts l1 l2)
- | Chart (trace,l1),MultiChart (traces,l2) ->
- MultiChart (List.append [trace] traces ,combineLayouts l1 l2)
+ | MultiChart (traces,l1,c1),Chart (trace,l2,c2) ->
+ MultiChart (List.append traces [trace], combineLayouts l1 l2, combineConfigs c1 c2)
+ | MultiChart (traces1,l1,c1),MultiChart (traces2,l2,c2) ->
+ MultiChart (List.append traces1 traces2,combineLayouts l1 l2, combineConfigs c1 c2)
+ | Chart (trace1,l1,c1),Chart (trace2,l2,c2) ->
+ MultiChart ([trace1;trace2],combineLayouts l1 l2, combineConfigs c1 c2)
+ | Chart (trace,l1,c1),MultiChart (traces,l2,c2) ->
+ MultiChart (List.append [trace] traces ,combineLayouts l1 l2, combineConfigs c1 c2)
)
// let private materialzeLayout (layout:(Layout -> Layout) list) =
@@ -198,7 +210,10 @@ module GenericChart =
let layoutJson =
getLayout gChart
|> JsonConvert.SerializeObject
-
+ let configJson =
+ getConfig gChart
+ |> JsonConvert.SerializeObject
+
let dims = tryGetLayoutSize gChart
let width,height =
match dims with
@@ -213,6 +228,7 @@ module GenericChart =
.Replace("[ID]", guid)
.Replace("[DATA]", tracesJson)
.Replace("[LAYOUT]", layoutJson)
+ .Replace("[CONFIG]", configJson)
html
/// Converts a GenericChart to it HTML representation and set the size of the div
@@ -224,6 +240,9 @@ module GenericChart =
let layoutJson =
getLayout gChart
|> JsonConvert.SerializeObject
+ let configJson =
+ getConfig gChart
+ |> JsonConvert.SerializeObject
let html =
HTML.chart
@@ -232,6 +251,7 @@ module GenericChart =
.Replace("[HEIGHT]", string height)
.Replace("[DATA]", tracesJson)
.Replace("[LAYOUT]", layoutJson)
+ .Replace("[CONFIG]", configJson)
html
@@ -275,6 +295,7 @@ module GenericChart =
.Replace("[DATA]", tracesJson)
.Replace("[LAYOUT]", layoutJson)
.Replace("[IMAGEFORMAT]",format.ToString().ToLower())
+ .Replace("[CONFIG]","{}")
html
/// Converts a GenericChart to an image and embeds it into a html page
@@ -282,39 +303,46 @@ module GenericChart =
let html =
let chartMarkup =
toChartImage format gChart
- HTML.doc.Replace("[CHART]", chartMarkup)
+ HTML.doc
+ .Replace("[CHART]", chartMarkup)
+ .Replace("[CONFIG]","{}")
html
/// Creates a new GenericChart whose traces are the results of applying the given function to each of the trace of the GenericChart.
let mapTrace f gChart =
match gChart with
- | Chart (trace,layout) -> Chart (f trace,layout)
- | MultiChart (traces,layout) -> MultiChart (traces |> List.map f,layout)
+ | Chart (trace,layout,config) -> Chart (f trace,layout,config)
+ | MultiChart (traces,layout,config) -> MultiChart (traces |> List.map f,layout,config)
/// Creates a new GenericChart whose traces are the results of applying the given function to each of the trace of the GenericChart.
/// The integer index passed to the function indicates the index (from 0) of element being transformed.
let mapiTrace f gChart =
match gChart with
- | Chart (trace,layout) -> Chart (f 0 trace,layout)
- | MultiChart (traces,layout) -> MultiChart (traces |> List.mapi f,layout)
+ | Chart (trace,layout,config) -> Chart (f 0 trace,layout,config)
+ | MultiChart (traces,layout,config) -> MultiChart (traces |> List.mapi f,layout,config)
/// Returns the number of traces within the GenericChart
let countTrace gChart =
match gChart with
| Chart (_) -> 1
- | MultiChart (traces,_) -> traces |> Seq.length
+ | MultiChart (traces,_,_) -> traces |> Seq.length
/// Creates a new GenericChart whose traces are the results of applying the given function to each of the trace of the GenericChart.
let existsTrace (f:Trace->bool) gChart =
match gChart with
- | Chart (trace,_) -> f trace
- | MultiChart (traces,_) -> traces |> List.exists f
+ | Chart (trace,_,_) -> f trace
+ | MultiChart (traces,_,_) -> traces |> List.exists f
/// Converts from a trace object and a layout object into GenericChart
let ofTraceObject trace = //layout =
- GenericChart.Chart(trace, Layout() )
+ GenericChart.Chart(trace, Layout(), Config())
/// Converts from a list of trace objects and a layout object into GenericChart
let ofTraceObjects traces = // layout =
- GenericChart.MultiChart(traces, Layout() )
+ GenericChart.MultiChart(traces, Layout(), Config())
+
+ let mapLayout f gChart =
+ match gChart with
+ | Chart (trace,layout,config) -> Chart (trace,f layout,config)
+ | MultiChart (traces,layout,config) -> MultiChart (traces,f layout,config)
\ No newline at end of file
diff --git a/src/FSharp.Plotly/Layout.fs b/src/FSharp.Plotly/Layout.fs
index bc819f0ca..1785db525 100644
--- a/src/FSharp.Plotly/Layout.fs
+++ b/src/FSharp.Plotly/Layout.fs
@@ -58,14 +58,119 @@ type Margin() =
)
-/// Margin
+/// Text annotations inside a plot
type Annotation() =
inherit DynamicObj ()
/// Init Annotation type
- static member init (applyStyle:Annotation->Annotation) =
- Annotation() |> applyStyle
+ static member init
+ (
+ X : float,
+ Y : float,
+ ?XRef,
+ ?YRef,
+ ?ArrowTailX : float,
+ ?ArrowTailY : float,
+ ?ShowArrow : bool,
+ ?ArrowColor,
+ ?ArrowHead : StyleParam.ArrowHead,
+ ?ArrowSize : float,
+ ?ArrowWidth : float,
+ ?Z : float,
+ ?Text : string,
+ ?TextAngle : float,
+ ?Font : Font,
+ ?Width : float,
+ ?Height : float,
+ ?Opacity : float,
+ ?HorizontalAlign: StyleParam.HorizontalAlign,
+ ?VerticalAlign : StyleParam.VerticalAlign,
+ ?BGColor,
+ ?BorderColor,
+ ?Visible : bool
+ ) =
+ Annotation()
+ |> Annotation.style
+ (
+ X = X ,
+ Y = Y ,
+ ?XRef = XRef ,
+ ?YRef = YRef ,
+ ?ArrowTailX = ArrowTailX ,
+ ?ArrowTailY = ArrowTailY ,
+ ?ShowArrow = ShowArrow ,
+ ?ArrowColor = ArrowColor ,
+ ?ArrowHead = ArrowHead ,
+ ?ArrowSize = ArrowSize ,
+ ?ArrowWidth = ArrowWidth ,
+ ?Z = Z ,
+ ?Text = Text ,
+ ?TextAngle = TextAngle ,
+ ?Font = Font ,
+ ?Width = Width ,
+ ?Height = Height ,
+ ?Opacity = Opacity ,
+ ?HorizontalAlign = HorizontalAlign ,
+ ?VerticalAlign = VerticalAlign ,
+ ?BGColor = BGColor ,
+ ?BorderColor = BorderColor ,
+ ?Visible = Visible
+ )
+ static member style
+ (
+ X : float,
+ Y : float,
+ ?XRef,
+ ?YRef,
+ ?ArrowTailX : float,
+ ?ArrowTailY : float,
+ ?ShowArrow : bool,
+ ?ArrowColor,
+ ?ArrowHead : StyleParam.ArrowHead,
+ ?ArrowSize : float,
+ ?ArrowWidth : float,
+ ?Z : float,
+ ?Text : string,
+ ?TextAngle : float,
+ ?Font : Font,
+ ?Width : float,
+ ?Height : float,
+ ?Opacity : float,
+ ?HorizontalAlign: StyleParam.HorizontalAlign,
+ ?VerticalAlign : StyleParam.VerticalAlign,
+ ?BGColor,
+ ?BorderColor,
+ ?Visible : bool
+
+ ) =
+ (fun (ann:Annotation) ->
+ X |> DynObj.setValue ann "x"
+ Y |> DynObj.setValue ann "y"
+ XRef |> DynObj.setValueOpt ann "xref"
+ YRef |> DynObj.setValueOpt ann "yref"
+ ArrowTailX |> DynObj.setValueOpt ann "ax"
+ ArrowTailY |> DynObj.setValueOpt ann "ay"
+ ArrowHead |> DynObj.setValueOptBy ann "arrowhead" StyleParam.ArrowHead.convert
+ ArrowSize |> DynObj.setValueOpt ann "arrowsize"
+ ArrowWidth |> DynObj.setValueOpt ann "arrowwidth"
+ ShowArrow |> DynObj.setValueOpt ann "showarrow"
+ ArrowColor |> DynObj.setValueOpt ann "arrowcolor"
+ Z |> DynObj.setValueOpt ann "z"
+ Text |> DynObj.setValueOpt ann "text"
+ TextAngle |> DynObj.setValueOpt ann "textangle"
+ Font |> DynObj.setValueOpt ann "font"
+ Width |> DynObj.setValueOpt ann "width"
+ Height |> DynObj.setValueOpt ann "height"
+ Opacity |> DynObj.setValueOpt ann "opacity"
+ HorizontalAlign |> DynObj.setValueOptBy ann "align" StyleParam.HorizontalAlign.convert
+ VerticalAlign |> DynObj.setValueOptBy ann "valign" StyleParam.VerticalAlign.convert
+ BGColor |> DynObj.setValueOpt ann "bgcolor"
+ BorderColor |> DynObj.setValueOpt ann "bordercolor"
+ Visible |> DynObj.setValueOpt ann "visible"
+
+ ann
+ )
/// Layout
type Layout() =
@@ -84,7 +189,7 @@ type Layout() =
//?xAxis : Axis.LinearAxis,
//?yAxis : Axis.LinearAxis,
?Legend ,
- ?Annotations : Annotation ,
+ ?Annotations : seq
,
?Margin ,
?Paper_bgcolor ,
@@ -273,4 +378,14 @@ type Layout() =
layout
)
+ static member AddScene
+ (
+ name: string,
+ scene:Scene
+ ) =
+ (fun (layout:Layout) ->
+ scene |> DynObj.setValue layout name
+ layout
+ )
+
diff --git a/src/FSharp.Plotly/Scene.fs b/src/FSharp.Plotly/Scene.fs
index 58c397576..9a336cffa 100644
--- a/src/FSharp.Plotly/Scene.fs
+++ b/src/FSharp.Plotly/Scene.fs
@@ -1,5 +1,5 @@
namespace FSharp.Plotly
-
+open FSharp.Plotly.StyleParam
/// Scene
@@ -14,9 +14,9 @@ type Scene() =
?yAxis ,
?zAxis ,
?isSubplotObj ,
- ?BgColor
+ ?BgColor ,
// ?Camera ,
- // ?Domain ,
+ (?Domain : Domain)
// ?Aspectmode ,
// ?Aspectratio
) =
@@ -27,7 +27,8 @@ type Scene() =
?yAxis = yAxis ,
?zAxis = zAxis ,
?isSubplotObj = isSubplotObj ,
- ?BgColor = BgColor
+ ?BgColor = BgColor ,
+ ?Domain = Domain
)
// []
@@ -39,16 +40,16 @@ type Scene() =
?yAxis:Axis.LinearAxis,
?zAxis:Axis.LinearAxis,
?isSubplotObj ,
- ?BgColor
+ ?BgColor ,
// ?Camera ,
- // ?Domain ,
+ ?Domain:Domain
// ?Aspectmode ,
// ?Aspectratio
) =
(fun (scene:Scene) ->
isSubplotObj |> DynObj.setValueOpt scene "_isSubplotObj"
BgColor |> DynObj.setValueOpt scene "bgcolor"
-
+ Domain |> DynObj.setValueOpt scene "domain"
// Update
xAxis |> DynObj.setValueOpt scene "xaxis"
yAxis |> DynObj.setValueOpt scene "yaxis"
diff --git a/src/FSharp.Plotly/Script.fsx b/src/FSharp.Plotly/Script.fsx
deleted file mode 100644
index c0b317197..000000000
--- a/src/FSharp.Plotly/Script.fsx
+++ /dev/null
@@ -1,33 +0,0 @@
-//#I "./bin/Debug"
-//#r "./bin/Debug/netstandard2.0/Newtonsoft.Json.dll"
-#r "./bin/Debug/netstandard2.0/FSharp.Plotly.dll"
-#r "netstandard"
-
-open FSharp.Plotly
-
-
-let x = seq [1.; 2.; 3.; 4.; 5.; 6.; 7.; 8.; 9.; 10.; ] // 9.; 8.; 7.; 6.; 5.; 4.; 3.; 2.; 1.]
-let y = seq [5.; 2.5; 5.; 7.5; 5.; 2.5; 7.5; 4.5; 5.5; 5.]
-let y' = seq [2.; 1.5; 5.; 1.5; 3.; 2.5; 2.5; 1.5; 3.5; 1.]
-
-Chart.Spline(x,y',Name="spline")
-//|> Chart.withYError(Options.Error(Array=[1.; 2.; 3.; 4.; 5.; 6.; 7.; 8.; 9.; 10.; ]))
-
-
-//|> Chart.withLineStyle(Width=2,Dash=StyleParam.DrawingStyle.Dot)
-//|> Chart.withLineOption(Options.Line(Width=10))
-//|> Chart.withX_AxisStyle("x axis title")
-//|> Chart.withY_AxisStyle("y axis title")
-//|> layoutJson
-//|> GenericChart.toChartHtmlWithSize 500 500
-
-//|> Chart.ShowAsImage StyleParam.ImageFormat.SVG
-|> Chart.ShowAsImage StyleParam.ImageFormat.SVG
-
-
-
-
-
-
-
-
diff --git a/src/FSharp.Plotly/StyleParams.fs b/src/FSharp.Plotly/StyleParams.fs
index b604c2901..2e7a2b59d 100644
--- a/src/FSharp.Plotly/StyleParams.fs
+++ b/src/FSharp.Plotly/StyleParams.fs
@@ -786,4 +786,35 @@ module StyleParam =
| PNG -> "png"
| JPEG -> "jpeg"
- static member convert = ImageFormat.toString >> box
\ No newline at end of file
+ static member convert = ImageFormat.toString >> box
+
+ type HorizontalAlign =
+ |Left |Center |Right
+ static member toString = function
+ | Left -> "left"
+ | Center-> "center"
+ | Right -> "right"
+
+ static member convert = HorizontalAlign.toString >> box
+
+ type VerticalAlign =
+ |Top |Middle |Bottom
+ static member toString = function
+ | Top -> "top"
+ | Middle -> "middle"
+ | Bottom -> "bottom"
+
+ static member convert = VerticalAlign.toString >> box
+
+ type ArrowHead =
+ |TriangleShort |TriangleTall |Barbed |SimpleShort |SimpleTall |Cirle |Square |LineOnly
+ static member toEnum = function
+ |TriangleShort -> 1
+ |TriangleTall -> 2
+ |Barbed -> 3
+ |SimpleShort -> 4
+ |SimpleTall -> 5
+ |Cirle -> 6
+ |Square -> 7
+ |LineOnly -> 8
+ static member convert = ArrowHead.toEnum >> box
\ No newline at end of file
diff --git a/src/FSharp.Plotly/Templates.fs b/src/FSharp.Plotly/Templates.fs
new file mode 100644
index 000000000..a0b1d709a
--- /dev/null
+++ b/src/FSharp.Plotly/Templates.fs
@@ -0,0 +1 @@
+namespace FSharp.Plotly
\ No newline at end of file
diff --git a/src/FSharp.Plotly/TestScript.fsx b/src/FSharp.Plotly/TestScript.fsx
new file mode 100644
index 000000000..1ca8ebae8
--- /dev/null
+++ b/src/FSharp.Plotly/TestScript.fsx
@@ -0,0 +1,69 @@
+//#I "./bin/Debug"
+//#r "./bin/Debug/netstandard2.0/Newtonsoft.Json.dll"
+#r @"..\..\bin\FSharp.Plotly\netstandard2.0\FSharp.Plotly.dll"
+#r "netstandard"
+
+open FSharp.Plotly
+
+
+let x = seq [1.; 2.; 3.; 4.; 5.; 6.; 7.; 8.; 9.; 10.; ] // 9.; 8.; 7.; 6.; 5.; 4.; 3.; 2.; 1.]
+let y = seq [5.; 2.5; 5.; 7.5; 5.; 2.5; 7.5; 4.5; 5.5; 5.]
+let y' = seq [2.; 1.5; 5.; 1.5; 3.; 2.5; 2.5; 1.5; 3.5; 1.]
+
+Chart.Spline(x,y',Name="spline")
+|> Chart.withConfig
+ (Config.init
+ (
+ Autosizable = true,
+ ShowEditInChartStudio = true,
+ ToImageButtonOptions =
+ ToImageButtonOptions.init
+ (
+ Format = StyleParam.ImageFormat.SVG,
+ Filename = "SOOOOS"
+ )
+ )
+ )
+|> Chart.Show
+//|> Chart.withYError(Options.Error(Array=[1.; 2.; 3.; 4.; 5.; 6.; 7.; 8.; 9.; 10.; ]))
+
+
+//|> Chart.withLineStyle(Width=2,Dash=StyleParam.DrawingStyle.Dot)
+//|> Chart.withLineOption(Options.Line(Width=10))
+//|> Chart.withX_AxisStyle("x axis title")
+//|> Chart.withY_AxisStyle("y axis title")
+//|> layoutJson
+//|> GenericChart.toChartHtmlWithSize 500 500
+
+//|> Chart.ShowAsImage StyleParam.ImageFormat.SVG
+
+let dims' =
+ [
+ Dimensions.init(["Cat1";"Cat1";"Cat1";"Cat1";"Cat2";"Cat2";"Cat3"],Label="A")
+ Dimensions.init([0;1;0;1;0;0;0],Label="B",TickText=["YES","NO"])
+ ]
+
+Chart.ParallelCategories(dims=dims',Color=[0.;1.;0.;1.;0.;0.;0.],Colorscale = StyleParam.Colorscale.Blackbody)
+|> Chart.Show
+
+let data3d = List.zip3 [0 .. 15] [0 .. 15] [0 .. 15]
+let data2d = List.zip [0 .. 15] [0 .. 15]
+
+[
+ Chart.Point (data2d)
+ Chart.Scatter3d(xyz=data3d,mode = StyleParam.Mode.Markers)
+ Chart.Scatter3d(xyz=data3d,mode = StyleParam.Mode.Markers)
+ Chart.Scatter3d(xyz=data3d,mode = StyleParam.Mode.Markers)
+ Chart.Scatter3d(xyz=data3d,mode = StyleParam.Mode.Markers)
+]
+|> Chart.Stack 2
+|> Chart.Show
+
+
+
+
+
+
+
+
+
diff --git a/src/FSharp.Plotly/Trace.fs b/src/FSharp.Plotly/Trace.fs
index 092580648..576761e5c 100644
--- a/src/FSharp.Plotly/Trace.fs
+++ b/src/FSharp.Plotly/Trace.fs
@@ -54,7 +54,6 @@ module Trace =
let initHistogram2d (applyStyle:Trace->Trace) =
Trace("histogram2d") |> applyStyle
-
/// Init trace for 2d-histogram contour
let initHistogram2dContour (applyStyle:Trace->Trace) =
Trace("histogram2dcontour") |> applyStyle
@@ -63,6 +62,10 @@ module Trace =
let initParallelCoord (applyStyle:Trace->Trace) =
Trace("parcoords") |> applyStyle
+ // Init trace for a parallel category plot
+ let initParallelCategories (applyStyle: Trace -> Trace) =
+ Trace("parcats") |> applyStyle
+
/// Init trace for a choropleth map
let initChoroplethMap (applyStyle:Trace->Trace) =
Trace("choropleth") |> applyStyle
@@ -884,7 +887,28 @@ module Trace =
// out ->
parcoords
)
-
+
+ static member ParallelCategories
+ (
+ ?Dimensions : seq,
+ ?Line ,
+ ?Domain ,
+ ?Labelfont ,
+ ?Tickfont : Font,
+ ?Rangefont : Font
+ ) =
+ (fun (parcats:('T :> Trace)) ->
+
+ Dimensions |> DynObj.setValueOpt parcats "dimensions"
+ Line |> DynObj.setValueOpt parcats "line"
+ Domain |> DynObj.setValueOpt parcats "domain"
+ Labelfont |> DynObj.setValueOpt parcats "labelfont"
+ Tickfont |> DynObj.setValueOpt parcats "tickfont"
+ Rangefont |> DynObj.setValueOpt parcats "rangefont"
+
+ // out ->
+ parcats
+ )
// Applies the styles of choropleth map plot to TraceObjects
static member ChoroplethMap
diff --git a/src/FSharp.Plotly/Trace3d.fs b/src/FSharp.Plotly/Trace3d.fs
index 22e98afd9..c79014770 100644
--- a/src/FSharp.Plotly/Trace3d.fs
+++ b/src/FSharp.Plotly/Trace3d.fs
@@ -41,7 +41,7 @@ module Trace3d =
?Surfaceaxis,
?Surfacecolor,
?Projection : Projection,
- ?Scene,
+ ?Scene : string,
?Error_y: Error,
?Error_x: Error,
?Error_z: Error,
@@ -49,9 +49,9 @@ module Trace3d =
?Ysrc : string,
?Zsrc : string
) =
- //(fun (scatter:('T :> Trace3d)) ->
- (fun (scatter: Trace3d) ->
- //scatter.set_type plotType
+ //(fun (scatter:('T :> Trace3d)) ->
+ (fun (scatter: Trace3d) ->
+ //scatter.set_type plotType
X |> DynObj.setValueOpt scatter "x"
Y |> DynObj.setValueOpt scatter "y"
Z |> DynObj.setValueOpt scatter "z"
@@ -218,4 +218,15 @@ module Trace3d =
mesh3d
)
+ static member setScene
+ (
+ ?SceneName:string
+ ) =
+ fun (trace:Trace3d) ->
+ SceneName |> DynObj.setValueOpt trace "scene"
+ trace
+
+
+
+