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
plot_name
->str
: name of the modelmargin
->float
: margin for the plotFIG_W
->int
: width of the figureFIG_H
->int
: height of the figureax_main
->matplotlib.axes.Axes
: Axes for the main graphax_header
->matplotlib.axes.Axes
: Axes for the header panelax_footer
->matplotlib.axes.Axes
: Axes for the footer panelfigure
->matplotlib.figure.Figure
: the main figure of the plot
methods
plot_line()
->Line
- 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_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_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
sets up 3 panels in footer for index, description and label