File: polargrid.dem

package info (click to toggle)
gnuplot 6.0.3%2Bdfsg1-1~exp2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 14,960 kB
  • sloc: ansic: 95,874; cpp: 7,199; makefile: 2,470; javascript: 2,339; sh: 1,531; lisp: 664; perl: 304; pascal: 191; tcl: 88; python: 46
file content (86 lines) | stat: -rw-r--r-- 1,900 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#
# Exercise polar gridded surfaces
#	configure --enable-polar-grid
#
# Current bugs:
# - R_AXIS.min nonzero produces an odd plot
#	although to be fair it matches existing polar plots
# - polar border should not be clipped by border if the border
#	is not drawn (but this would break polar_quadrants.dem
#

if (!strstrt(GPVAL_COMPILE_OPTIONS, "+POLARGRID")) {
    print "This copy of gnuplot does not support polar gridding"
    exit  # return to caller
}

set key rmargin vertical top title "Polar gridded surface" font ":Bold"
set key samplen 0.5
set lmargin 5
set rmargin screen 0.7

set ang degree
set polar
set polar grid 36,12 theta [-20:210]

set rrange [*:*] noextend
set isotropic

set tics front
unset xtics
unset ytics
set rtics 50
set ttics 0,30,330
set border 0 polar
unset colorbox

plot 'silver.dat' using 1:2:3 with surface title "qnorm 1", \
     '' using 1:2:3 with points pt 7 lc "green" title "with points"

show polar
show rrange

pause -1 "<cr> to continue"

set style fill solid
set multiplot
    set key title "Polar grid with masking"
    set polar grid theta [-20:30] r [*:*]
    replot
    unset key
    set polar grid theta [30:120] r [0:200]
    replot
    set polar grid theta [120:-20] r [0:100]
    replot
unset multiplot
unset polar grid
unset style fill

pause -1 "<cr> to continue"

set key rmargin vertical top title "Polar gridded surface" font ":Bold"
set polar grid 360, 50 theta [0:360] gauss kdensity scale 30
set grid front
set palette cubehelix negative
set theta top clockwise
set colorbox user origin 0.8, 0.2 size 0.04, 0.6

plot 'silver.dat' using 1:2:3 with surface title "gauss kdensity", \
     '' using 1:2:3 with points pt 7 lc "green" title "with points"

show polar
show theta

pause -1 "<cr> to try logscale R"

set log r
set rrange [10:*]
set rlabel "log(r)" left offset 5

set rtics (25,50,100,200)
replot

pause -1 "<cr> to continue"

reset