Skip to content

Commit

Permalink
DOC: RST to Markdown
Browse files Browse the repository at this point in the history
The conversion is definitely not complete.
  • Loading branch information
has2k1 committed Aug 10, 2023
1 parent 3911970 commit 94485d6
Show file tree
Hide file tree
Showing 111 changed files with 1,531 additions and 1,565 deletions.
4 changes: 2 additions & 2 deletions plotnine/_mpl/_plot_side_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
titles and offsetboxes that are anchored to axes are currently considered.
Internally, this module assumes that the margins (left margin, etc.) which are
differences between ``Axes.get_tightbbox`` and ``Axes.bbox`` are independent of
Axes position. This may fail if ``Axes.adjustable`` is ``datalim`` as well as
differences between `Axes.get_tightbbox` and `Axes.bbox` are independent of
Axes position. This may fail if `Axes.adjustable` is `datalim` as well as
such cases as when left or right margin are affected by xlabel.
"""
from __future__ import annotations
Expand Down
4 changes: 2 additions & 2 deletions plotnine/_mpl/_plotnine_tight_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
titles and offsetboxes that are anchored to axes are currently considered.
Internally, this module assumes that the margins (left margin, etc.) which are
differences between ``Axes.get_tightbbox`` and ``Axes.bbox`` are independent of
Axes position. This may fail if ``Axes.adjustable`` is ``datalim`` as well as
differences between `Axes.get_tightbbox` and `Axes.bbox` are independent of
Axes position. This may fail if `Axes.adjustable` is `datalim` as well as
such cases as when left or right margin are affected by xlabel.
"""
from __future__ import annotations
Expand Down
2 changes: 1 addition & 1 deletion plotnine/coords/coord.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def aspect(self, panel_params: panel_view) -> float | None:
Return desired aspect ratio for the plot
If not overridden by the subclass, this method
returns ``None``, which means that the coordinate
returns `None`, which means that the coordinate
system does not influence the aspect ratio.
"""
return None
Expand Down
17 changes: 7 additions & 10 deletions plotnine/coords/coord_cartesian.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,13 @@ class coord_cartesian(coord):
Parameters
----------
xlim : None | (float, float)
Limits for x axis. If None, then they are
automatically computed.
ylim : None | (float, float)
Limits for y axis. If None, then they are
automatically computed.
expand : bool
If `True`, expand the coordinate axes by
some factor. If `False`, use the limits
from the data.
xlim : tuple[float, float], default=None
Limits for x axis. If None, then they are automatically computed.
ylim : tuple[float, float], default=None
Limits for y axis. If None, then they are automatically computed.
expand : bool, default=True
If `True`, expand the coordinate axes by some factor. If `False`,
use the limits from the data.
"""

is_linear = True
Expand Down
24 changes: 11 additions & 13 deletions plotnine/coords/coord_fixed.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,22 @@ class coord_fixed(coord_cartesian):
----------
ratio : float
Desired aspect_ratio (:math:`y/x`) of the panel(s).
Default is 1.
xlim : None | (float, float)
Limits for x axis. If None, then they are
automatically computed.
ylim : None | (float, float)
Limits for y axis. If None, then they are
automatically computed.
expand : bool
If `True`, expand the coordinate axes by
some factor. If `False`, use the limits
from the data.
xlim : tuple[float, float], default=None
Limits for x axis. If None, then they are automatically computed.
ylim : tuple[float, float], default=None
Limits for y axis. If None, then they are automatically computed.
expand : bool, default=True
If `True`, expand the coordinate axes by some factor. If `False`,
use the limits from the data.
Notes
-----
To specify aspect ratio of the visual size for the axes use the
[](`~plotnine.themes.themeable.aspect_ratio`) themeable::
[](`~plotnine.themes.themeable.aspect_ratio`) themeable.
ggplot(data, aes('x', 'y')) + theme(aspect_ratio=0.5)
```python
ggplot(data, aes('x', 'y')) + theme(aspect_ratio=0.5)
```
When changing the `aspect_ratio` in either way, the `width` of the
panel remains constant (as derived from the
Expand Down
24 changes: 10 additions & 14 deletions plotnine/coords/coord_flip.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,19 @@ class coord_flip(coord_cartesian):
"""
Flipped cartesian coordinates
The horizontal becomes vertical, and vertical becomes
horizontal. This is primarily useful for converting
geoms and statistics which display y conditional
on x, to x conditional on y.
The horizontal becomes vertical, and vertical becomes horizontal.
This is primarily useful for converting geoms and statistics which
display y conditional on x, to x conditional on y.
Parameters
----------
xlim : None | (float, float)
Limits for x axis. If None, then they are
automatically computed.
ylim : None | (float, float)
Limits for y axis. If None, then they are
automatically computed.
expand : bool
If `True`, expand the coordinate axes by
some factor. If `False`, use the limits
from the data.
xlim : tuple[float, float], default=None
Limits for x axis. If None, then they are automatically computed.
ylim : tuple[float, float], default=None
Limits for y axis. If None, then they are automatically computed.
expand : bool, default=True
If `True`, expand the coordinate axes by some factor. If `False`,
use the limits from the data.
"""

def labels(self, cur_labels: labels_view) -> labels_view:
Expand Down
23 changes: 9 additions & 14 deletions plotnine/coords/coord_trans.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,16 @@ class coord_trans(coord):
Parameters
----------
x : str | trans
Name of transform or `trans` class to
transform the x axis
Name of transform or `trans` class to transform the x axis
y : str | trans
Name of transform or `trans` class to
transform the y axis
xlim : None | (float, float)
Limits for x axis. If None, then they are
automatically computed.
ylim : None | (float, float)
Limits for y axis. If None, then they are
automatically computed.
expand : bool
If `True`, expand the coordinate axes by
some factor. If `False`, use the limits
from the data.
Name of transform or `trans` class to transform the y axis
xlim : tuple[float, float], default=None
Limits for x axis. If None, then they are automatically computed.
ylim : tuple[float, float], default=None
Limits for y axis. If None, then they are automatically computed.
expand : bool, default=True
If `True`, expand the coordinate axes by some factor. If `False`,
use the limits from the data.
"""

trans_x: Trans
Expand Down
Loading

0 comments on commit 94485d6

Please sign in to comment.