Simulation plot

Hi everyone,

I am new to plotly. I have this yellow curve on X-Y plane. I picked 3 points on the curve denoted by A, B, C. Red, green and pink lines show their simulation on 3 paths along Z axis. Is it possible to create a 3-D plot like below? I can massage the data in any way required. I will really appreciate any tips.

Hi @PoThePanda ,

Welcome to the community!

Yes, I think it is possible.

Maybe you want to jump to docs link below, to get example of line 3d chart.

For arrow symbol in 3DScatter you can use Cone plot, because as far as I know you cannot create arrow symbol using 3DScatter.

For Annotation text (A,B,C) you can refer to 3D Annotations link below,

And the image below is the example that I create using dummy data as close as your image sample.

If you provide the data, it will be much better.

Hope this help.

1 Like

Hi @farispriadi,

Thank you very much for the pointers. I don’t need the arrow head or the texts, those were just for explanation.
My data looks like below:

Data for yellow curve is a dict with key=int and value=float

{
1: 0.02,
2: 0.05,  # Point A
3: 0.08,
4: 0.03,  # Point B
5: 0.09,
6: 0.11   # Point C
}

Let’s say, I pick those three points on the curve i.e. A, B and C and simulate 3 paths (red, green, pink) from each points. I take 4 time steps (kinks on the red, green, pink lines) along Z-axis. I am storing data for each time step like below:

Data is a dictionary of key=time-steps, value=3x3 numpy array (path x points on curve).

Structure of the data:

{
time-step-1: [  [ path-1-value-of-point-A  path-1-value-of-point-B  path-1-value-of-point-C ]  [ path-2-value-of-point-A  path-2-value-of-point-B  path-2-value-of-point-C ]  [ path-3-value-of-point-A  path-3-value-of-point-B  path-3-value-of-point-C ] ]
time-step-2: [  [ path-1-value-of-point-A  path-1-value-of-point-B  path-1-value-of-point-C ]  [ path-2-value-of-point-A  path-2-value-of-point-B  path-2-value-of-point-C ]  [ path-3-value-of-point-A  path-3-value-of-point-B  path-3-value-of-point-C ] ]
.
.
.
}

Example with 4 time steps of 5 units length each:

{
5:   [  [ 0.02 0.04 0.06 ]  [ 0.01 0.08 0.6 ]  [ 0.03 0.05 0.09 ]  ]
10:  [  [ 0.09 0.04 0.05 ]  [ 0.07 0.02 0.1 ]  [ 0.01 0.08 0.04 ]  ]
15:  [  [ 0.01 0.03 0.06 ]  [ 0.01 0.08 0.6 ]  [ 0.04 0.01 0.02 ]  ]
20:  [  [ 0.09 0.07 0.06 ]  [ 0.02 0.05 0.6 ]  [ 0.06 0.02 0.01 ]  ]
}

Sorry if I confused you. I will try to follow your hints as well.

The dict.keys() are the x-axis values, the dict.values() are the y-axis values?

BTW, maybe interesting:

1 Like

Hi @PoThePanda ,

Thanks for sharing the data, but unfortunately I still does not fully understand your data.
Assuming yellow curve data dict as x (keys) and y(values) axis, like @AIMPED has questioned
and the yellow curve β€œz” axis is a list of zeros.

I end up create this 3d graph by my interpretation from your previous post like displayed below.

Like you see, the 3 paths of each point are overlapping, because each path has constant x and y axis.

Please response if you find me has misunderstood your data.
Thanks.