draw graphics to stdout in solaris

Hi all..
I am trying to draw a line on the monitor on sun platform machine. I tried a simple program.

#include<stdio.h>
#include<plot.h>

int main()
{
openpl();
linemod("dotted");
line(1000,1000,2000,2000);
closepl();
return 0;
}

It doesn't produce the desired result.

If one knows how to draw a line on the monitor on sun platform, please guide me.