-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Plotly Surface] Weird behavior of hover text for surfacecolor #4586
Comments
After a bit of investigation, I suspect the hovertext array of surfacecolor has been transposed (why?). import numpy as np
import plotly.graph_objects 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')
fig = go.Figure(data=[
go.Surface(
z=z_data.values,
surfacecolor=z_data.values,
customdata=z_data.values.T,
hovertemplate='x=%{x}, y=%{y}<br>z=%{z}<br>surfacecolor=%{customdata}')])
fig.update_layout(title='Mt Bruno Elevation', autosize=False,
width=500, height=500,
margin=dict(l=65, r=50, b=65, t=90))
fig.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From the above image, I use the Mt. Bruno's z_data for both z axis and surfacecolor.
The surface graph is correct, but the hover text of surfacecolor is wrong.
The correct surfacecolor text should be 372.8826 same as z's text.
The text was updated successfully, but these errors were encountered: