Skip to content

Commit 8f6bfb5

Browse files
committed
Add lines, areas, texts and tiles to yippie._Geom
1 parent 8d3d3ec commit 8f6bfb5

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

plotnine/_utils/yippie.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@
99
element_blank,
1010
element_rect,
1111
element_text,
12+
geom_area,
1213
geom_col,
14+
geom_line,
1315
geom_point,
16+
geom_text,
17+
geom_tile,
1418
ggplot,
1519
labs,
1620
theme,
@@ -69,6 +73,26 @@ def points(self):
6973
def cols(self):
7074
return geom_col(aes("cat", "value", fill="cat"), self.data)
7175

76+
@property
77+
def lines(self):
78+
return geom_line(
79+
aes("cat", "value", color="cat2", group="cat2"), self.data
80+
)
81+
82+
@property
83+
def areas(self):
84+
return geom_area(
85+
aes("cat", "value", fill="cat2", group="cat2"), self.data
86+
)
87+
88+
@property
89+
def texts(self):
90+
return geom_text(aes("cat", "value", label="cat"), self.data, size=16)
91+
92+
@property
93+
def tiles(self):
94+
return geom_tile(aes("cat", "cat2", fill="value"), self.data)
95+
7296

7397
class _Legend:
7498
"""

0 commit comments

Comments
 (0)