require ("xfig"); public define slsh_main () { variable t = [0:50:0.1]; variable y = cos (2*PI*t)*exp(-t); variable w = xfig_plot_new (); w.world(0.05, 50, -1.0, 1.0; logx); w.xlabel("Time [s]"R); w.ylabel("Voltage [mV]"R); xfig_plot_set_point_color (w, "blue"); xfig_plot_set_point_size (w, 10); w.plot(t,y; sym="point", color="blue", fill=20, size=5); variable text = xfig_new_text ("Equation: \bf $e^{-t}\cos(2\pi t)$"R; color="red", style="sc"); text.set_depth(1); w.add_object (text, 2.5, 0.6, -0.5, 0); w.render ("color.png"); }