You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Facing issue in converting the example such as https://plotly.com/python/3d-volume-plots/. Found no function which give data equivalent to data generated by numpy mgrid. Tried to find way but did not work.
open System
open Plotly.NET
let N = 50
let rnd = System.Random()
let mirroredXAxis =
Axis.LinearAxis.init(
Showspikes = false,
Backgroundcolor ="rgb(229, 236, 246)",
Showbackground=true
)
let mirroredLogYAxis =
Axis.LinearAxis.init(
Showspikes = false,
Backgroundcolor ="rgb(229, 236, 246)",
Showbackground=true
)
let mirroredZAxis =
Axis.LinearAxis.init(
Showspikes = false,
Backgroundcolor ="rgb(229, 236, 246)",
Showbackground=true
)
let margin =Margin.init(Left =10.0, Bottom=10.0,Top =10.0, Right = 20.0 )
let layout = Layout.init(Width= 700., Margin=margin)
let x = [-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-2.666666666666667;-2.666666666666667;-2.666666666666667;-2.666666666666667;-2.666666666666667;-2.666666666666667;-2.666666666666667;-2.666666666666667;-2.666666666666667;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0]
let y =[-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-2.666666666666667;-2.666666666666667;-2.666666666666667;-2.666666666666667;-2.666666666666667;-2.666666666666667;-2.666666666666667;-2.666666666666667;-2.666666666666667;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0]
let z =[-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-8.0;-2.666666666666667;-2.666666666666667;-2.666666666666667;-2.666666666666667;-2.666666666666667;-2.666666666666667;-2.666666666666667;-2.666666666666667;-2.666666666666667;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0;8.0]
let value =[0.00015530955861889912;0.004994853639720335;0.004994853639720164;0.00015530955861889912;0.004994853639720335;0.005865742088537837;0.005865742088537603;0.004994853639720335;0.004994853639720164;0.005865742088537603;0.0058657420885372515;0.004994853639720164;004994853639720335;0.004994853639720164;0.005865742088537603;0.005865]
let findAllIndices predicate =
Array.indexed
>> Array.filter (snd >> predicate)
>> Array.map fst
let volume3d =
Trace3d.initVolume (fun volume3d ->
volume3d?x <- x
volume3d?y <-y
volume3d?z <-z
volume3d?value <-x
volume3d?isomin <-0.1
volume3d?isomax <-0.8
volume3d?opacity<-0.5
volume3d?color <- "lightpink"
volume3d
)
|> GenericChart.ofTraceObject
|> Chart.withLayout layout
The text was updated successfully, but these errors were encountered:
please wait until the next release is live today and take a look at the code samples posted in the recently merged PR here for emulating mgrid and creating all of the missing 3D charts: #125 (comment)
Description
Facing issue in converting the example such as https://plotly.com/python/3d-volume-plots/. Found no function which give data equivalent to data generated by numpy mgrid. Tried to find way but did not work.
The text was updated successfully, but these errors were encountered: