/[ascend]/trunk/models/plot.a4l
ViewVC logotype

Contents of /trunk/models/plot.a4l

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations) (download) (as text)
Fri Oct 29 20:54:12 2004 UTC (19 years, 10 months ago) by aw0a
File MIME type: text/x-ascend
File size: 3331 byte(s)
Setting up web subdirectory in repository
1 REQUIRE "atoms.a4l";
2 (* => atoms.a4l, measures.a4l, system.a4l, basemodel.a4l *)
3 PROVIDE "plot.a4l";
4
5 (*
6 * plot.a4l
7 * by Ben Allan
8 * Part of the ASCEND Library
9 * $Date: 1998/06/17 19:20:25 $
10 * $Revision: 1.4 $
11 * $Author: mthomas $
12 * $Source: /afs/cs.cmu.edu/project/ascend/Repository/models/plot.a4l,v $
13 *
14 * This file is part of the ASCEND Modeling Library.
15 *
16 * Copyright (C) 1997 Benjamin Andrew Allan
17 *
18 * The ASCEND Modeling Library is free software; you can redistribute
19 * it and/or modify it under the terms of the GNU General Public
20 * License as published by the Free Software Foundation; either
21 * version 2 of the License, or (at your option) any later version.
22 *
23 * The ASCEND Modeling Library is distributed in hope that it
24 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
25 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
26 * See the GNU General Public License for more details.
27 *
28 * You should have received a copy of the GNU General Public License
29 * along with the program; if not, write to the Free Software
30 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check
31 * the file named COPYING.
32 *)
33
34 (*============================================================================*
35
36 P L O T . A 4 L
37 ---------------
38
39 AUTHOR: Ben Allan
40 provoked by plot.a4l by Peter Piela and Kirk A. Abbott
41
42 DATES: 03/97 - Original code.
43
44 CONTENTS:
45 A parameterized plot library mostly compatible
46 with plot.a4l, but with variable graph titles.
47
48 *)
49
50 MODEL pltmodel() REFINES cmumodel();
51 (* the methods in this MODEL library have
52 * basically nothing to do except exist.
53 *)
54 METHODS
55
56 METHOD default_self;
57 END default_self;
58
59 METHOD check_self;
60 END check_self;
61
62 METHOD scale_self;
63 END scale_self;
64
65 METHOD bound_self;
66 END bound_self;
67
68 METHOD default_all;
69 END default_all;
70
71 METHOD check_all;
72 END check_all;
73
74 METHOD bound_all;
75 END bound_all;
76
77 METHOD scale_all;
78 END scale_all;
79
80 METHOD specify;
81 END specify;
82
83 END pltmodel;
84
85 MODEL plt_point(
86 x WILL_BE real;
87 y WILL_BE real;
88 ) REFINES pltmodel();
89 END plt_point;
90
91 (***************************************************************)
92
93 MODEL plt_curve(
94 npnts IS_A set OF integer_constant;
95 y_data[npnts] WILL_BE real;
96 x_data[npnts] WILL_BE real;
97 ) REFINES pltmodel();
98 (* points of matching subscript will be plotted in order of
99 * increasing subscript value.
100 *)
101 legend IS_A symbol; (* mutable now! *)
102 FOR i IN [npnts] CREATE
103 pnt[i] IS_A plt_point(x_data[i],y_data[i]);
104 END FOR;
105 END plt_curve;
106
107 (***************************************************************)
108
109 MODEL plt_plot_integer(
110 curve_set IS_A set OF integer_constant;
111 curve[curve_set] WILL_BE plt_curve;
112 ) REFINES pltmodel();
113 title, XLabel, YLabel IS_A symbol; (* mutable now! *)
114 Xlow IS_A real;
115 Ylow IS_A real;
116 Xhigh IS_A real;
117 Yhigh IS_A real;
118 Xlog IS_A boolean_start_false;
119 Ylog IS_A boolean_start_false;
120 END plt_plot_integer;
121
122 (***************************************************************)
123
124 MODEL plt_plot_symbol(
125 curve_set IS_A set OF symbol_constant;
126 curve[curve_set] WILL_BE plt_curve;
127 ) REFINES pltmodel();
128 title, XLabel, YLabel IS_A symbol; (* mutable now! *)
129 Xlow IS_A real;
130 Ylow IS_A real;
131 Xhigh IS_A real;
132 Yhigh IS_A real;
133 Xlog IS_A boolean_start_false;
134 Ylog IS_A boolean_start_false;
135 END plt_plot_symbol;

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22