
Plotly
Give your coding agent a concise Plotly Express and graph_objects recipe book so dashboards and reports ship with the right chart type the first time.
Install
npx skills add https://github.com/davila7/claude-code-templates --skill plotlyWhat is this skill?
- Covers basic charts: scatter, line, bar, pie, donut, and area via plotly.express
- Documents statistical views: histograms, box plots, violin, and 2D density heatmaps
- Shows bar modes for stack, group, and horizontal orientation patterns
- Includes trendline='ols' scatter and marginal plots on histograms
- Organized by chart category for quick agent lookup instead of reading full Plotly docs
Adoption & trust: 640 installs on skills.sh; 27.8k GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
Recommended Skills
Journey fit
Most solo builders first reach for Plotly while implementing UI and analytics surfaces during Build, even if charts later support Grow reporting. Chart composition is primarily a frontend and presentation concern for web and notebook outputs, even when fed by backend data.
Common Questions / FAQ
Is Plotly safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Plotly
# Plotly Chart Types Comprehensive guide to chart types organized by category. ## Basic Charts ### Scatter Plots ```python import plotly.express as px fig = px.scatter(df, x='x', y='y', color='category', size='size') # With trendlines fig = px.scatter(df, x='x', y='y', trendline='ols') ``` ### Line Charts ```python fig = px.line(df, x='date', y='value', color='group') # Multiple lines from wide-form data fig = px.line(df, x='date', y=['metric1', 'metric2', 'metric3']) ``` ### Bar Charts ```python # Vertical bars fig = px.bar(df, x='category', y='value', color='group') # Horizontal bars fig = px.bar(df, x='value', y='category', orientation='h') # Stacked bars fig = px.bar(df, x='category', y='value', color='group', barmode='stack') # Grouped bars fig = px.bar(df, x='category', y='value', color='group', barmode='group') ``` ### Pie Charts ```python fig = px.pie(df, names='category', values='count') # Donut chart fig = px.pie(df, names='category', values='count', hole=0.4) ``` ### Area Charts ```python fig = px.area(df, x='date', y='value', color='category') ``` ## Statistical Charts ### Histograms ```python # Basic histogram fig = px.histogram(df, x='values', nbins=30) # With marginal plot fig = px.histogram(df, x='values', marginal='box') # or 'violin', 'rug' # 2D histogram fig = px.density_heatmap(df, x='x', y='y', nbinsx=20, nbinsy=20) ``` ### Box Plots ```python fig = px.box(df, x='category', y='value', color='group') # Notched box plot fig = px.box(df, x='category', y='value', notched=True) # Show all points fig = px.box(df, x='category', y='value', points='all') ``` ### Violin Plots ```python fig = px.violin(df, x='category', y='value', color='group', box=True, points='all') ``` ### Strip/Dot Plots ```python fig = px.strip(df, x='category', y='value', color='group') ``` ### Distribution Plots ```python # Empirical cumulative distribution fig = px.ecdf(df, x='value', color='group') # Marginal distribution fig = px.scatter(df, x='x', y='y', marginal_x='histogram', marginal_y='box') ``` ### Error Bars ```python fig = px.scatter(df, x='x', y='y', error_y='error', error_x='x_error') # Using graph_objects for custom error bars import plotly.graph_objects as go fig = go.Figure() fig.add_trace(go.Scatter( x=[1, 2, 3], y=[5, 10, 15], error_y=dict( type='data', array=[1, 2, 3], visible=True ) )) ``` ## Scientific Charts ### Heatmaps ```python # From matrix data fig = px.imshow(z_matrix, color_continuous_scale='Viridis') # With graph_objects fig = go.Figure(data=go.Heatmap( z=z_matrix, x=x_labels, y=y_labels, colorscale='RdBu' )) ``` ### Contour Plots ```python # 2D contour fig = px.density_contour(df, x='x', y='y') # Filled contour fig = go.Figure(data=go.Contour( z=z_matrix, contours=dict( coloring='heatmap', showlabels=True ) )) ``` ### Ternary Plots ```python fig = px.scatter_ternary(df, a='component_a', b='component_b', c='component_c') ``` ### Log Scales ```python fig = px.scatter(df, x='x', y='y', log_x=True, log_y=True) ``` ### Image Display ```python import plotly.express as px fig = px.imshow(img_array) # img_array from PIL, numpy, etc. ``` ## Financial Charts ### Candlestick Charts ```python import plotly.graph_objects as go fig = go.Figure(data=[go.Candlestick( x=df['date'], open=df['open'], high=df['high'], low=df['low'], close=df['close'] )]) ``` ### OHLC Charts ```python fig = go.Figure(data=[go.Ohlc( x=df['date'], open=df['open'], high=df['high'], low=df['low'], close=df['close'] )]) ``` ### Waterfall Charts ```python fig = go.Figure(go.Waterfall( x=categories, y=values, measure=['relative', 'relative', 'total', 'relative', 'total'] )) ``` ### Funnel Charts ```python fig = px.funnel(df, x='count', y='stage') # Or with graph_objects fig = go.Figure(go.Funnel( y=['Stage 1', 'Stage 2', 'Stage 3'], x=[100, 60, 40] )) ``