Skip to content
Internals

ellipse

Draws an ellipse for each data item. Like circle, but with independent width and height.

python
from gofish import ellipse

ellipse(w=24, h=30, fill="#e15759")

Signature

python
ellipse(w=None, h=None, fill=None, stroke=None, strokeWidth=None,
        debug=None) -> Mark

Parameters

ParameterTypeDescription
w, hint | strWidth / height — a constant or a field name
fillstrFill color — a constant or a field name
strokestrStroke color
strokeWidthintStroke width in pixels

Returns a Mark for use in .mark().

Examples

python
# Data-driven size
chart(data).flow(scatter(x="x", y="y")).mark(ellipse(w="width", h="height"))

# A circle is an ellipse with equal axes
ellipse(w=20, h=20, fill="#4e79a7")

Notes

  • Use circle when width and height are always equal — its single r option is simpler.