
- Matplotlib - Home
- Matplotlib - Introduction
- Matplotlib - Vs Seaborn
- Matplotlib - Environment Setup
- Matplotlib - Anaconda distribution
- Matplotlib - Jupyter Notebook
- Matplotlib - Pyplot API
- Matplotlib - Simple Plot
- Matplotlib - Saving Figures
- Matplotlib - Markers
- Matplotlib - Figures
- Matplotlib - Styles
- Matplotlib - Legends
- Matplotlib - Colors
- Matplotlib - Colormaps
- Matplotlib - Colormap Normalization
- Matplotlib - Choosing Colormaps
- Matplotlib - Colorbars
- Matplotlib - Working With Text
- Matplotlib - Text properties
- Matplotlib - Subplot Titles
- Matplotlib - Images
- Matplotlib - Image Masking
- Matplotlib - Annotations
- Matplotlib - Arrows
- Matplotlib - Fonts
- Matplotlib - Font Indexing
- Matplotlib - Font Properties
- Matplotlib - Scales
- Matplotlib - LaTeX
- Matplotlib - LaTeX Text Formatting in Annotations
- Matplotlib - PostScript
- Matplotlib - Mathematical Expressions
- Matplotlib - Animations
- Matplotlib - Celluloid Library
- Matplotlib - Blitting
- Matplotlib - Toolkits
- Matplotlib - Artists
- Matplotlib - Styling with Cycler
- Matplotlib - Paths
- Matplotlib - Path Effects
- Matplotlib - Transforms
- Matplotlib - Ticks and Tick Labels
- Matplotlib - Radian Ticks
- Matplotlib - Dateticks
- Matplotlib - Tick Formatters
- Matplotlib - Tick Locators
- Matplotlib - Basic Units
- Matplotlib - Autoscaling
- Matplotlib - Reverse Axes
- Matplotlib - Logarithmic Axes
- Matplotlib - Symlog
- Matplotlib - Unit Handling
- Matplotlib - Ellipse with Units
- Matplotlib - Spines
- Matplotlib - Axis Ranges
- Matplotlib - Axis Scales
- Matplotlib - Axis Ticks
- Matplotlib - Formatting Axes
- Matplotlib - Axes Class
- Matplotlib - Twin Axes
- Matplotlib - Figure Class
- Matplotlib - Multiplots
- Matplotlib - Grids
- Matplotlib - Object-oriented Interface
- Matplotlib - PyLab module
- Matplotlib - Subplots() Function
- Matplotlib - Subplot2grid() Function
- Matplotlib - Anchored Artists
- Matplotlib - Manual Contour
- Matplotlib - Coords Report
- Matplotlib - AGG filter
- Matplotlib - Ribbon Box
- Matplotlib - Fill Spiral
- Matplotlib - Findobj Demo
- Matplotlib - Hyperlinks
- Matplotlib - Image Thumbnail
- Matplotlib - Plotting with Keywords
- Matplotlib - Create Logo
- Matplotlib - Multipage PDF
- Matplotlib - Multiprocessing
- Matplotlib - Print Stdout
- Matplotlib - Compound Path
- Matplotlib - Sankey Class
- Matplotlib - MRI with EEG
- Matplotlib - Stylesheets
- Matplotlib - Background Colors
- Matplotlib - Basemap
- Matplotlib - Event Handling
- Matplotlib - Close Event
- Matplotlib - Mouse Move
- Matplotlib - Click Events
- Matplotlib - Scroll Event
- Matplotlib - Keypress Event
- Matplotlib - Pick Event
- Matplotlib - Looking Glass
- Matplotlib - Path Editor
- Matplotlib - Poly Editor
- Matplotlib - Timers
- Matplotlib - Viewlims
- Matplotlib - Zoom Window
- Matplotlib Widgets
- Matplotlib - Cursor Widget
- Matplotlib - Annotated Cursor
- Matplotlib - Buttons Widget
- Matplotlib - Check Buttons
- Matplotlib - Lasso Selector
- Matplotlib - Menu Widget
- Matplotlib - Mouse Cursor
- Matplotlib - Multicursor
- Matplotlib - Polygon Selector
- Matplotlib - Radio Buttons
- Matplotlib - RangeSlider
- Matplotlib - Rectangle Selector
- Matplotlib - Ellipse Selector
- Matplotlib - Slider Widget
- Matplotlib - Span Selector
- Matplotlib - Textbox
- Matplotlib Plotting
- Matplotlib - Line Plots
- Matplotlib - Area Plots
- Matplotlib - Bar Graphs
- Matplotlib - Histogram
- Matplotlib - Pie Chart
- Matplotlib - Scatter Plot
- Matplotlib - Box Plot
- Matplotlib - Arrow Demo
- Matplotlib - Fancy Boxes
- Matplotlib - Zorder Demo
- Matplotlib - Hatch Demo
- Matplotlib - Mmh Donuts
- Matplotlib - Ellipse Demo
- Matplotlib - Bezier Curve
- Matplotlib - Bubble Plots
- Matplotlib - Stacked Plots
- Matplotlib - Table Charts
- Matplotlib - Polar Charts
- Matplotlib - Hexagonal bin Plots
- Matplotlib - Violin Plot
- Matplotlib - Event Plot
- Matplotlib - Heatmap
- Matplotlib - Stairs Plots
- Matplotlib - Errorbar
- Matplotlib - Hinton Diagram
- Matplotlib - Contour Plot
- Matplotlib - Wireframe Plots
- Matplotlib - Surface Plots
- Matplotlib - Triangulations
- Matplotlib - Stream plot
- Matplotlib - Ishikawa Diagram
- Matplotlib - 3D Plotting
- Matplotlib - 3D Lines
- Matplotlib - 3D Scatter Plots
- Matplotlib - 3D Contour Plot
- Matplotlib - 3D Bar Plots
- Matplotlib - 3D Wireframe Plot
- Matplotlib - 3D Surface Plot
- Matplotlib - 3D Vignettes
- Matplotlib - 3D Volumes
- Matplotlib - 3D Voxels
- Matplotlib - Time Plots and Signals
- Matplotlib - Filled Plots
- Matplotlib - Step Plots
- Matplotlib - XKCD Style
- Matplotlib - Quiver Plot
- Matplotlib - Stem Plots
- Matplotlib - Visualizing Vectors
- Matplotlib - Audio Visualization
- Matplotlib - Audio Processing
- Matplotlib Useful Resources
- Matplotlib - Quick Guide
- Matplotlib - Cheatsheet
- Matplotlib - Useful Resources
- Matplotlib - Discussion
Matplotlib - Polar Charts
A polar chart is a type of graph that displays data in a circular format. Instead of using traditional x and y axes like in a regular chart, a polar chart uses a circular grid. The center of the circle represents the starting point, and data points are plotted at various distances from the center and at different angles.
Imagine a compass where the center is north, and as you move outward, you are going in different directions. Each direction corresponds to an angle on the polar chart. The distance from the center to a point represents a value −

Polar Charts in Matplotlib
We can create a polar chart in Matplotlib using the polar() function. This function allows us to plot data in a polar coordinate system. The radial axis represents the distance from the center, while the angular axis represents the angle around the circle.
This type of chart is useful for applications such as radar systems, astronomy, and any scenario where cyclical information needs to be visually shown.
The polar() Function
The polar() function in Matplotlib is used to create polar plots, which represent data in a polar coordinate system. Instead of the typical x and y axes, polar plots use radial and angular axes to visualize data points in a circular manner.
Following is the syntax of the polar() function in Matplotlib −
plt.polar(theta, r, marker='o', linestyle='-', label='Data')
Where,
- theta is an array representing the angles in radians for data points.
- r is an array representing the radial distance from the center for each data point.
- marker (optional) specifies the marker style for each data point like 's' for squares, 'o' for circles or 'x' for crosses.
- linestyle (optional) specifies the style of connecting lines between data points like '-' for solid line, ':' for dotted lines or '--' for dashed lines.
- label (optional) provides a label for the plotted data, which is useful when adding a legend to the plot.
Basic Polar Plot with Sine Function
Creating a polar plot with a sine function in Matplotlib is like displaying data in a circular coordinate system, where the angle around the circle corresponds to the independent variable, and the radial distance from the center represents the value of the sine function at that angle.
Example
In the following example, we are creating a basic polar plot using the plt.polar() function with polar coordinates derived from a sine function. The resulting plot shows a sine wave pattern around the circle −
import matplotlib.pyplot as plt import numpy as np # Generating polar coordinates using a sine function theta = np.linspace(0, 2*np.pi, 360) r = np.sin(3 * theta) # Plotting the polar data and adding a legend plt.polar(theta, r, label='Sine Function') plt.legend() plt.show()
Output
After executing the above code, we get the following output −

Polar Scatter Plot
A Polar Scatter Plot in Matplotlib is a graphical representation that displays individual data points in a circular coordinate system. Unlike traditional scatter plots that use Cartesian coordinates, polar scatter plots use radial distance and angular position to represent data. Each point is plotted based on its angle and distance from the center, creating a scatter of points around the circle.
Example
In here, we are creating a polar plot with "20" custom data points (r) at evenly spaced angles (theta) around a circle −
import matplotlib.pyplot as plt import numpy as np # Specifying polar coordinates theta = np.linspace(0, 2*np.pi, 20) r = np.array([0.2, 0.5, 0.8, 1.2, 1.5, 1.8, 2.1, 2.5, 2.8, 3.0, 2.8, 2.5, 2.1, 1.8, 1.5, 1.2, 0.8, 0.5, 0.2, 0.0]) # Creating a polar scatter plot with data points plt.polar(theta, r, marker='o', linestyle='None', label='Data Points') plt.legend() plt.show()
Output
Following is the output of the above code −

Multiple Data Series in Polar Plot
A Multiple Data Series in a Polar Plot in Matplotlib is a visual representation that includes plotting more than one set of data in a circular coordinate system. In this type of plot, each data series is represented by its own set of angles and radial distances, creating distinct patterns around the center of the plot. We can distinguish each series by using different colors, markers, or linestyles.
Example
Now, we are creating a polar plot with two data series. To achieve this, we are using sine and cosine functions to generate two distinct radial patterns (r1 and r2) at various angles (theta) −
import matplotlib.pyplot as plt import numpy as np # Generating polar coordinates using both sine and cosine functions theta = np.linspace(0, 2*np.pi, 360) r1 = np.sin(3 * theta) r2 = np.cos(2 * theta) # Plotting multiple data series in a polar plot plt.polar(theta, r1, label='Sine Function') plt.polar(theta, r2, label='Cosine Function') plt.legend() plt.show()
Output
Output of the above code is as follows −

Rose Plot
A Rose Plot in Matplotlib is a specialized type of polar plot that combines circular coordinates with a filled area under the curve. It represents data using a periodic function, such as the sine function, to create petal-like patterns like a rose flower. Each "petal" corresponds to a certain range of angles, and the radial distance from the center indicates the magnitude of the function at those angles.
Example
In the example below, we are creating a polar plot by taking the absolute value of a sine function. The plot displays a petal-like pattern at various angles (theta). Additionally, the fill() function is used to fill the area under the curve −
import matplotlib.pyplot as plt import numpy as np # Generating polar coordinates using the absolute value of a sine function theta = np.linspace(0, 2*np.pi, 360) r = np.abs(np.sin(5 * theta)) # Plotting a rose plot with a filled area under the curve plt.polar(theta, r, label='Rose Plot') # Filled area under the curve plt.fill(theta, r, alpha=0.5) plt.legend() plt.show()
Output
The output obtained is as shown below −
