Skip to content

Commit

Permalink
testing RectangularReinforcedCrossSection
Browse files Browse the repository at this point in the history
  • Loading branch information
egarciamendez committed Nov 6, 2024
1 parent a7647da commit 68f6ee7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def plot(
custom_text_height: str | None = None,
offset_line_width: float = 1.25,
offset_line_height: float = 1.2,
center_line_style: dict[str, float | str] | None = None,
show: bool = False,
axes_i: int = 0,
) -> plt.Figure:
Expand Down Expand Up @@ -77,6 +78,8 @@ def plot(
Offset of the width line.
offset_line_height: float
Offset of the height line.
center_line_style: dict[str, float | str] | None
Style of the center lines. Check matplotlib documentation for more information (Annotation-arrowprops).
show: bool
Show the plot.
axes_i: int
Expand All @@ -89,7 +92,7 @@ def plot(
"""
self._start_plot(figsize=figsize)
self._add_rectangle(axes_i=axes_i)
self._add_center_lines(axes_i=axes_i)
self._add_center_lines(axes_i=axes_i, style=center_line_style)
self._add_dimension_lines(
axes_i=axes_i,
font_size_dimension=font_size_dimension,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def test_add_longitudinal_reinforcement_by_quantity_wrong_edge(

def test_plot(self, rectangular_reinforced_cross_section: RectangularReinforcedCrossSection) -> None:
"""Test the plot method."""
plot = rectangular_reinforced_cross_section.plot(show=False)
plot = rectangular_reinforced_cross_section.plot(show=False, center_line_style={"linewidth": 0.85})
assert isinstance(plot, plt.Figure)

def test_reinforcement_weight_longitudinal_bars(self, rectangular_reinforced_cross_section: RectangularReinforcedCrossSection) -> None:
Expand Down

0 comments on commit 68f6ee7

Please sign in to comment.