I create a bar chart and the chart looks different in ubuntu and windows.
Format in windows:
Format in Ubuntu:
Below is my code.
grading_color_map = {
"1": "green",
"2": "orange",
"3": "red"
}
fig_grading = go.Figure()
for page_label in grade["page_label"].unique():
fig_grading.add_trace(
go.Bar(
x=[
grade.loc[grade["page_label"]==page_label, "printer_serial_nr"],
grade.loc[grade["page_label"]==page_label, colorbycpidorkpid]
],
y=grade.loc[grade["page_label"]==page_label, "percentage"],
name=page_label,
marker_color=grading_color_map[page_label],
textposition="inside",
texttemplate="%{y}%",
)
)
fig_grading.add_trace(
go.Scatter(
x=[
grade["printer_serial_nr"],
grade[colorbycpidorkpid]
],
y = grade["controlline"],
name="control line",
line=dict(dash="dash", width=2, color="red")
)
)
fig_grading.update_layout(
barmode="stack",
title_text="Grade by " + colorbycpidorkpid,
)
fig_grading.show()