1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
#
# Exercise use of 'every' subsampling with image plots
# This was a regression in 5.0.3
#
$Matrix << EOM
3 3 3 3 3 3 3
3 4 4 4 4 4 3
3 4 5 5 5 4 3
3 4 5 6 5 4 3
3 4 5 5 5 4 3
3 4 4 4 4 4 3
3 3 3 3 3 3 3
EOM
unset key
set ticscale 0
set border 0
set xrange [-0.5:6.5]
set yrange [-0.5:6.5]
set grid lt -1
set cbrange [3:6]
unset colorbox
set style textbox opaque
set multiplot layout 2,2
set title "Full 7x7 matrix"
plot $Matrix matrix with image
set title "Subsample columns by every ::2::4"
stats $Matrix every ::2::4 matrix noout
set xlabel sprintf("%d x %d submatrix", STATS_size_x, STATS_size_y)
set xlabel offset 0,1.5 boxed
plot $Matrix every ::2::4 matrix with image
set title "Subsample rows by every :::2::4"
stats $Matrix every :::2::4 matrix noout
set xlabel sprintf("%d x %d submatrix", STATS_size_x, STATS_size_y)
set xlabel offset 0,1.5 boxed
plot $Matrix every :::2::4 matrix with image
set title "Sample alternate columns by every 2"
set xtics 2
set xrange [-1:7]
unset xlabel
plot $Matrix every 2 matrix with image
unset multiplot
pause -1 "<cr> to continue"
reset
|