Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanjin Liu committed Mar 26, 2024
1 parent ad802fc commit fdeb303
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
6 changes: 3 additions & 3 deletions docs/categorical/cat_num.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,17 +229,17 @@ canvas = new_canvas("plotly", size=(400, 300))
canvas.show()
```

Each marker size can represent a numerical value. `with_size` will map the numerical
Each marker size can represent a numerical value. `update_size` will map the numerical
values of a column to the size of the markers.

``` python
``` python hl_lines="6"
#!name: categorical_axis_stripplot_by_size
canvas = new_canvas("matplotlib")
(
canvas
.cat_x(df, x="category", y="observation")
.add_stripplot()
.with_size("temperature")
.update_size("temperature")
)
canvas.show()
```
Expand Down
10 changes: 2 additions & 8 deletions whitecanvas/layers/_primitive/markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@
from typing_extensions import Self

from whitecanvas.layers import group as _lg
from whitecanvas.layers._mixin import (
ConstEdge,
ConstFace,
MultiEdge,
MultiFace,
)
from whitecanvas.layers._mixin import ConstEdge, ConstFace, MultiEdge, MultiFace

_void = _Void()
_Face = TypeVar("_Face", bound=FaceNamespace)
Expand All @@ -67,8 +62,7 @@ class Markers(

if TYPE_CHECKING:

def __new__(cls, *args, **kwargs) -> Markers[ConstFace, ConstEdge, float]:
...
def __new__(cls, *args, **kwargs) -> Markers[ConstFace, ConstEdge, float]: ...

def __init__(
self,
Expand Down

0 comments on commit fdeb303

Please sign in to comment.