Skip to content

Commit

Permalink
[query/ggplot] Updates API reference to include faceting (#12569)
Browse files Browse the repository at this point in the history
  • Loading branch information
iris-garden authored May 24, 2023
1 parent e90cf2b commit dc384d0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
17 changes: 15 additions & 2 deletions hail/python/hail/docs/ggplot/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ currently uses plotly to generate plots, as opposed to ``hl.plot``, which uses b
.. rubric:: Scales

.. autosummary::
:nosignatures
:nosignatures:

scale_x_continuous
scale_x_discrete
Expand Down Expand Up @@ -104,6 +104,19 @@ currently uses plotly to generate plots, as opposed to ``hl.plot``, which uses b
.. autofunction:: scale_fill_manual
.. autofunction:: scale_fill_identity


.. rubric:: Facets

.. autosummary::
:nosignatures:

facet_wrap
vars

.. autofunction:: facet_wrap
.. autofunction:: vars


.. rubric:: Labels

.. autosummary::
Expand All @@ -121,4 +134,4 @@ currently uses plotly to generate plots, as opposed to ``hl.plot``, which uses b

.. autoclass:: GGPlot
.. autoclass:: Aesthetic
.. autoclass:: FigureAttribute
.. autoclass:: FigureAttribute
6 changes: 3 additions & 3 deletions hail/python/hail/ggplot/facets.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ def vars(*args: Expression) -> StructExpression:
Parameters
----------
*args: class:`.Expression`
*args: :class:`hail.expr.Expression`
Fields to facet by.
Returns
-------
:class:`StructExpression`
:class:`hail.expr.StructExpression`
A struct to pass to a faceter.
"""
Expand All @@ -32,7 +32,7 @@ def facet_wrap(facets: StructExpression, *, nrow: int = None, ncol: int = None,
Parameters
----------
facets: :class:`StructExpression` created by `hl.ggplot.vars` function.
facets: :class:`hail.expr.StructExpression` created by `hl.ggplot.vars` function.
The fields to facet on.
nrow: :class:`int`
The number of rows into which the facets will be spread. Will be ignored if `ncol` is set.
Expand Down

0 comments on commit dc384d0

Please sign in to comment.