utils.draw.AxisMultipleTicker¶
Class ยท Source
amticker = mdnc.utils.draw.AxisMultipleTicker(
den_major=2, den_minor=5, number=np.pi, symbol=r'\pi'
)
Use multiple locator to define the formatted axis. Inspired by the following post:
https://stackoverflow.com/a/53586826
This class is a factory class, which could produce 3 properties used for formatting a special axis (like a trigonometric axis): formatter, major_locator, minor_locator. See the Examples to view how to use it.
Arguments¶
Requries
| Argument | Type | Description |
|---|---|---|
den_major | int | The denominator for the major ticks. |
den_minor | int | The denominator for the minor ticks. |
number | float | The value that each symbol represents. |
symbol | int | The displayed symbol of the major ticks. |
Properties¶
formatter¶
amticker.formatter
The major formatter. Use the matplotlib API axis.set_major_formatter() to set it.
major_locator¶
amticker.major_locator
The major locator. Use the matplotlib API axis.set_major_locator() to set it.
minor_locator¶
amticker.minor_locator
The minor locator. Use the matplotlib API axis.set_set_minor_locator() to set it.
Examples¶
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
Last update: March 14, 2021