File: zsort.dem

package info (click to toggle)
gnuplot 6.0.2%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 14,940 kB
  • sloc: ansic: 95,319; cpp: 7,590; makefile: 2,470; javascript: 2,328; sh: 1,531; lisp: 664; perl: 304; pascal: 191; tcl: 88; python: 46
file content (35 lines) | stat: -rw-r--r-- 816 bytes parent folder | download | duplicates (3)
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
#
# Test utility of sorting points on z (palette color)
#
save_encoding = GPVAL_ENCODING
set encoding utf8

set print $DATA
do for [i=1:10000:1] {
    print rand(0), rand(0), invnorm(rand(0))
}
unset print

# -3 sigma = white  +3 sigma = dark
set palette cubehelix negative
set lmargin at screen 0.05
unset tics
set xlabel "Factor 1 (x)"
set ylabel "Factor 2 (y)" offset -1
set cbrange [-3:3]
set cblabel "Z-score"
set cbtics 1 format "%.0gσ"

set pointsize 1.5

set title "Random ordering on z\nhigh-value points are randomly obscured"
plot $DATA using 1:2:3 with points lc palette

pause -1 "Hit return to continue"

set title "Sort on z before plotting\nhigh-value points are toward the viewer"
plot $DATA using 1:2:3:3 zsort with points lc palette

pause -1 "Hit return to continue"

set encoding save_encoding