Yes, you can do this in C. It is possible to do in any programming language that accepts calling external code in some way. Usually you will use some library that does this. You can use a library only for one of these platforms quoted in the question or one that works at all. You can use a lower level or one with more abstractions.
You have a question that cites some libraries that are not plot specific but can be used for this as well. Some have specific components for charting.
Some people prefer something more specific, such as SDL . Or at a lower level DirectX just for Windows or OpenGL ( cross-platform ).
Maybe you like some more specific still like GNUPlot .
But just make a decision after knowing enough. All have advantages and disadvantages and best meets every need.