1
! $Id: x13f.f90 11680 2011-03-27 17:57:51Z airwin $
4
! Copyright (C) 2004 Alan W. Irwin
6
! This file is part of PLplot.
8
! PLplot is free software; you can redistribute it and/or modify
9
! it under the terms of the GNU Library General Public License as
10
! published by the Free Software Foundation; either version 2 of the
11
! License, or (at your option) any later version.
13
! PLplot is distributed in the hope that it will be useful,
14
! but WITHOUT ANY WARRANTY; without even the implied warranty of
15
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
! GNU Library General Public License for more details.
18
! You should have received a copy of the GNU Library General Public
19
! License along with PLplot; if not, write to the Free Software
20
! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22
use plplot, PI => PL_PI
24
real(kind=plflt) just, dx, dy, x(500), y(500), per(5)
25
integer i, j, dthet, theta0, theta1, theta
27
data text / 'Maurice', 'Geoffrey', 'Alan', 'Rafael', 'Vince'/
29
! Process command-line arguments
30
call plparseopts(PL_PARSE_FULL)
38
! Ask user to specify the output device.
43
! Ensure window has aspect ratio of one so circle is
44
! plotted as a circle.
45
call plvasp(1.0_plflt)
46
call plwind(0._plflt, 10._plflt, 0._plflt, 10._plflt)
47
! call plenv( 0._plflt, 10._plflt, 0._plflt, 10._plflt, 1, -2 )
50
! n.b. all theta quantities scaled by 2*pi/500 to be integers to avoid
51
! floating point logic problems.
60
! n.b. the theta quantities multiplied by 2*pi/500 afterward so
61
! in fact per is interpreted as a percentage.
62
theta1 = theta0 + 5*per(i+1)
63
if (i .eq. 4) theta1 = 500
64
do theta = theta0, theta1, dthet
65
x(j+1) = 5 + 3*cos((2._plflt*pi/500._plflt)*theta)
66
y(j+1) = 5 + 3*sin((2._plflt*pi/500._plflt)*theta)
71
call plpsty( mod(i+3, 8) + 1 )
72
call plfill(x(:j), y(:j))
74
call plline(x(:j), y(:j))
76
just = (2._plflt*pi/500._plflt)*(theta0 + theta1) / 2._plflt
77
dx = 0.25_plflt * cos(just)
78
dy = 0.25_plflt * sin(just)
79
if ((theta0 + theta1) .lt. 250 .or. &
80
(theta0 + theta1) .gt. 750) then
85
call plptex( x(j/2+1)+dx, y(j/2+1)+dy, 1._plflt, 0._plflt, &
87
theta0 = theta - dthet
91
call plschr( 0._plflt, 1.3_plflt)
92
call plptex( 5._plflt, 9._plflt, 1._plflt, 0._plflt, &
93
0.5_plflt, 'Percentage of Sales' )