-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
352 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,5 @@ | ||
from ._version import __version__ | ||
from .input import impact_force_properties, vibration_properties | ||
from .results import impact_force_result, vibration_result | ||
|
||
__all__ = [ | ||
"__version__", | ||
"impact_force_properties", | ||
"impact_force_result", | ||
"vibration_result", | ||
"vibration_properties", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from __future__ import annotations | ||
|
||
from matplotlib import pyplot as plt | ||
from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar | ||
|
||
|
||
def _north_arrow(axes: plt.Axes) -> None: | ||
"""Add north arrow to axes""" | ||
x, y, arrow_length = 0.05, 0.98, 0.1 | ||
axes.annotate( | ||
"N", | ||
xy=(x, y), | ||
xytext=(x, y - arrow_length), | ||
arrowprops=dict(facecolor="black", width=5, headwidth=15), | ||
ha="center", | ||
va="center", | ||
fontsize=20, | ||
xycoords=axes.transAxes, | ||
) | ||
|
||
|
||
def _scalebar(axes: plt.Axes) -> None: | ||
"""Add size bar to axes""" | ||
scalebar = AnchoredSizeBar( | ||
axes.transData, | ||
20, | ||
"20 m", | ||
"lower left", | ||
pad=1, | ||
color="black", | ||
frameon=True, | ||
size_vertical=2, | ||
) | ||
|
||
axes.add_artist(scalebar) |
Oops, something went wrong.