Can I make a plot?

This is a discussion on Can I make a plot? within the C++ Programming forums, part of the General Programming Boards category; Let's say I've got the following function. It outputs an array that represents a sine wave for two periods. Is ...

Can I make a plot?

Let's say I've got the following function. It outputs an array that represents a sine wave for two periods. Is there a way I can ouput it to my screen so that it makes graph? I've used GNUplot but I was wondering if there was a way I could do it dirrectly in C++. Could this also be done in C?