Data Visualization48 Q&A
Data Visualization — Q&A
Visualization principles, Matplotlib, Seaborn, and Plotly for exploratory analysis.
Visualization Principles Q&A
1What makes a visualization effective?
Answer: Clear purpose, correct chart type, and minimal cognitive load.
2How choose chart type?
Answer: Match task: compare, trend, distribution, relationship, composition.
3Why avoid 3D charts?
Answer: They distort perception and reduce readability.
4Color best practice?
Answer: Use limited palette, semantic mapping, and color-blind safe choices.
5What is pre-attentive processing?
Answer: Fast visual cues (color/size/position) guide attention instantly.
6When start y-axis at zero?
Answer: Usually for bar charts to avoid exaggeration.
7What is chart junk?
Answer: Decorative elements that distract from data message.
8How annotate insights?
Answer: Add concise callouts near key points.
9How design dashboards?
Answer: Prioritize key KPIs, consistent layout, and interaction hierarchy.
10How prevent misleading visuals?
Answer: Show context, scales, units, and sampling caveats.
11What is data-ink ratio?
Answer: Maximize ink used to represent actual data, minimize non-essential ink.
12One-line viz principles summary?
Answer: Good visualization makes accurate insight obvious and fast.
Matplotlib Interview Q&A
13What is Matplotlib?
Answer: Python's foundational plotting library for static, animated, and interactive charts.
14Pyplot vs object-oriented API?
Answer: Pyplot is stateful quick plotting; OO API is explicit and scalable.
15Figure and Axes difference?
Answer: Figure is full canvas, Axes is an individual plot area.
16How create subplots?
Answer: Use
plt.subplots() and configure shared axes/layout.17Common chart types?
Answer: Line, bar, scatter, histogram, boxplot, heatmap (with extras).
18How customize style?
Answer: Set titles, labels, ticks, colors, legends, and style sheets.
19How save high-quality figures?
Answer: Use
savefig() with dpi and bbox settings.20When use twin axes?
Answer: When plotting different scales on same x-axis, used cautiously.
21How handle overlapping labels?
Answer: Rotate ticks, increase figure size, and use tight layout.
22Matplotlib vs Seaborn?
Answer: Matplotlib gives low-level control; Seaborn provides statistical defaults.
23How plot dates well?
Answer: Use date formatters/locators and avoid overcrowded tick marks.
24One-line Matplotlib summary?
Answer: Matplotlib is the control-first plotting backbone of Python data workflows.
Seaborn Interview Q&A
25What is Seaborn?
Answer: High-level statistical visualization library built on Matplotlib.
26Why use Seaborn over Matplotlib?
Answer: Faster attractive defaults and simpler statistical plotting APIs.
27What is
hue used for?Answer: Encodes additional categorical variable using color.
28What is FacetGrid?
Answer: Creates small multiples by splitting data across rows/columns.
29Popular Seaborn charts?
Answer: Pairplot, heatmap, boxplot, violinplot, countplot, lineplot.
30How visualize correlation?
Answer: Use
sns.heatmap(corr, annot=True) for matrix insight.31What is pairplot good for?
Answer: Quick multivariate EDA with pairwise relationships and distributions.
32How set theme globally?
Answer: Use
sns.set_theme() with style/context/palette.33Boxplot vs violinplot?
Answer: Boxplot shows quartiles; violin adds distribution density shape.
34How manage overplotting?
Answer: Reduce marker size/alpha, jitter, or use hexbin/density style charts.
35How combine with pandas?
Answer: Seaborn accepts DataFrames and column names directly.
36One-line Seaborn summary?
Answer: Seaborn makes statistical visualization expressive with minimal code.
Plotly Interview Q&A
37What is Plotly?
Answer: Interactive visualization library for web-ready charts.
38Plotly Express vs graph_objects?
Answer: Express is concise high-level API; graph_objects offers full control.
39Why interactive charts matter?
Answer: Users can zoom/filter/hover to explore deeper insights.
40How handle large data in Plotly?
Answer: Sample/aggregate or use WebGL traces for performance.
41How add custom hover info?
Answer: Use
hover_data or hovertemplate.42Can Plotly build dashboards?
Answer: Yes, with Dash for interactive apps and callbacks.
43How export Plotly figures?
Answer: Export to HTML, static images, or embed in notebooks/web pages.
44When use Plotly instead of Matplotlib?
Answer: Prefer Plotly when stakeholder interactivity is required.
45What are traces in Plotly?
Answer: Individual data series/components rendered in figure.
46How theme Plotly charts?
Answer: Use templates and update layout settings globally.
47Common Plotly interview mistake?
Answer: Ignoring readability while adding too many interactive controls.
48One-line Plotly summary?
Answer: Plotly brings analytics to life with interactive visual storytelling.