File: matrix_every.dem

package info (click to toggle)
gnuplot 5.2.6%2Bdfsg1-1%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 12,968 kB
  • sloc: ansic: 81,983; cpp: 7,323; makefile: 2,186; sh: 1,542; lisp: 667; perl: 302; pascal: 194; tcl: 88; python: 46
file content (42 lines) | stat: -rw-r--r-- 777 bytes parent folder | download
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
#
# 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 multiplot layout 2,2

set title "Full 7x7 matrix"
plot $Matrix matrix with image
set title "Subsample columns by every ::2::4"
plot $Matrix every ::2::4 matrix with image
set title "Subsample rows by every :::2::4"
plot $Matrix every :::2::4 matrix with image
set title "Sample alternate columns by every 2"
set xtics 2
set xrange [-1:7]
plot $Matrix every 2 matrix with image

unset multiplot

pause -1 "<cr> to continue"

reset