Created
May 10, 2022 16:41
-
-
Save rsalaza4/d34c5de439468a84d920316d261bfcdb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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