Skip to content

Commit

Permalink
Add size_unit to API of the functions geom_point(), geom_text(), geom…
Browse files Browse the repository at this point in the history
…_label().
  • Loading branch information
ASmirnov-HORIS committed Apr 5, 2024
1 parent cc06099 commit 614ae4d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions python-package/lets_plot/plot/geom.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

def geom_point(mapping=None, *, data=None, stat=None, position=None, show_legend=None, sampling=None, tooltips=None,
map=None, map_join=None, use_crs=None,
size_unit=None,
color_by=None, fill_by=None,
**other_args):
"""
Expand Down Expand Up @@ -76,6 +77,9 @@ def geom_point(mapping=None, *, data=None, stat=None, position=None, show_legend
If an EPSG code is given, then all the coordinates in `GeoDataFrame` (see the `map` parameter)
will be projected to this CRS.
Specify "provided" to disable any further re-projection and to keep the `GeoDataFrame's` original CRS.
size_unit : {'x', 'y'}
Relate the size of the point to the length of the unit step along one of the axes.
If None, no fitting is performed.
color_by : {'fill', 'color', 'paint_a', 'paint_b', 'paint_c'}, default='color'
Define the color aesthetic for the geometry.
fill_by : {'fill', 'color', 'paint_a', 'paint_b', 'paint_c'}, default='fill'
Expand Down Expand Up @@ -197,6 +201,7 @@ def geom_point(mapping=None, *, data=None, stat=None, position=None, show_legend
sampling=sampling,
tooltips=tooltips,
map=map, map_join=map_join, use_crs=use_crs,
size_unit=size_unit,
color_by=color_by, fill_by=fill_by,
**other_args)

Expand Down Expand Up @@ -6036,6 +6041,7 @@ def geom_text(mapping=None, *, data=None, stat=None, position=None, show_legend=
label_format=None,
na_text=None,
nudge_x=None, nudge_y=None,
size_unit=None,
color_by=None,
**other_args):
"""
Expand Down Expand Up @@ -6095,6 +6101,9 @@ def geom_text(mapping=None, *, data=None, stat=None, position=None, show_legend=
Horizontal adjustment to nudge labels by.
nudge_y : float
Vertical adjustment to nudge labels by.
size_unit : {'x', 'y'}
Relate the size of the text to the length of the unit step along one of the axes.
If None, no fitting is performed.
color_by : {'fill', 'color', 'paint_a', 'paint_b', 'paint_c'}, default='color'
Define the color aesthetic for the geometry.
other_args
Expand Down Expand Up @@ -6242,6 +6251,7 @@ def geom_text(mapping=None, *, data=None, stat=None, position=None, show_legend=
label_format=label_format,
na_text=na_text,
nudge_x=nudge_x, nudge_y=nudge_y,
size_unit=size_unit,
color_by=color_by,
**other_args)

Expand All @@ -6253,6 +6263,7 @@ def geom_label(mapping=None, *, data=None, stat=None, position=None, show_legend
nudge_x=None, nudge_y=None,
label_padding=None, label_r=None, label_size=None,
alpha_stroke=None,
size_unit=None,
color_by=None, fill_by=None,
**other_args):
"""
Expand Down Expand Up @@ -6320,6 +6331,9 @@ def geom_label(mapping=None, *, data=None, stat=None, position=None, show_legend
Size of label border.
alpha_stroke : bool, default=False
Enable the applying of 'alpha' to 'color' (label text and border).
size_unit : {'x', 'y'}
Relate the size of the text label to the length of the unit step along one of the axes.
If None, no fitting is performed.
color_by : {'fill', 'color', 'paint_a', 'paint_b', 'paint_c'}, default='color'
Define the color aesthetic for the geometry.
fill_by : {'fill', 'color', 'paint_a', 'paint_b', 'paint_c'}, default='fill'
Expand Down Expand Up @@ -6475,6 +6489,7 @@ def geom_label(mapping=None, *, data=None, stat=None, position=None, show_legend
label_r=label_r,
label_size=label_size,
alpha_stroke=alpha_stroke,
size_unit=size_unit,
color_by=color_by, fill_by=fill_by,
**other_args)

Expand Down

0 comments on commit 614ae4d

Please sign in to comment.