Category: Python for Data Science
How to display prediction intervals around a line in Plotly (with Code)
Draw lower and upper Scatter traces in increasing x order, then set fill="tonexty" on the upper trace to shade the interval between them.
How to create a heatmap with fixed color limits in Plotly (with Code)
Pass range_color=(lower, upper) to px.imshow for a numeric two-dimensional heatmap.
How to plot multiple time series with a range slider in Plotly (with Code)
Create one line trace per series on a shared date axis and enable xaxis_rangeslider_visible=True.
How to export an interactive chart to a standalone HTML file in Plotly (with Code)
Use fig.write_html with include_plotlyjs=True and full_html=True to create a complete Plotly HTML document with its chart library included.
How to add hover labels to a scatterplot in Plotly (with Code)
Pass hover_name to choose a tooltip heading and hover_data to include or format additional columns in a Plotly Express scatterplot.
How to plot a regression line with a stated uncertainty interval in Seaborn (with Code)
Set ci=95 in sns.regplot to draw a 95% bootstrap confidence band around the fitted regression estimate.
How to draw paired observations with a point plot in Seaborn (with Code)
Map each subject identifier to hue in sns.pointplot and set errorbar=None to connect that subject's observed values across conditions.
How to order categorical levels in a bar plot in Seaborn (with Code)
Pass an explicit list to the order argument of sns.barplot to set the displayed category sequence.
How to plot a box plot without hiding observations in Seaborn (with Code)
Draw a Seaborn boxplot and overlay a stripplot using the same data and category order.
How to compare distributions with an empirical cumulative distribution plot in Seaborn (with Code)
Use sns.ecdfplot with a numeric x column and hue for the groups you want to compare.