Before diving into some more graph types, it's about time we started adding axes and scales. If we don't have those, there really is no way to properly interpret our nice charts.
In this recipe we will add a horizontal and vertical axis to the sine graph we created in the previous recipe. We will also add markers and labels.
This recipe continues to expand the
Graph class presented in the previous recipe. So if you haven't written that yet, copy it from the provided sources.
Next, create a
Recipe4 class, just as we did in the previous recipes.
axes, we will add two methods to the
Graph class. They are as follows:
public function drawVerticalAxis(x:Number, y1:Number, y2:Number)
public function ...