Circle#

circle mark is similar to point mark, except that (1) the shape value is always set to circle (2) they are filled by default.

Circle Mark Properties#

A circle mark definition can contain any standard mark properties and the following special properties:

Click to show table

Property

Type

Description

size

anyOf(number, ExprRef)

Default size for marks.

  • For point/circle/square, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.

  • For bar, this represents the band size of the bar, in pixels.

  • For text, this represents the font size, in pixels.

Default value:

  • 30 for point, circle, square marks; width/height’s step

  • 2 for bar marks with discrete dimensions;

  • 5 for bar marks with continuous dimensions;

  • 11 for text marks.

Scatter Plot with Circle#

Here is an example scatter plot with circle marks:

import altair as alt
from vega_datasets import data

source = data.cars.url

alt.Chart(source).mark_circle().encode(
   x=("Horsepower:Q"),
   y=("Miles_per_Gallon:Q"),
)