discrimintools.fviz_circle#

discrimintools.fviz_circle(p, r=1.0, x0=0.0, y0=0.0, color='black')[source]#

Add a circle with plotnine

Draw (add) a circle with plotnine based on center and radius

Parameters:
  • p (class) – An object of class ggplot.

  • r (float, default = 1.0) – Radius.

  • x0 (float, default = 0.0) – x center.

  • y0 (float, default = 0.0) – y center.

  • color (str, default = ‘black’) – Color of the circle.

Returns:

p – A object of class ggplot.

Return type:

class

Examples

>>> from plotnine import ggplot, theme_minimal
>>> from discrimintools import fviz_circle
>>> p = fviz_circle(ggplot()) + theme_minimal()
../../_static/fviz_circle.png

Fig. 23 Draw circle ggplot#