draw_dashed_circle
- ssapy.plotUtils.draw_dashed_circle(ax, normal_vector, radius, dashes, dash_length=0.1, label='Dashed Circle')[source][source]
Draw a dashed circle on a 3D axis with a given normal vector.
Parameters: - ax (matplotlib.axes._subplots.Axes3DSubplot): The 3D axis on which to draw the circle. - normal_vector (array-like): A 3-element array representing the normal vector to the plane of the circle. - radius (float): The radius of the circle. - dashes (int): The number of dashes to be used in drawing the circle. - dash_length (float, optional): The relative length of each dash, as a fraction of the circle’s circumference. Default is 0.1. - label (str, optional): The label for the circle. Default is ‘Dashed Circle’.
Returns: None
This function draws a dashed circle on a 3D axis. The circle is defined in the xy-plane, then rotated to align with the given normal vector. The circle is divided into dashes to create the dashed effect.
Example usage: ``` import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from your_module import draw_dashed_circle
fig = plt.figure() ax = fig.add_subplot(111, projection=’3d’) normal_vector = [0, 0, 1] radius = 5 dashes = 20
draw_dashed_circle(ax, normal_vector, radius, dashes)