objects.py 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. """
  2. A declarative, object-oriented interface for creating statistical graphics.
  3. The seaborn.objects namespace contains a number of classes that can be composed
  4. together to build a customized visualization.
  5. The main object is :class:`Plot`, which is the starting point for all figures.
  6. Pass :class:`Plot` a dataset and specify assignments from its variables to
  7. roles in the plot. Build up the visualization by calling its methods.
  8. There are four other general types of objects in this interface:
  9. - :class:`Mark` subclasses, which create matplotlib artists for visualization
  10. - :class:`Stat` subclasses, which apply statistical transforms before plotting
  11. - :class:`Move` subclasses, which make further adjustments to reduce overplotting
  12. These classes are passed to :meth:`Plot.add` to define a layer in the plot.
  13. Each layer has a :class:`Mark` and optional :class:`Stat` and/or :class:`Move`.
  14. Plots can have multiple layers.
  15. The other general type of object is a :class:`Scale` subclass, which provide an
  16. interface for controlling the mappings between data values and visual properties.
  17. Pass :class:`Scale` objects to :meth:`Plot.scale`.
  18. See the documentation for other :class:`Plot` methods to learn about the many
  19. ways that a plot can be enhanced and customized.
  20. """
  21. from seaborn._core.plot import Plot # noqa: F401
  22. from seaborn._marks.base import Mark # noqa: F401
  23. from seaborn._marks.area import Area, Band # noqa: F401
  24. from seaborn._marks.bar import Bar, Bars # noqa: F401
  25. from seaborn._marks.dot import Dot, Dots # noqa: F401
  26. from seaborn._marks.line import Dash, Line, Lines, Path, Paths, Range # noqa: F401
  27. from seaborn._marks.text import Text # noqa: F401
  28. from seaborn._stats.base import Stat # noqa: F401
  29. from seaborn._stats.aggregation import Agg, Est # noqa: F401
  30. from seaborn._stats.counting import Count, Hist # noqa: F401
  31. from seaborn._stats.density import KDE # noqa: F401
  32. from seaborn._stats.order import Perc # noqa: F401
  33. from seaborn._stats.regression import PolyFit # noqa: F401
  34. from seaborn._core.moves import Dodge, Jitter, Norm, Shift, Stack, Move # noqa: F401
  35. from seaborn._core.scales import ( # noqa: F401
  36. Boolean, Continuous, Nominal, Temporal, Scale
  37. )