An alternate approach to gotoxy() would be to create a 2D array of characters, initialize all the characters to (space), and then set each point of the graph to '*'. After you've 'drawn' the graph on your array, just print the whole thing.
Code:
int i; //used in for loop
//2D array in the form [y][x], for convenience
char screen[11][17]; //17: 16 points, 1 '\n' (also '\0' in the beginning)
//Initialize the array
for(i = 0; i < 11; ++i)
{
strcpy(screen[i], " ");
screen[i][16] = '\n';
}
screen[10][16] = '\0';
//Do your graphing; be sure your graph doesn't go farther than (10, 15),
//and remember that the array is in format [y][x], and finally,
//remember that the y coordinate is upside down.
//Print the array (interpret it as a huge long string)
printf("%s", (char*)screen); //I'm used to C++, not sure if this is how you print it...
Something like that would be a neat solution, I think. And, it's standard (which I don't think gotoxy() is).