# ['ApparentMagnitude', 'RelativeLuminosity', 'RelativeRadius', 'Temperature']
# plotly setup
plot_rows=2
plot_cols=2
fig = make_subplots(rows=plot_rows, cols=plot_cols, subplot_titles=(num_cols))
# creating all the plots
x = 0
for i in range(1, plot_rows + 1):
for j in range(1, plot_cols + 1):
#print(str(i)+ ', ' + str(j))
fig.add_trace(go.Box(x=df['Type'].values,
y=df[num_cols][df[num_cols].columns[x]].values,
name = df[num_cols].columns[x],
),
row=i,
col=j)
x=x+1
# Format and show fig
fig.update_layout(height=800,
width=1000,
template= 'ggplot2',
title_text="Numericals vs Type",
font=dict(
family="Arial",
size=12,
color='#000000'
)
)
fig.show()
output the following figure:
**I want to get different colors for each category of my y:
- Red Dwarf - boxplot should be RED
- Brown Dwarf - boxplot should be BROWN
- White Dwarf - boxplot should be IVORY
- Main Sequence - boxplot should be GREEN
- Super Giants - boxplot should be BLUE
- Hyper Giants - boxplot should be ORANGE
How can I change the color?
**