File: circle.rst

package info (click to toggle)
python-altair 5.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,952 kB
  • sloc: python: 25,649; sh: 14; makefile: 5
file content (34 lines) | stat: -rw-r--r-- 775 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
.. currentmodule:: altair

.. _user-guide-circle-marks:

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 :ref:`standard mark properties <mark-properties>`
and the following special properties:

.. altair-object-table:: altair.MarkDef
   :properties: size

Scatter Plot with Circle
^^^^^^^^^^^^^^^^^^^^^^^^

Here is an example scatter plot with ``circle`` marks:

.. altair-plot::
   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"),
   )