Data Visualisation Using Plot
Pandas Basics
2 min read
Published Sep 29 2025, updated Oct 24 2025
Guide Sections
Guide Comments
What is Pandas DataFrame.plot?
Pandas provides convenient built-in plotting, which is great for quick, exploratory visualisations. However, its plotting features are more limited compared to dedicated libraries like Matplotlib, Seaborn, or Plotly.
- Creates visualisations directly from DataFrames or Series.
df.plot(...)is just a wrapper around Matplotlib.- It creates a Matplotlib Axes object (a chart), plots the data, and returns it.
- Matplotlib itself is the underlying engine that actually draws the chart.
plt.show()is a Matplotlib command → renders the plot to screen/output.- Automatically uses column names for labels, legends, and axes.
Syntax
kind→ type of plot ("line","bar","hist", etc.).x→ column name to use as x-axis.y→ column(s) to plot on y-axis.**kwargs→ passed to Matplotlib (e.g.,figsize,title,xlabel,ylabel).
Since df.plot() always returns a Matplotlib Axes, you can keep customising (colors, labels, legends) with standard Matplotlib commands:
Plot Types (kind)
Kind | Description |
| Default, line plot |
| Vertical bar plot |
| Horizontal bar plot |
| Histogram |
| Box-and-whisker plot |
| Kernel density estimate |
| Area plot |
| Scatter plot (needs |
| Pie chart (works best on Series) |
Example data
Example DataFrame that is used in the chart examples below.
Line Plot (default)

If you pass multiple y-columns, they’ll all be plotted together:
Bar Plot

Horizontal Bar Plot

Histogram

Box Plot

KDE / Density Plot
Note, for KDE charts, you also need to install the SciPy module as it uses it under the hood : pip install scipy.

Area Plot

Scatter Plot

Pie Chart















