Skip to content

Instantly share code, notes, and snippets.

@rsalaza4
Created May 10, 2022 16:41
Show Gist options
  • Select an option

  • Save rsalaza4/d34c5de439468a84d920316d261bfcdb to your computer and use it in GitHub Desktop.

Select an option

Save rsalaza4/d34c5de439468a84d920316d261bfcdb to your computer and use it in GitHub Desktop.
# Plot x-bar control chart
# Line chart
line_plot = df_grouped.hvplot.line(
x='sample_group',
y=['x_bar','UCL','+2s','+1s','x_bar_bar','-1s','-2s','LCL'],
xlabel="Sample Group",
title="x-bar chart",
height=500,
width=1000)
# Scatter plot
scatter_plot = df_grouped.hvplot.scatter(
x='sample_group',
y=['x_bar','UCL','+2s','+1s','x_bar_bar','-1s','-2s','LCL'],
xlabel="Sample Group",
title="x-bar chart",
height=500,
width=1000)
# Merge line chart and scatter plot into a single plot
x_bar_chart = line_plot*scatter_plot
x_bar_chart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment