Skip to content

Scatterpolargl

Overview

The scatterpolargl trace type is used to create scatter plots on polar coordinates using WebGL rendering. This allows for high-performance plotting of large datasets in polar coordinates, ideal for scenarios where a large number of data points need to be visualized with speed and efficiency.

You can customize the marker size, color, and lines to connect points, similar to the scatterpolar trace, but with WebGL performance benefits.

Common Uses

  • Large Datasets in Polar Coordinates: Efficiently visualizing datasets with many data points in polar coordinates.
  • Performance Optimization: Using WebGL for better rendering performance in polar scatter plots.
  • Circular Data with Directional Components: Ideal for cyclic data where radial distance and angle are key factors.

Check out the Attributes for the full set of configuration options

Examples

Common Configurations

Here's a simple scatterpolargl plot showing data points on a polar coordinate system using WebGL rendering:

You can copy this code below to create this chart in your project:

models:
  - name: scatterpolargl-data
    args:
      - echo
      - |
        theta,r
        0,10
        45,20
        90,30
        135,25
        180,15
traces:
  - name: Simple Scatterpolargl Plot
    model: ${ref(scatterpolargl-data)}
    props:
      type: scatterpolargl
      theta: ?{theta}
      r: ?{r}
      mode: "markers"
charts:
  - name: Simple Scatterpolargl Chart
    traces:
      - ${ref(Simple Scatterpolargl Plot)}
    layout:
      title:
        text: Simple Scatterpolargl Plot<br><sub>High-Performance Polar Data Points</sub>

This example demonstrates a scatterpolargl plot with lines connecting the data points in polar coordinates, rendered with WebGL:

Here's the code:

models:
  - name: scatterpolargl-data-lines
    args:
      - echo
      - |
        theta,r
        0,5
        45,15
        90,20
        135,10
        180,25
traces:
  - name: Scatterpolargl Plot with Lines
    model: ${ref(scatterpolargl-data-lines)}
    props:
      type: scatterpolargl
      theta: ?{theta}
      r: ?{r}
      mode: "lines+markers"
charts:
  - name: Scatterpolargl Chart with Lines
    traces:
      - ${ref(Scatterpolargl Plot with Lines)}
    layout:
      title:
        text: Scatterpolargl Plot with Lines<br><sub>Connecting Data Points with Lines in Polar Coordinates</sub>

Here's a scatterpolargl plot with custom marker sizes and colors, giving more visual weight to each data point in polar coordinates using WebGL rendering:

Here's the code:

models:
  - name: scatterpolargl-data-custom
    args:
      - echo
      - |
        theta,r,size,color
        0,5,10,#1f77b4
        45,15,15,#ff7f0e
        90,20,20,#2ca02c
        135,10,25,#d62728
        180,25,30,#9467bd
traces:
  - name: Scatterpolargl Plot with Custom Markers
    model: ${ref(scatterpolargl-data-custom)}
    props:
      type: scatterpolargl
      theta: ?{theta}
      r: ?{r}
      mode: "markers"
      marker:
        size: ?{size}
        color: ?{color}
charts:
  - name: Scatterpolargl Chart with Custom Markers
    traces:
      - ${ref(Scatterpolargl Plot with Custom Markers)}
    layout:
      title:
        text: Scatterpolargl Plot with Custom Markers<br><sub>Custom Sizes and Colors for Polar Data Points</sub>

A schema to validate plotly trace properties

Attributes

These attributes apply to traces where trace.props.type is set to scatterpolargl. You would configure these attributes on the trace with the trace.props object.

connectgaps: boolean
customdata: array
customdatasrc: 'string' 
dr: number
dtheta: number
fill: any
fillcolor: any
hoverinfo: array
hoverinfosrc: 'string' 
hoverlabel:
  align: array
  alignsrc: 'string' 
  bgcolor: array
  bgcolorsrc: 'string' 
  bordercolor: array
  bordercolorsrc: 'string' 
  font:
    color: array
    colorsrc: 'string' 
    family: 'string | array' 
    familysrc: 'string' 
    lineposition: array
    linepositionsrc: 'string' 
    shadow: 'string | array' 
    shadowsrc: 'string' 
    size: array
    sizesrc: 'string' 
    style: array
    stylesrc: 'string' 
    textcase: array
    textcasesrc: 'string' 
    variant: array
    variantsrc: 'string' 
    weight: array
    weightsrc: 'string' 
  namelength: array
  namelengthsrc: 'string' 
hovertemplate: 'string | array' 
hovertemplatesrc: 'string' 
hovertext: 'string | array' 
hovertextsrc: 'string' 
ids: array
idssrc: 'string' 
legend: string
legendgroup: 'string' 
legendgrouptitle:
  font:
    color: any
    family: 'string' 
    lineposition: any
    shadow: 'string' 
    size: number
    style: any
    textcase: any
    variant: any
    weight: integer
  text: 'string' 
legendrank: number
legendwidth: number
line:
  color: any
  dash: any
  width: number
marker:
  angle: array
  anglesrc: 'string' 
  autocolorscale: boolean
  cauto: boolean
  cmax: number
  cmid: number
  cmin: number
  color: array
  coloraxis: string
  colorbar:
    bgcolor: any
    bordercolor: any
    borderwidth: number
    exponentformat: any
    len: number
    lenmode: any
    minexponent: number
    nticks: integer
    orientation: any
    outlinecolor: any
    outlinewidth: number
    separatethousands: boolean
    showexponent: any
    showticklabels: boolean
    showtickprefix: any
    showticksuffix: any
    thickness: number
    thicknessmode: any
    tickangle: number
    tickcolor: any
    tickfont:
      color: any
      family: 'string' 
      lineposition: any
      shadow: 'string' 
      size: number
      style: any
      textcase: any
      variant: any
      weight: integer
    tickformat: 'string' 
    tickformatstops: array
    ticklabeloverflow: any
    ticklabelposition: any
    ticklabelstep: integer
    ticklen: number
    tickmode: any
    tickprefix: 'string' 
    ticks: any
    ticksuffix: 'string' 
    ticktext: array
    ticktextsrc: 'string' 
    tickvals: array
    tickvalssrc: 'string' 
    tickwidth: number
    title:
      font:
        color: any
        family: 'string' 
        lineposition: any
        shadow: 'string' 
        size: number
        style: any
        textcase: any
        variant: any
        weight: integer
      side: any
      text: 'string' 
    x: number
    xanchor: any
    xpad: number
    xref: any
    y: number
    yanchor: any
    ypad: number
    yref: any
  colorscale: any
  colorsrc: 'string' 
  line:
    autocolorscale: boolean
    cauto: boolean
    cmax: number
    cmid: number
    cmin: number
    color: array
    coloraxis: string
    colorscale: any
    colorsrc: 'string' 
    reversescale: boolean
    width: array
    widthsrc: 'string' 
  opacity: array
  opacitysrc: 'string' 
  reversescale: boolean
  showscale: boolean
  size: array
  sizemin: number
  sizemode: any
  sizeref: number
  sizesrc: 'string' 
  symbol: array
  symbolsrc: 'string' 
metasrc: 'string' 
mode: any
name: 'string' 
opacity: number
r: array
rsrc: 'string' 
selected:
  marker:
    color: any
    opacity: number
    size: number
  textfont:
    color: any
showlegend: boolean
stream:
  maxpoints: number
  token: 'string' 
subplot: string
text: 'string | array' 
textfont:
  color: array
  colorsrc: 'string' 
  family: 'string | array' 
  familysrc: 'string' 
  size: array
  sizesrc: 'string' 
  style: array
  stylesrc: 'string' 
  variant: array
  variantsrc: 'string' 
  weight: array
  weightsrc: 'string' 
textposition: array
textpositionsrc: 'string' 
textsrc: 'string' 
texttemplate: 'string | array' 
texttemplatesrc: 'string' 
theta: array
thetasrc: 'string' 
thetaunit: any
type: scatterpolargl
uid: 'string' 
unselected:
  marker:
    color: any
    opacity: number
    size: number
  textfont:
    color: any
visible: any