👀
Crash Visualization
  • Welcome
  • Preface
    • Who the book is written for
    • How the book is organized
  • 1. Introduction of Data Visualization
    • 1.1 What is data visualization?
    • 1.2 Why does visualization matter?
  • 2. Tricks in Visualization
    • 2.1 Choose Appropriate Chart
    • 2.2 Features of Charts
      • 2.2.1 Table
      • 2.2.2 Column Chart
      • 2.2.3 Line Chart
      • 2.2.4 Pie Chart
      • 2.2.5 Scatter Chart
      • 2.2.6 Map Chart
    • 2.3 Misused Graph
    • 2.4 Tips in Visualization
  • 3. Matplotlib
    • 3.1 Basic Concepts
    • 3.2 Line Chart
    • 3.3 Area Chart
    • 3.4 Column Chart
    • 3.5 Histogram Chart
    • 3.6 Scatter Chart
    • 3.7 Lollipop Chart
    • 3.8 Pie Chart
    • 3.9 Venn Chart
    • 3.10 Waffle Chart
    • 3.11 Animation
  • 4. Seaborn
    • 4.1 Trends
    • 4.2 Ranking
      • 4.2.1 Barplot
      • 4.2.2 Boxplot
    • 4.3 Composition
      • 4.3.1 Stacked Chart
    • 4.4 Correlation
      • 4.4.1 Scatter Plot
      • 4.4.2 Linear Relationship
      • 4.4.3 Heatmap
      • 4.4.4 Pairplot
    • 4.5 Distribution
      • 4.5.1 Boxplot
      • 4.5.2 Violin plot
      • 4.5.3 Histogram plot
      • 4.5.4 Density plot
      • 4.5.5 Joint plot
  • 5. Bokeh
    • 5.1 Basic Plotting
    • 5.2 Data Sources
    • 5.3 Annotations
    • 5.4 Categorical Data
    • 5.5 Presentation and Layouts
    • 5.6 Linking and Interactions
    • 5.7 Network Graph
    • 5.8 Widgets
  • 6. Plotly
    • 6.1 Fundamental Concepts
      • 6.1.1 Plotly Express
      • 6.1.2 Plotly Graph Objects
    • 6.2 Advanced Charts
      • 6.2.1 Advanced Scatter Chart
      • 6.2.2 Advanced Bar Chart
      • 6.2.3 Advanced Pie Chart
      • 6.2.4 Advanced Heatmap
      • 6.2.5 Sankey Chart
      • 6.2.6 Tables
    • 6.3 Statistical Charts
      • 6.3.1 Common Statistical Charts
      • 6.3.2 Dendrograms
      • 6.3.3 Radar Chart
      • 6.3.4 Polar Chart
      • 6.3.5 Streamline Chart
    • 6.4 Financial Charts
      • 6.4.1 Funnel Chart
      • 6.4.2 Candlestick Chart
      • 6.4.3 Waterfall Chart
  • Support
    • Donation
Powered by GitBook
On this page
  • 1. Scatter Polar Chart
  • 2. Line Polar Chart
  • 3. Bar Polar Chart
  • 4. Windrose Chart

Was this helpful?

  1. 6. Plotly
  2. 6.3 Statistical Charts

6.3.4 Polar Chart

Previous6.3.3 Radar ChartNext6.3.5 Streamline Chart

Last updated 4 years ago

Was this helpful?

Polar Chart is a common variation of circular graphs. It is useful when relationships between data points can be visualized most easily in terms of radiuses and angles. In Polar Charts, a series is represented by a closed curve that connects points in the polar coordinate system. Each data point is determined by the distance from the pole (the radial coordinate) and the angle from the fixed direction (the angular coordinate).

A polar chart represents data along the radial and angular axes. In Plolty, there are three types of polar chart: Scatter polar chart, Line polar chart, and Bar polar chart.

1. Scatter Polar Chart

import plotly.express as px
df = px.data.wind()
fig = px.scatter_polar(df, r="frequency", theta="direction")
fig.show()

The "strength" column corresponds to strengthen wind categories, and there is a frequency value for each direction and strength. Below we use the strength column to encode the color, symbol, and size of the markers.

fig = px.scatter_polar(df, r="frequency", theta="direction",
                       color="strength", symbol="strength", size="frequency",
                       color_discrete_sequence=px.colors.sequential.Viridis)
fig.show()

2. Line Polar Chart

fig = px.line_polar(df, r="frequency", theta="direction", color="strength", line_close=True,
                    color_discrete_sequence=px.colors.sequential.Agsunset)
fig.show()

3. Bar Polar Chart

import plotly.graph_objects as go

fig = go.Figure(go.Barpolar(
    r=[5, 2.5, 1.5, 4.5, 4, 4, 3.5],
    theta=[65, 35, 180, 135, 300, 90, 270],
    width=[20,15,10,20,15,30,15,],
    marker_color=["olive", 'gold', 'orchid', 'cyan', 'salmon', 'forestgreen', 'dodgerblue'],
    marker_line_color="black",
    marker_line_width=3
))

fig.update_layout(
    template=None,
    polar = dict(
        radialaxis = dict(range=[0, 5.6], ),
        angularaxis = dict(showticklabels=False, ticks='')
))
fig.show()

4. Windrose Chart

A wind rose chart (also known as a polar bar chart) is a graphical tool used to visualize how wind speed and direction are typically distributed at a given location. We can use px.bar_polar , or use go.Barpolar .