Python Plotting Using Class
<p>I have to define a class point(x,y) that represents a point in a Euclidean plane, which I completed with:</p>

<pre><code>class point():
    def __init__(P,x,y):
        P.x=x
        P.y=y
</code></pre>

<p>Now I must extend this class by creating methods that will:</p>

<ol>
<li>Return a point A that is a vertical reflection of P across the horizontal line at y using <code>A=P.verticalReflect(y)</code>.</li>
<li>Return a point B that translates the point P a distance of x in the x-direction and a distance of y in the y-direction using <code>B=P.translate(x,y)</code>.</li>
<li>Display a point using pyplot using <code>P.display(options)</code>. I should be able to let the user print a label, set the font size and offset from the point.</li>
</ol>

<p>An example of code that will initiate the class created would be:</p>

<pre><code>P=point(2,3)
P.display(label="P",labeloffset=0.2)

A=P.verticalReflect(y=3.5)
A.display(c="green",label="A",labeloffset=0.1)
plt.axhline(y=3.5,c="k",ls="--")
</code></pre>

<p>I'm having trouble figuring out where to start to define these new methods in the class.</p>