Up||Pre||Next

GNUPLOT-3.7 demo: mgr.dem

#
# $Id: mgr.dem,v 1.4 1997/01/05 22:03:11 drd Exp $
#
pause 0 "Watch some  cubic splines"

set samples 50
set xlabel "Angle (deg)"
set ylabel "Amplitude"
set title "Brag-Reflex -- Peak only"
plot "big_peak.dat" title "Rate" with errorbars, \
                 "" smooth csplines t "Rate"
all-dem015
pause -1 "You would draw smaller bars? " set bars small replot
all-dem016
set bars large # pause -1 "An approx-spline demo "
set samples 300 set xlabel "Time (sec)" set ylabel "Rate" set title "Ag 108 decay data" plot "silver.dat" t "experimental" w errorb, \ "" smooth csplines t "cubic smooth"
all-dem017
# error is column 3; weight larger errors less # start with rel error = 1/($3/$2) pause -1 "Now apply a smoothing spline, weighted by 1/rel error " S=1 plot "silver.dat" t "experimental" w errorb,\ "" u 1:2:(S*$2/$3) smooth acsplines t "acspline Y/Z"
all-dem018
pause -1 "Make it smoother by changing the smoothing weights " plot "silver.dat" t "rate" w errorb,\ "" u 1:2:($2/($3*1.e1)) sm acs t "acspline Y/(Z*1.e1)",\ "" u 1:2:($2/($3*1.e3)) sm acs t " Y/(Z*1.e3)",\ "" u 1:2:($2/($3*1.e5)) sm acs t " Y/(Z*1.e5)"
all-dem019
pause -1 "Accentuate the relative changes with a log-scale " set logscale y replot
all-dem020
pause -1 "Now approximate the data with a bezier curve between the endpoints"
set nologscale y plot "silver.dat" t "experimental" w errorb,\ "" smooth sbezier t "bezier"
all-dem021
pause -1 "You would rather use log-scales ? " set logscale y plot "silver.dat" t "rate" w errorb, \ "" smooth sbezier t "bezier"
all-dem022
# pause -1 "Errorbar demo " set samples 100 set nologscale set xlabel "Resistance [Ohm]" set ylabel "Power [W]" set title "UM1-Cell Power" n(x)=1.53**2*x/(5.67+x)**2 plot [0:50] "battery.dat" t "Power" with xyerrorbars, n(x) t "Theory" w lines
all-dem023
pause -1 "Would you like boxes? " plot [0:50] "battery.dat" t "Power" with boxxy, n(x) t "Theory" w lines
all-dem024
pause -1 "Only X-Bars? " plot [0:50] "battery.dat" u 1:2:3 t "Power" w xerr, n(x) t "Theory" w lines
all-dem025
pause -1 "Only Y-Bars? " plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines
all-dem026
pause -1 "Logscaled? " set logscale y plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines
all-dem027
pause -1 "X as well? " set logscale xy plot [1:50] "battery.dat" t "Power" w xyerr, n(x) t "Theory" w lines
all-dem028
pause -1 "If you like bars without tics " set nologscale set bars small plot [0:50] "battery.dat" t "Power" with xyerrorbars, n(x) t "Theory" w lines
all-dem029
pause -1 "X-Bars only " plot [0:50] "battery.dat" u 1:2:3 t "Power" w xerr, n(x) t "Theory" w lines
all-dem030
pause -1 "Y-Bars only " plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines
all-dem031
set bars large set xlabel "" set ylabel "" set title ""

Up||Pre||Next