Skip to content

Wrong position for 3D Plot with more then one 3D plot in a Grid #413

Closed
@Nick135

Description

@Nick135

Description

Wrong position for 3D plot when more than one 3D plot in a grid. All 3D plots are on top of each other at the position of the last 3D plot. 2D plot works. Also if I mix 2D and 3D plots in a grid, all 2D plot are right and the 3D plots have the problem.

Repro steps

#r "nuget: Plotly.NET, 4.2.0"
#r "nuget: Plotly.NET.Interactive, 4.2.0"
#r "nuget: Plotly.NET.CSharp"


using Plotly.NET.CSharp;

var testData = new[]{1.0,1.1,2.0};

var y = testData.Select(s=>s*-1).ToList();
var s1 = Chart.Scatter3D<double, double, double, string>(
            x: testData,
            y: y,
            z: testData.Select(s=>s*1.2).ToList(),
            mode: Plotly.NET.StyleParam.Mode.Lines_Markers,
            Name: "Plot 1 - 3D"
        );
var s2 = Chart.Point<double, double, string>(
            x: testData,
            y: y,
            Name: "Plot 2 - 2D"
        );
var s3 = Chart.Scatter3D<double, double, double, string>(
            x: testData,
            y: y,
            z: testData.Select(s=>s*2.1).ToList(),
            mode: Plotly.NET.StyleParam.Mode.Lines_Markers,
            Name: "Plot 3 - 3D"
        );

Chart.Grid(new[]{s1,s2,s3}, 3,1).Show();

Expected behavior

Position of 3D plots should be right

Actual behavior

2D plot works. Also if I mix 2D and 3D plots in a grid, all 2D plot are right and the 3D plots have the problem.

8c82410a-48db-497a-870d-3ed65d2c2e33.zip

image

Related information

  • Operating system Windows 10
  • Branch Plotly.NET v4.2.0
  • .NET Runtime dotnet-sdk-7.0.400-win-x64

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions