Skip to content

Commit

Permalink
plot_draw: Reorganize and update functions
Browse files Browse the repository at this point in the history
black format
  • Loading branch information
PointlessUser committed Aug 14, 2024
1 parent d021ff4 commit 6d26dbb
Show file tree
Hide file tree
Showing 2 changed files with 457 additions and 482 deletions.
30 changes: 11 additions & 19 deletions PyTests/test_plot_draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,24 @@ def run_all_functions():
# Draw an arc of a circumference
draw_semicircle(radius=0.5, start_angle=0, end_angle=np.pi / 2)

create_blank_canvas()
blank_canvas()

# Draw three axes
draw_three_axes(
arrow_length=0.4,
arrow_thickness=2,
text_offset=0.05,
longx=1.5,
axis_y_negative=True,
axis_x_negative=True,
negative_y=True,
negative_x=True,
)

# Draw two inclined axes
draw_two_inclined_axes(
arrow_length=0.4,
arrow_thickness=2,
text_offset=0.05,
longx=1.5,
draw_negative_y=True,
draw_negative_x=True,
negative_y=True,
negative_x=True,
)

# Draw a custom circle
Expand All @@ -81,9 +79,8 @@ def run_all_functions():
arrow_length=0.4,
line_thickness=2,
text_offset=0.05,
longx=1.5,
negativeaxis_y=1,
negativeaxis_x=1,
negative_y=True,
negative_x=True,
)

# Draw a double arrowhead
Expand All @@ -94,20 +91,15 @@ def run_all_functions():
arrow_length=0.4,
line_thickness=2,
text_offset=0.05,
longx=1.5,
negativeaxis_y=1,
negativeaxis_x=1,
negative_y=True,
negative_x=True,
)

# Vertical arrow rain
vertical_arrow_rain(
quantity_arrows=5, start=(0.1, 0.9), end=(0.9, 0.9), y_origin=0.5
)
vertical_arrow_rain(quantity=5, start=(0.1, 0.9), end=(0.9, 0.9), y_origin=0.5)

# Horizontal arrow rain
horizontal_arrow_rain(
quantity_arrows=5, x_origin=0.5, start=(0.1, 0.1), end=(0.1, 0.9)
)
horizontal_arrow_rain(quantity=5, x_origin=0.5, start=(0.1, 0.1), end=(0.1, 0.9))

# Calculate angle between two points
angle = calculate_angle((0, 0), (1, 1), degrees=True)
Expand Down
Loading

0 comments on commit 6d26dbb

Please sign in to comment.