Black Lives Matter. Please consider donating to Black Girls Code today.

Multiple bar graphs on one page express

Hello I am new to I want to graph multiple bar graphs on one page, all with titles and axes, and I want the hex color of the bar graphs to be #7AB547. What I have so far:

import as px
import plotly.offline as pyo
import plotly.graph_objs as go
for template in [‘plotly_dark’]:
fig =, y=‘yy’, x=‘xx’, template=template, title=“xx vs xx”)

Hi @zero, welcome to the plotly community :wink:

you can set the use the color_discrete_sequence parameter of the function to set the default color.

Here a generic example:

import as px
import pandas as pd

df =
df1 = df[df['country'].isin(['Canada', 'Germany'])]
fig =, x='year', y='pop',color_discrete_sequence=['#7AB547'], facet_col='country')

hope this helps


1 Like