File: rectangle.dem

package info (click to toggle)
gnuplot 5.4.1%2Bdfsg1-1%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,316 kB
  • sloc: ansic: 85,877; cpp: 7,440; makefile: 2,548; javascript: 2,322; sh: 1,542; lisp: 667; perl: 304; pascal: 191; tcl: 88; python: 46
file content (65 lines) | stat: -rw-r--r-- 1,758 bytes parent folder | download | duplicates (11)
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
# demo for the use of "set object rectangle"
# Updated for version 5
#	show front/back/behind, opaque key box

set object 1 rect from 0,0 to 1,4 fc lt 2 front
set object 2 rect from -1,1 to 0,5 fc rgb "gold"
set object 5 rect from 0, -3 to 2, -2 fc rgb "cyan" fs pattern 1 bo -1

set style fill pattern 2 bo 1

#
# Test clipping and placement in the presence of an inverted axis range
#
set obj 4 rect at -4,0 size 3,1
set label 4 at -2.6,0 "There should be a\nclipped rectangle here" left offset 0,.5

#
# The key box has its own option "opaque" to generate a filled rectangle
#
set key box opaque height 2

#
# Illustrate using character widths to put a box around a label
#
LABEL = "Label in a box"
set obj 10 rect at -3,-4 size char strlen(LABEL), char 1 
set obj 10 fillstyle empty border -1 front
set label 10 at -3,-4 LABEL front center

set obj 9 rect from -4, -4 to -4, -3 fc lt -1

set obj 20 rect from graph 0, graph 0 to graph 1, graph 1 fs solid 0.15 fc rgb "#FFD700" behind

set xrange [5:-5]

plot x, -3+sin(x*5)/x lt 3 lw 3

pause -1 "Hit return to continue"

reset

#
# Requires data file "using.dat" from this directory,
# so change current working directory to this directory before running.
#

set xrange [1:8]
set title "Convex     November 1-7 1989"
set key below
set label "(Weekend)" at 5,25 center

set style rect fc lt -1 fs solid 0.15 noborder

set obj rect from 1, graph 0 to 2, graph 1
set obj rect from 3, graph 0 to 4, graph 1
set obj rect from 5, graph 0 to 6, graph 1
set obj rect from 7, graph 0 to 8, graph 1

plot 'using.dat' using 3:4 title "Logged in" with impulses,\
     'using.dat' using 3:5 t "Load average" with points,\
     'using.dat' using 3:6 t "%CPU used" with lines

pause -1 "Hit return to continue"

reset