Help

We’ve Expanded AI Support! We’ve broadened AI assistance across additional PowerSchool solutions, making it easier to get guidance when you need it. Learn More

not working

freya652rey
New Member

not working

Hello,

 

My code is as follows, but it’s not working

 

plotly.py version is 6.4.0

 

import plotly.graph_objects as go

 

data = [24, 14, 18, 27, 17, 32, 31, 27, 21, 27, 24, 21, 24, 26, 31, 34]

fig = go.Figure()

data_n = len(data)

max_ = np.max(data)

min_ = np.min(data)

q1 = np.quantile(data, 0.25)

q3 = np.quantile(data, 0.75)

iq_range = q3 - q1

median = np.median(data)

fig.add_trace(

go.Box(

x=data,

fillcolor='#7da7d9',

line={'color': 'black', 'width': 1},

# hoverinfo = 'none',

hoveron='boxes',

hovertemplate=(

f"Q1 = {q1:.6g}<br>"

f"median = {median:.6g}<br>"

f"Q3 = {q3:.6g}<br>"

f"IQRange = {iq_range:.6g}<br>"

f"Whisker = ({min_:.6g},{max_:.6g})<br>"

f"N = {data_n}<br>"

),

name=''

)

0 Replies