## Line ### Yaml ```yaml A: point(-5,-5) B: point(5,5) line: Line(A,B) ``` ### Python ```python A = point(-5,-5) B = point(5,5) line = Line(A,B) ``` ## Code to get the result Using the following framework in a jupyter notebook ```python [1]: %matplotlib widget [2]: from pysketcher import * [3]: drawing_tool.set_coordinate_system(xmin=-10, xmax=10,ymin=-10, ymax=10,axis=True) [4]: drawing_tool.mpl.gcf().canvas ``` for Yaml, you need the added steps ```python head = """\ libraries: ["from math import tan, radians, sin, cos","from pysketcher import *"] """ myfig={} sketchParse(head,myfig) ``` ### Yaml ```python myfig={} sketch=""" # put here the yaml 'object' definition """ drawing_tool.erase() sketchParse(sketch,myfig) # replace 'object' by the actual one d = myfig['object'].draw() drawing_tool.display() ``` ### Python ```python drawing_tool.erase() # put the code of the object case here # replace object by the actual name line, rectangle, circle... object.draw() drawing_tool.display() ```