Another wxWidgets-based option is wxArt2D, It has got tons of good features for drawing mathematical functions as curves, like you could easily pass this y=140*cos(x/20) + 80*cos(x*2/20) + 40*cos(x*4/20)" to a curve object and it will get drawn, it's amazing!
Check out these screenshots there are some curves drawn by equations in string format!