I'm trying to plot a piecewise function with points at the end of
functions, but I'm running into trouble getting gnuplot to recognize
different point types. Any help would be most appreciated.
clear
reset
set term postscript eps enh 20
set output "multiplot.eps"
set nokey
#set style line 1 lt 1 lw 3
f1(x)=(x<0) ? 0 : sqrt(-1)
f2(x) = 0<=x && x<1 ? 0.2 : 1/0
f3(x) = 1<=x && x<2 ? 0.7 : 1/0
f4(x) = 2<=x && x<3 ? 0.9 : 1/0
f5(x) = 3<=x ? 1 : 1/0
plot [-1:4][-.25:1.25] f1(x) ls 1, \
f2(x) ls 1, \
f3(x) ls 1, \
f4(x) ls 1, \
f5(x) ls 1, \
"-" using 1:2 pt 6
0 0
1 0.2
2 0.7
3 0.9
"-" using 1:2 pt 7
0 0.2
1 0.7
2 0.9
3 1
end \