1
c $Id: x02f.fm4 11680 2011-03-27 17:57:51Z airwin $
2
c Demonstrates multiple windows and color map 0
4
c Copyright (C) 2004 Alan W. Irwin
5
c Copyright (C) 2005 Andrew Ross
7
c This file is part of PLplot.
9
c PLplot is free software; you can redistribute it and/or modify
10
c it under the terms of the GNU Library General Public License as
11
c published by the Free Software Foundation; either version 2 of the
12
c License, or (at your option) any later version.
14
c PLplot is distributed in the hope that it will be useful,
15
c but WITHOUT ANY WARRANTY; without even the implied warranty of
16
c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
c GNU Library General Public License for more details.
19
c You should have received a copy of the GNU Library General Public
20
c License along with PLplot; if not, write to the Free Software
21
c Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25
include 'plplot_parameters.h'
26
c Process command-line arguments
27
call plparseopts(PL_PARSE_FULL)
42
c--------------------------------------------------------------------------
45
c Demonstrates multiple windows and default color map 0 palette.
46
c--------------------------------------------------------------------------
52
c Divide screen into 16 regions
55
call draw_windows(16, 0)
62
c--------------------------------------------------------------------------
65
c Demonstrates multiple windows, user-modified color map 0 palette,
66
c and HLS -> RGB translation.
67
c--------------------------------------------------------------------------
70
integer r(116), g(116), b(116)
72
parameter (lmin = 0.15d0, lmax = 0.85d0)
74
real*8 h, l, s, r1, g1, b1
78
c Divide screen into 100 regions
83
c Bounds on HLS, from plhlsrgb() commentary --
84
c hue [0., 360.] degrees
85
c lightness [0., 1.] magnitude
86
c saturation [0., 1.] magnitude
88
c Vary hue uniformly from left to right
89
h = (360.d0/10.d0)*mod(i,10)
90
c Vary lightness uniformly from top to bottom, between min and max
91
l = lmin + (lmax - lmin) * (i / 10) / 9.d0
95
call plhlsrgb(h, l, s, r1, g1, b1)
103
call plgcol0(i-1,r(i),g(i),b(i))
106
call plscmap0(r, g, b, 116)
108
call draw_windows(100, 16)
114
c--------------------------------------------------------------------------
117
c Draws a set of numbered boxes with colors according to cmap0 entry.
118
c--------------------------------------------------------------------------
119
subroutine draw_windows( nw, cmap0_offset )
121
integer nw, cmap0_offset
127
call plschr(0.0d0, 3.5d0)
131
call plcol0(i+cmap0_offset)
132
write (text,'(i3)') i
135
elseif (i.lt.100) then
143
call plvpor(vmin,vmax,vmin,vmax)
144
call plwind(0.0d0, 1.0d0, 0.0d0, 1.0d0)
145
call plbox('bc', 0.0d0, 0, 'bc', 0.0d0, 0)
150
call plptex(0.5d0, 0.5d0, 1.0d0, 0.0d0, 0.5d0, text)