1/* -*-ePiX-*- */
2#include "epix.h"
3using namespace ePiX;
4
5// the function to be plotted
6double f(double x)
7{
8  return x*x;
9}
10
11int main()
12{
13  picture(P(-2,0), P(2,4), "2.5x2.5in");
14
15  begin();
16
17  pen(Black(0.3));
18  grid(8,8); // and coarse
19
20  pen(Black());
21  axis Ax(P(xmin(),0), P(xmax(),0), 4, P(0,-4), b);
22  axis Ay(P(0,ymin()), P(0,ymax()), 4, P(4, 0), r);
23
24  font_size("scriptsize");
25  Ax.draw();
26  Ay.unmark(0).draw();
27
28  bold(Red());
29  plot(f, xmin(), xmax(), 40);
30
31  end();
32}
33