! ! -- user_function_plot.gle example of plotting a user defined function ! size 10 10 set font texcmr set hei 0.5 amove 0 0 sub my_function x b c return b*sin(2*pi*x/c) end sub begin graph scale auto let d1 = 3*x^2+x^3 from -5 to 5 nsteps 1000 d1 line color GREEN lwidth 0.05 key "3x^2+x^3" let d2 = my_function(x,50,3) from -5 to 5 nsteps 1000 d2 line color BLUE lwidth 0.03 key "sine wave" xtitle "foo" ytitle "bar" end graph