geometor.render.plotter

class geometor.render.plotter.Plotter(plot_name: str | None = None, margin_ratio=0.1, FIG_W=16, FIG_H=9)[source]

Bases: object

The Plotter class handles the fundametals for rendering a geometric construction

parameters

  • name : str: establish name for the model instance

attributes

methods

reset_ax_all() None[source]
reset_ax_main() None[source]
reset_ax_header() None[source]
set_ax_main_bounds(bounds)[source]
annotate_point(point: Point, text)[source]

Annotate the given point with the provided text on the given axes.

plot_point(pt: sp_Point, label: str, classes: list = None) list

plot the point with corresponding styles returns a list of artists

plot_selected_points(pts: list[spg.Point]) list
plot_circle_points(pts: list[spg.Point]) list
plot_line(line: spg.Line, classes: list = None) list[mp.Line2D]

returns list of plot artists

plot_selected_line(line: spg.Line, classes: list = None) list[mp.Line2D]

returns list of plot artists

plot_circle(circle: spg.Circle, classes: list = None) list[plt.Circle]

takes a sympy circle and plots with the matplotlib Circle patch

plot_selected_circle(circle: spg.Circle, classes: list = None) list[plt.Circle]
plot_segment(segment: spg.Segment, style_type: str = None, classes: list = None) list
plot_line_segment(line: spg.Line, classes: list = None) list
plot_circle_radius(radius_segment: spg.Segment, classes: list = None) list
plot_polygon(poly: spg.Polygon, classes: list = None)

takes a sympy Polygon and plots with the matplotlib Polygon patch

plot_wedge(wedge: Wedge, classes: list = None) list[mp.patch.Wedge]

takes a geometor.model.Wedge and maps it to a matplotlib patch

plot_element(index, el, model)

instanstiates and returns a PlotElement object containing all the necessary matplotlib artifacts for rendering a geometric element

plot_model(model: Model, annotate_points=False)[source]
plot_header(text)[source]

sets up one panel for header

sets up 3 panels in footer for index, description and label

set_plotter_limits_from_points(points)[source]
zoom_to_points(zoom_pts)[source]
zoom_to_bounds()[source]