File: polar.dem

package info (click to toggle)
gnuplot 5.0.5%2Bdfsg1-6%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 12,800 kB
  • ctags: 8,062
  • sloc: ansic: 78,152; cpp: 6,981; makefile: 2,075; sh: 1,343; lisp: 655; perl: 302; awk: 235; pascal: 194; tcl: 88; python: 46
file content (68 lines) | stat: -rw-r--r-- 1,311 bytes parent folder | download | duplicates (8)
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
#
# $Id: polar.dem,v 1.8 2010/11/19 05:15:03 sfeam Exp $
#
# Show some of the new polar capabilities.
#
unset border
set clip
set polar
set xtics axis nomirror
set ytics axis nomirror
unset rtics
set samples 160
set zeroaxis
set trange [0:2*pi]
set title "Three circles (with aspect ratio distortion)"
plot .5,1,1.5
pause -1 "Hit return to continue"
set title ""
set key box

plot cos(2*t)
pause -1 "Hit return to continue"

plot 2*sqrt(cos(t)),-2*sqrt(cos(t))
pause -1 "Hit return to continue"

plot sin(4*t),cos(4*t)
set offset 0,0,0,0
pause -1 "Hit return to continue"

set xrange [-5:5]
set yrange [-5:5]
plot t/cos(3*t)
pause -1 "Hit return to continue"
set autoscale

plot 1-sin(t)
pause -1 "Hit return to continue"

set trange [0:12*pi]
plot 2*t
pause -1 "Hit return to continue"

butterfly(x)=exp(cos(x))-2*cos(4*x)+sin(x/12)**5
set samples 800
set title "Butterfly"
unset key
plot butterfly(t)
pause -1 "Hit return to continue"
reset

set polar
set grid polar 
unset xtics
unset ytics
set border 0
set style fill solid 0.5
set rrange [0.1 : 4]
set size square
set key title "bounding radius 2.5"
set key outside top right samplen 0.7

plot 3.+sin(t)*cos(5*t) with filledcurve above r=2.5 notitle,\
     3.+sin(t)*cos(5*t) with line

pause -1 "Hit return to continue"
# undo what we've done above
reset