In addition of the major widget toolkits (GTK, Qt, WxWidgets) mentioned in Wyzard's answer you could also consider more media oriented libraries like SFML or libSDL. If you just want some graphical output (with almost no interaction) you might even consider CairoGraphics.
In some cases you might use, thru a pipe (e.g. popen) or on the command line, command utilities like GNUplot or GraphViz.
You could also consider using the graphical abilities of your browser, e.g. by coding some dedicated web application (using some HTTP server library like Wt or libonion, with web technologies like AJAX, SVG, HTML5, canvas, websockets, etc...)
But most terminal emulators have no or too little graphical abilities (so no genuine pixel graphics). So you practically need your program to interact with the display server (X11, Wayland, ...).
DEC GT40
would be useful, but it's too expensive... :-)