Skip to content

Initial camera up vector ignored  #2425

Closed
@KonradAdamczyk

Description

@KonradAdamczyk

default camera position of plot behaves like default value of up vector have not been overridden
clicking "reset camera .*" button fixes that
moreover split second after page load plot will move from overridden up state to default up state

more info in comment to below example

import plotly
import plotly.graph_objs as go

import pandas as pd

# Read data from a csv
z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/api_docs/mt_bruno_elevation.csv')

data = [
    go.Surface(
        z=z_data.as_matrix()
    )
]
layout = go.Layout(
    scene=dict(
    camera=dict(center=dict(y=0, x=0, z=0),
                eye=dict(y=0.362, x=-1.213, z=1.792),
                up=dict(y=0.984, x=0.045, z=-0.168),#default position of plot behaves like default value have not been overridden
                # comment above line and initial state of plot would be the same, clicking "reset camera .*" button fixes that
                #moreover when above line is not commented plot will move from overridden up state to default up state split second after page load
                )
    )
)
fig = go.Figure(data=data, layout=layout)
plotly.offline.plot(fig, filename="filename")

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions