File: rgba_lines.dem

package info (click to toggle)
gnuplot 6.0.2%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • 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 (33 lines) | stat: -rw-r--r-- 1,127 bytes parent folder | download | duplicates (5)
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
#
# Demonstrate use of RGBA (Alpha channel + RGB) colors for lines and filled areas.
# Color is represented by 32 bits AARRGGBB  (i.e. Alpha is in the high bits)
# Alpha = 0 is opaque;  Alpha = 255 is transparent
# This is BACKWARDS from the convention used by 'set style fill TRANSPARENT SOLID'
# It is also BACKWARDS from the convention used by 'with rgbalpha'
#
set angle degrees
set style arrow 1 size screen 0.03,15,90 noborder
set style arrow 1 lc rgb variable lw 3

fade(i) = (int(255.*i/360.) << 24) + 0xEF8000

set obj  1 rect from -.5,-.5 to -.3,0   fs solid fc rgb "#00bbbbbb" front
set obj  2 rect from -.3,-.3 to -.1,0.2 fs solid fc rgb "#55bbbbbb" front
set obj  3 rect from -.1,-.1 to  .3,0.3 fs solid fc rgb "#aabbbbbb" front
set obj  4 rect from  .3,-.4 to  .4,0.4 fs solid fc rgb "#22bbbbbb" back
set obj 10 circle at 0.15, -0.15 radius 0.5 fs solid fc  rgb "cyan" behind


unset border
unset xtics
unset ytics
unset key
set xrange [-1:1]
set yrange [-1:1]
set size square

plot sample [i=5:360:5] '+' using (0):(0):(cos(i)):(sin(i)):(fade(i)) \
     with vector as 1

pause -1 "Hit return to continue"
reset