Skip to content

Commit e2b58c6

Browse files
committed
DOC: Add glossary term for aes expression
1 parent 232cd59 commit e2b58c6

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@
435435
'geom': ':term:`geom`',
436436
'stat': ':term:`stat`',
437437
'position': ':term:`position`',
438+
'expression': ':term:`expression`',
438439
}
439440

440441

doc/glossary.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,16 @@ Glossary of Common Terms
1515

1616
position
1717
A subclass of :class:`~plotnine.positions.position.position`.
18+
19+
expression
20+
A python expression wrapped in a string. The expression can
21+
refer to variables in the user environment and columns in
22+
the dataframe.
23+
24+
The following may be valid expressions::
25+
26+
'col1'
27+
'col1 + col2'
28+
'np.sin(col1)'
29+
'"string-value"'
30+

plotnine/aes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ class aes(dict):
3232
3333
Parameters
3434
----------
35-
x : str | array_like | scalar | str-expression
35+
x : expression | array_like | scalar
3636
x aesthetic mapping
37-
y : str | array_like | scalar | str-expression
37+
y : expression | array_like | scalar
3838
y aesthetic mapping
39-
\*\*kwargs : dict
39+
**kwargs : dict
4040
Other aesthetic mappings
4141
4242
Notes

0 commit comments

Comments
 (0)