Bar Charts
Interactive Histogram Builder
Explore how different data distributions create different histogram shapes! Click the preset buttons to see Normal, Skewed, Bimodal, and Uniform distributions. Adjust the number of bins to see how binning affects the visualization. Notice how mean, median, and skewness change with different distributions.
Vertical Bar Charts
Vertical bar charts are ideal when comparing quantities across categories. The height of each bar represents the value, making differences immediately visible. Use when category labels are short.
Horizontal Bar Charts
Horizontal bar charts work better when you have long category labels or many categories. Reading left-to-right feels natural for text labels on the left axis.
Stacked Bar Charts
Stacked bars show how a total breaks down into components. Each segment represents a sub-category. Good for comparing totals while showing composition.
Grouped Bar Charts
Grouped bars place sub-categories side by side, making direct comparison between groups easier. Unlike stacked bars, each segment starts from the same baseline.
Line Charts
Single Line Chart
A single line chart shows how one variable changes over time or across a continuous scale. The connecting lines emphasize the continuity and direction of change.
Multiple Line Chart
Multiple lines let you compare trends across different groups or variables. Keep to 3-4 lines maximum to maintain readability.
Area Chart
Area charts fill the space below the line, emphasizing volume or magnitude. Useful when the cumulative total matters as much as the trend.
Scatter Plots
Basic Scatter Plot
Scatter plots reveal relationships between two continuous variables. Each point represents one observation. Look for patterns: clusters, trends, or outliers.
Scatter with Trend Line
Adding a trend line (regression line) helps visualize the overall direction and strength of the relationship. The line of best fit minimizes the distance to all points.
Types of Correlation
Positive correlation: as X increases, Y increases. Negative correlation: as X increases, Y decreases. No correlation: no predictable pattern between X and Y.
Histograms
Basic Histogram
Histograms show the distribution of a single continuous variable. Data is grouped into bins (ranges), and bar height shows frequency. Unlike bar charts, bins touch because data is continuous.
Effect of Bin Size
Bin size affects what patterns you see. Too few bins hide detail; too many create noise. A good rule: use √n bins where n is your sample size.
Distribution Shapes
Normal: symmetric bell curve. Right-skewed: tail extends right (income, prices). Left-skewed: tail extends left (age at retirement). Bimodal: two peaks (mixed populations).
Box Plots
Box Plot Anatomy
The box shows the middle 50% of data (IQR = Q3 - Q1). The line inside is the median. Whiskers extend to min/max within 1.5×IQR. Points beyond are outliers.
Comparing Groups
Side-by-side box plots excel at comparing distributions across groups. You can quickly see differences in center (median position), spread (box width), and outliers.
What to Look For
Box plots encode multiple statistics. Learn to read them: median position shows skewness, box width shows IQR, whisker lengths show range, and dots show outliers.
Pie Charts
When Pie Charts Work
Pie charts show parts of a whole when: you have few categories (2-5), parts sum to 100%, and you want to emphasize proportion. The human eye struggles to compare angles accurately.
Common Problems
Pie charts are often misused. Avoid: too many slices, comparing multiple pies, 3D effects, or exploded slices. When in doubt, use a bar chart instead.
Better Alternatives
Stacked bar charts make comparison easier. Treemaps handle many categories. Waffle charts (100 squares) give precise percentages. All are more accurate than pie charts.
Real-World Examples
Apply your knowledge to practical scenarios
Sales Dashboard Analysis
A retail company wants to visualize their Q4 sales data. They have: monthly revenue over 12 months, sales by product category (5 categories), sales by region (4 regions), and individual transaction amounts (10,000 transactions).
Sample Data
{
"monthly_revenue": [
45000,
52000,
48000,
61000,
58000,
72000,
68000,
75000,
82000,
95000,
110000,
125000
],
"categories": {
"Electronics": 35,
"Clothing": 28,
"Home": 20,
"Food": 12,
"Other": 5
},
"regions": {
"North": 32,
"South": 28,
"East": 25,
"West": 15
}
}
Key Insights
- Always match chart type to data type (continuous vs categorical)
- Time-series data almost always calls for line charts
- When comparing categories, bar charts beat pie charts for accuracy
Spotting Misleading Visualizations
A news article shows a bar chart comparing two politicians' approval ratings: Candidate A at 48% and Candidate B at 52%. The chart makes it look like B has twice the support of A.
Key Insights
- Always check the y-axis starting point on bar charts
- Truncated axes are a common manipulation technique
- Small differences can be shown with annotations rather than distorted scales
Chart Types Quiz
Test your understanding • Passing score: 70%