Punctuation spiral¶
A text's punctuation and logical signs wound onto an Archimedean spiral.
lexograph.presets.punctuation_spiral.punctuation_spiral(text, *, turns=16.0, size_min=7.0, size_max=12.0, figsize=(9.0, 9.0))
¶
Draw a text's punctuation and logical signs as a spiral plate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
The source text. |
required |
turns
|
float
|
How many revolutions the spiral makes. |
16.0
|
size_min
|
float
|
Font size (points) of the innermost marks. |
7.0
|
size_max
|
float
|
Font size (points) of the outermost marks. |
12.0
|
figsize
|
tuple[float, float]
|
Figure size in inches. |
(9.0, 9.0)
|
Returns:
| Name | Type | Description |
|---|---|---|
A |
Figure
|
class: |
Figure
|
calls |
|
Figure
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Contract
- Returns a Figure with exactly one axes.
- Accent marks (logical/mathematical/Greek) are drawn larger and on top.
Examples:
>>> from lexograph import load_demo_text
>>> fig = punctuation_spiral(load_demo_text())
>>> type(fig).__name__
'Figure'
>>> len(fig.axes)
1
Source code in lexograph/presets/punctuation_spiral.py
lexograph.presets.punctuation_spiral.is_accent(char)
¶
Return whether char is a logical, mathematical, or Greek sign.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
char
|
str
|
A single character. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
|
Examples: