eyepy.core.plotting
plot_scalebar(scale, scale_unit, scale_length=None, pos=(100, 100), flip_x=False, flip_y=False, color='white', linewidth=1.5, ax=None, **kwargs)
Plot a scalebar for an image.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scale |
tuple[float, float]
|
tuple of floats (x, y) with the scale in units per pixel. If the |
required |
scale_unit |
str
|
unit of the scalebar ("px" or "µm", or "mm") |
required |
scale_length |
Optional[Union[int, float]]
|
length of the scalebar in units |
None
|
pos |
tuple[int, int]
|
position of the scalebar in pixels |
(100, 100)
|
flip_x |
bool
|
flip the scalebar in x direction |
False
|
flip_y |
bool
|
flip the scalebar in y direction |
False
|
color |
str
|
color of the scalebar |
'white'
|
linewidth |
float
|
linewidth of the scalebar |
1.5
|
ax |
Optional[Axes]
|
matplotlib axis to plot on |
None
|
**kwargs |
dict
|
additional keyword arguments passed to ax.plot |
{}
|
Returns: None
Source code in src/eyepy/core/plotting.py
plot_watermark(ax)
Add a watermark in the lower right corner of a matplotlib axes object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ax |
Axes
|
Axes object |
required |
Returns: None