Codebase list giza / 30a94fc
New upstream version 1.3.1 Ole Streicher 2 years ago
52 changed file(s) with 2220 addition(s) and 803 deletion(s). Raw diff Collapse all Expand all
33 report:
44 runs-on: ubuntu-latest
55 steps:
6 - uses: actions/checkout@v2
7 - name: Update API documentation
6 - name: checkout code
7 uses: actions/checkout@v2
8
9 - name: update api docs
810 run: |
9 cd doc
10 ./pgplot_status.pl > ../docs/documentation/pgplot-status.html
11 ./cpgplot_status.pl > ../docs/documentation/cpgplot-status.html
12 ./api.pl ../src/*.c
13 mv api.html ../docs/documentation
11 cd scripts
12 ./generate-docs.sh
13
1414 - name: Commit API documentation
15 run: |
16 git config --global user.name 'Daniel Price'
17 git config --global user.email 'daniel.price@monash.edu'
18 git diff-index --quiet HEAD || git commit -am "[doc-bot] updated auto-generated documentation" || git push
15 uses: EndBug/add-and-commit@v8
16 with:
17 default_author: github_actions
18 message: '[web-bot] updated auto-generated documentation'
19 add: 'docs/documentation/*.html --force'
8989 HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.BREW_TOKEN }}
9090 version: ${{ steps.get_version.outputs.version }}
9191 brewtap: danieljprice/all
92 formula: ${{ steps.get_version.outputs.repo }} # formula name same as repo name
92 formula: giza-x11 #${{ steps.get_version.outputs.repo }} # formula name same as repo name
9393 run: |
9494 git config --global user.email "daniel.price@monash.edu"
9595 git config --global user.name "Daniel Price"
0 2022-01-28 Daniel Price <daniel.price@monash.edu>
1
2 * src/giza-drivers.c: (docs) private routines removed from api docs
3
4 2022-01-28 Daniel Price <daniel.price@monash.edu>
5
6 * : commit 23d9c67e0caa0fafde228f2d9b20f1696d77326b Author: Daniel
7 Price <daniel.price@monash.edu> Date: Fri Jan 28 15:44:05 2022
8 +1100
9
10 2022-01-28 github-actions <41898282+github-actions[bot]@users.noreply.github.com>
11
12 * docs/documentation/api.html: [web-bot] updated auto-generated
13 documentation
14
15 2022-01-28 Daniel Price <daniel.price@monash.edu>
16
17 * : commit 6a52d44e30da0beb293e31ff5571b3fa60678bba Author: Daniel
18 Price <daniel.price@monash.edu> Date: Fri Jan 28 15:35:09 2022
19 +1100
20
21 2022-01-28 github-actions <41898282+github-actions[bot]@users.noreply.github.com>
22
23 * docs/documentation/pgplot.html: [web-bot] updated auto-generated
24 documentation
25
26 2022-01-28 Daniel Price <daniel.price@monash.edu>
27
28 * .github/workflows/api.yml, docs/documentation/{pgplot.shtml =>
29 pgplot-header.html}, scripts/generate-docs.sh: (docs) bug fix with auto-generated docs: use simple cat instead of
30 sed -r
31
32 2022-01-28 Daniel Price <daniel.price@monash.edu>
33
34 * : commit c3429bf2707b6a2ec55cf5d41a554bb7b9d2c1ad Author: Daniel
35 Price <daniel.price@monash.edu> Date: Fri Jan 28 15:15:08 2022
36 +1100
37
38 2022-01-28 github-actions <41898282+github-actions[bot]@users.noreply.github.com>
39
40 * docs/documentation/pgplot.html: [web-bot] updated auto-generated
41 documentation
42
43 2022-01-28 Daniel Price <daniel.price@monash.edu>
44
45 * .github/workflows/api.yml: (api) fix github workflow
46
47 2022-01-28 Daniel Price <daniel.price@monash.edu>
48
49 * .github/workflows/api.yml: (api) fix github workflow
50
51 2022-01-28 Daniel Price <daniel.price@monash.edu>
52
53 * .github/workflows/api.yml: (api) fix github workflow
54
55 2022-01-28 Daniel Price <daniel.price@monash.edu>
56
57 * .github/workflows/api.yml: (api) fix github workflow
58
59 2022-01-28 Daniel Price <daniel.price@monash.edu>
60
61 * .github/workflows/api.yml: (api) fix github workflow
62
63 2022-01-28 Daniel Price <daniel.price@monash.edu>
64
65 * .github/workflows/api.yml, {doc => scripts}/api.pl, {doc =>
66 scripts}/cpgplot_status.pl, {doc => scripts}/generate-docs.sh, {doc
67 => scripts}/get-fortran-params.pl, {doc =>
68 scripts}/get-source-files.pl, {doc => scripts}/pgplot_status.pl: (docs) moved doc->scripts to avoid confusion
69
70 2022-01-28 Daniel Price <daniel.price@monash.edu>
71
72 * LATEST.md, doc/generate-docs.sh, docs/documentation/pgplot.html,
73 docs/documentation/pgplot.shtml: (docs) broken links fixed
74
75 2022-01-28 Daniel Price <daniel.price@monash.edu>
76
77 * doc/generate-docs.sh, docs/documentation/cpgplot-status.html,
78 docs/documentation/index.html, docs/documentation/pgplot.html,
79 docs/index.html, src/giza-cpgplot.c: (docs) updated cpgplot interfaces for giza_axis and giza_tick; fix
80 issues in documentation
81
82 2022-01-28 Daniel Price <daniel.price@monash.edu>
83
84 * docs/documentation/gettingstarted.html, docs/news/index.html: (docs) fix broken links
85
86 2022-01-27 Daniel Price <daniel.price@monash.edu>
87
88 * docs/documentation/api.html,
89 docs/documentation/pgplot-status.html: [web-bot] updated
90 auto-generated documentation
91
92 2022-01-27 Daniel Price <daniel.price@monash.edu>
93
94 * docs/news/index.html: updated version
95
96 2022-01-27 Daniel Price <daniel.price@monash.edu>
97
98 * LATEST.md, src/Makefile.am, src/Makefile.in, src/giza-axis.c,
99 src/giza-fortran.F90, src/giza-pgplot.f90, src/giza-tick-private.h,
100 src/giza-tick.c, src/giza.h: (#12) implemented giza_tick replacement
101 functionality for PGTICK
102
103 2022-01-21 Daniel Price <daniel.price@monash.edu>
104
105 * LATEST.md, configure, configure.ac: v1.3.0
106
107 2022-01-21 Daniel Price <daniel.price@monash.edu>
108
109 * : Merge pull request #34 from danieljprice/motion-callback Motion callback
110
111 2022-01-21 Daniel Price <daniel.price@monash.edu>
112
113 * src/giza-drivers.c, src/giza-fortran.F90, src/giza.h: (motion
114 callback) added giza_end_motion_callback
115
116 2022-01-21 Daniel Price <daniel.price@monash.edu>
117
118 * src/giza-driver-xw.c: (motion callback) bug fix: make sure
119 transform is to world coords
120
121 2022-01-19 Daniel Price <daniel.price@monash.edu>
122
123 * src/giza-driver-xw-private.h, src/giza-driver-xw.c: (motion
124 callback) bug fix: restore clipping at end of Xwindows loop
125
126 2022-01-19 Daniel Price <daniel.price@monash.edu>
127
128 * src/giza-axis.c, src/giza-box.c, src/giza-character-size.c: (giza_axis) bug fixes; everything now works according to the API
129
130 2022-01-18 Daniel Price <daniel.price@monash.edu>
131
132 * src/Makefile.am, src/Makefile.in, src/giza-band.c,
133 src/giza-box.c, src/giza-fortran.F90, src/giza-pgplot.f90,
134 src/giza-render.c, src/giza-stroke-private.h, src/giza.h: (giza_axis) implemented giza_axis to replace PGAXIS
135
136 2022-01-17 Daniel Price <daniel.price@monash.edu>
137
138 * src/giza-driver-xw.c: (motion callback) expand clipping during
139 Xwindows loop
140
141 2022-01-17 Daniel Price <daniel.price@monash.edu>
142
143 * src/giza-driver-xw.c, src/giza-drivers.c, src/giza-fortran.F90,
144 src/giza-private.h, src/giza.h: (motion callback) send band mode
145
146 2022-01-14 Daniel Price <daniel.price@monash.edu>
147
148 * src/giza-fortran.F90: (fortran) do not trim strings when passing text to giza
149
150 2022-01-14 Daniel Price <daniel.price@monash.edu>
151
152 * src/giza-fortran.F90: (motion callback) fortran interface to
153 giza_set_motion_callback added
154
155 2022-01-14 Daniel Price <daniel.price@monash.edu>
156
157 * src/giza-driver-xw.c, src/giza-drivers.c, src/giza-private.h,
158 src/giza-window.c, src/giza.h: (motion callback) implemented
159 giza_set_motion_callback specifying function to be called during
160 cursor movement (works for xw device)
161
162 2021-06-18 Daniel Price <daniel.price@monash.edu>
163
164 * .github/workflows/release.yml: updated brew update to point to
165 giza-x11 in danieljprice/all
166
167 2021-06-18 Daniel Price <daniel.price@monash.edu>
168
169 * LATEST.md, configure.ac: v1.2.1
170
171 2021-06-18 Daniel Price <daniel.price@monash.edu>
172
173 * .github/workflows/release.yml: (github) updated API token
174
175 2021-06-18 Daniel Price <daniel.price@monash.edu>
176
177 * src/giza-colour-palette.c: (giza_colour_palette) compiler warning/bug fixed for GIZA_PALETTE=8
178 (matlab-inspired)
179
180 2021-06-18 Daniel Price <daniel.price@monash.edu>
181
182 * src/giza-drivers.c: (device) bug fix specifying device with directory path e.g.
183 dir/file.png
184
185 2021-01-22 Daniel Price <daniel.price@monash.edu>
186
187 * .github/workflows/api.yml: (doc-bot) second attempt to stop failing github action if no files
188 committed
189
190 2021-01-22 Daniel Price <daniel.price@monash.edu>
191
192 * .mailmap: updated .mailmap
193
194 2021-01-22 Daniel Price <daniel.price@monash.edu>
195
196 * .github/workflows/api.yml: (doc-bot) do not fail build if nothing to commit
197
198 2021-01-22 Daniel Price <daniel.price@monash.edu>
199
200 * .github/workflows/release.yml, LATEST.md: added release notes and
201 github workflow for automated release-on-tag
202
203 2021-01-22 Daniel Price <daniel.price@monash.edu>
204
205 * docs/documentation/installation.html, docs/download/index.html: (docs) updated links
206
207 2021-01-22 Daniel Price <daniel.price@monash.edu>
208
209 * : commit 91a67f39b63eb537066ec0e584034b36e0f4d98b Author: Daniel
210 Price <daniel.price@monash.edu> Date: Fri Jan 22 15:23:06 2021
211 +1100
212
213 2021-01-22 Daniel Price <daniel.price@monash.edu>
214
215 * docs/documentation/api.html: [doc-bot] updated auto-generated
216 documentation
217
218 2021-01-22 Daniel Price <daniel.price@monash.edu>
219
220 * : commit 9ad57ce8a0eff64e9c31462cea960d45c0cfa242 Author: Daniel
221 Price <daniel.price@monash.edu> Date: Fri Jan 22 04:00:17 2021
222 +0000
223
224 2021-01-22 Daniel Price <daniel.price@monash.edu>
225
226 * .github/workflows/api.yml: Create api.yml
227
228 2021-01-22 Daniel Price <daniel.price@monash.edu>
229
230 * ChangeLog: updated ChangeLog
231
0232 2021-01-22 Daniel Price <daniel.price@monash.edu>
1233
2234 * doc/api.pl: fix comment about api not being stable (not true, it
63295
64296 * : Merge pull request #26 from haavee/issue-21 Issue 21
65297
66 2019-01-17 haavee <hverkouter@gmail.com>
298 2019-01-17 Harro Verkouter <hverkouter@gmail.com>
67299
68300 * src/giza-box-time.c: Fix unused expression result warning A no-op statement was still left in the code; it is now removed
69301
70 2019-01-17 haavee <hverkouter@gmail.com>
302 2019-01-17 Harro Verkouter <hverkouter@gmail.com>
71303
72304 * src/giza-box-time.c: Remove C99 for-loop initial declarations There were still two C99-only idioms left which are now rewritten to
73305 use a single, not-quite-as-transient-as-hoped, variable char* to
114346
115347 * : Merge pull request #24 from haavee/issue-21 This should fix issue #21 "missing braces"
116348
117 2018-11-27 haavee <hverkouter@gmail.com>
349 2018-11-27 Harro Verkouter <hverkouter@gmail.com>
118350
119351 * src/giza-driver-xw.c, src/giza-drivers.c: Synchronize XW device id
120352 with giza_device_t The global variable 'id' is now also used to address the instance of
125357 closed. If the entry happened to be an XWindow, the corresponding
126358 XW[id] struct will now also be properly closed.
127359
128 2018-11-27 haavee <hverkouter@gmail.com>
360 2018-11-27 Harro Verkouter <hverkouter@gmail.com>
129361
130362 * src/giza-driver-null.c, src/giza-driver-pdf.c,
131363 src/giza-driver-png.c, src/giza-driver-ps.c, src/giza-driver-svg.c,
143375 for the XWindow driver to use that assigned slot as well. A separate commit implementing that will follow, which makes that
144376 change opt-in.
145377
146 2018-11-26 haavee <hverkouter@gmail.com>
378 2018-11-26 Harro Verkouter <hverkouter@gmail.com>
147379
148380 * src/giza-drivers.c, src/giza-private.h,
149381 src/giza-set-font-private.h, src/giza-set-font.c, src/giza.h: Font
158390 library initialization code made more robust and handling error(s)
159391 and releasing allocated memory in such a case was improved. Extra code to ensure cache unloading at program end was added.
160392
161 2018-11-23 haavee <hverkouter@gmail.com>
393 2018-11-23 Harro Verkouter <hverkouter@gmail.com>
162394
163395 * src/giza-box.c, src/giza-cpgplot.c, src/giza-format-number.c,
164396 src/giza-fortran.F90, src/giza.h: `giza_format_number()` string
179411 do the same. The Python-PGPLOT binding (ppgplot) does not expose cpgnumb() so at this point that's not an
180412 issue.
181413
182 2018-11-23 haavee <hverkouter@gmail.com>
414 2018-11-23 Harro Verkouter <hverkouter@gmail.com>
183415
184416 * src/giza-cpgplot.c, src/giza-drivers.c, src/giza.h: Fix multi dev
185417 handling (SIGSEGV, libc corruption) The giza library, specifically in `giza_open_device_size()` and
209441
210442 2018-11-17 Daniel Price <daniel.price@monash.edu>
211443
212 * : commit 2733835a13c73b272a5ff999f86906b7c8992bcc Author: haavee
213 <hverkouter@gmail.com> Date: Fri Nov 16 17:55:41 2018 +0100
214
215 2018-11-15 haavee <hverkouter@gmail.com>
444 * : commit 2733835a13c73b272a5ff999f86906b7c8992bcc Author: Harro
445 Verkouter <hverkouter@gmail.com> Date: Fri Nov 16 17:55:41 2018
446 +0100
447
448 2018-11-15 Harro Verkouter <hverkouter@gmail.com>
216449
217450 * src/giza-drivers.c: Remove _giza_change_size() because it's not used anywhere anymore.
218451
220453
221454 * : Merge pull request #20 from haavee/issue-19 This fixes #19 build failure macports PPC
222455
223 2018-11-14 haavee <hverkouter@gmail.com>
456 2018-11-14 Harro Verkouter <hverkouter@gmail.com>
224457
225458 * src/giza-cpgplot.c: Revert "Args swapped between API and giza
226459 implementation" This reverts commit c323737e7d49dd998d068b2964ffe76c86f648c5.
227460 Should be on a completely different branch!
228461
229 2018-11-14 haavee <hverkouter@gmail.com>
462 2018-11-14 Harro Verkouter <hverkouter@gmail.com>
230463
231464 * src/giza-driver-xw-private.h, src/giza-driver-xw.c,
232465 src/giza-drivers.c, src/giza-paper.c, src/giza-private.h: Attempt to
235468 takes effect * PGPAGE() skips asking for confirmation the first time * XWindow specific "_giza_change_size_xw()" removed - now handled
236469 better in giza_set_paper_size(). The resize flag is detected in _giza_change_page_xw() and handled correctly there.
237470
238 2018-11-12 haavee <hverkouter@gmail.com>
471 2018-11-12 Harro Verkouter <hverkouter@gmail.com>
239472
240473 * src/giza-driver-xw.c, src/giza-environment.c: Savegame issue #18
241474
242 2018-11-12 haavee <hverkouter@gmail.com>
475 2018-11-12 Harro Verkouter <hverkouter@gmail.com>
243476
244477 * src/giza-cpgplot.c: Args swapped between API and giza
245478 implementation giza_render has calling convention giza_render_*( ..., valMin, valMax, ...) whereas PGPLOT API cpggray(..., float fg, float bg, ...) but the parameters 'fg', 'bg' were passed to giza_render in that
246479 order as 'valMin', 'valMax' i.e. fg, bg are reversed
247480
248 2018-11-09 haavee <hverkouter@gmail.com>
481 2018-11-09 Harro Verkouter <hverkouter@gmail.com>
249482
250483 * src/giza-box-time.c: This fixes #19 build failure macports PPC I erroneously used scoped for loop variables in a non-100% portable
251484 way.
254487
255488 * : Merge pull request #16 from haavee/symbol-issues Fixes #5 Symbol issues
256489
257 2018-11-08 haavee <hverkouter@gmail.com>
490 2018-11-08 Harro Verkouter <hverkouter@gmail.com>
258491
259492 * src/giza-points.c: Scale up symbols #-3..-8 They came out (noticeably) smaller in giza than in PGPLOT as far as
260493 I could tell.
261494
262 2018-11-08 haavee <hverkouter@gmail.com>
495 2018-11-08 Harro Verkouter <hverkouter@gmail.com>
263496
264497 * src/giza-points.c: Scaled up the arrows (#28-31) a bit The arrows looked markedly smaller in giza than on the PGPLOT
265498 original. Scaled them up a bit.
266499
267 2018-11-08 haavee <hverkouter@gmail.com>
500 2018-11-08 Harro Verkouter <hverkouter@gmail.com>
268501
269502 * src/giza-points.c: Fix #19, update #0, 6 Symbol #19 was not a hexagon with a cross but a larger open square
270503 than #6. The squares are also drawn with a slightly thinner line.
271504
272 2018-11-08 haavee <hverkouter@gmail.com>
505 2018-11-08 Harro Verkouter <hverkouter@gmail.com>
273506
274507 * src/giza-points.c: Fix symbols #20 - 27 (inclusive) The open circles are now exponentially scaled and drawn with a
275508 slightly thinner line than before
276509
277 2018-11-08 haavee <hverkouter@gmail.com>
510 2018-11-08 Harro Verkouter <hverkouter@gmail.com>
278511
279512 * src/giza-points.c: Fix symbols 12, 18 (5-pt star), #20 initiated Symbols 12 and 18 now are five-point stars, open and filled. Symbol
280513 20 was entered as seven-point star but it should be a small open
282515 symbols 20-27 are a bit off anyway, so that's going to be fixed in a
283516 different commit.
284517
285 2018-11-08 haavee <hverkouter@gmail.com>
518 2018-11-08 Harro Verkouter <hverkouter@gmail.com>
286519
287520 * src/giza-points.c: New line widths only used if you actually
288521 stroke
289522
290 2018-11-08 haavee <hverkouter@gmail.com>
523 2018-11-08 Harro Verkouter <hverkouter@gmail.com>
291524
292525 * src/giza-points.c: Fix symbol 14 (open plus sign)
293526
294 2018-11-08 haavee <hverkouter@gmail.com>
527 2018-11-08 Harro Verkouter <hverkouter@gmail.com>
295528
296529 * src/giza-points.c: Fix symbol #10 (concave rect)
297530
298 2018-11-07 haavee <hverkouter@gmail.com>
531 2018-11-07 Harro Verkouter <hverkouter@gmail.com>
299532
300533 * src/giza-points.c: Fix symbols 7,13,15 The triangles 7, 13 were pointing the wrong way and symbol 15 is the
301534 star of David formed by overplotting two open triangles offset a
302535 little bit
303536
304 2018-11-07 haavee <hverkouter@gmail.com>
537 2018-11-07 Harro Verkouter <hverkouter@gmail.com>
305538
306539 * : Merge remote-tracking branch 'upstream/master'
307540
310543 * : Merge pull request #3 from haavee/master giza_parse_string() fix, add cpgqinf() support, fix critical bug
311544 found doing this
312545
313 2018-09-06 haavee <hverkouter@gmail.com>
546 2018-09-06 Harro Verkouter <hverkouter@gmail.com>
314547
315548 * src/giza-cpgplot.c, src/giza-drivers-private.h,
316549 src/giza-drivers.c, src/giza-fortran.F90, src/giza.h: Support
338571 wrapper needed adapting to the new signature and pass in the extra
339572 variable accordingly.
340573
341 2018-09-06 haavee <hverkouter@gmail.com>
574 2018-09-06 Harro Verkouter <hverkouter@gmail.com>
342575
343576 * src/giza-scanner.l, src/lex.yy.c: Fix backspace handling ... The meaning of the nGlyph index used in giza_parse_string changed
344577 subtly during development and the handling of backspace was not
385618
386619 * : Merge https://github.com/haavee/giza into haavee-master
387620
388 2018-09-05 haavee <hverkouter@gmail.com>
389
390 * : commit 553bf85db2f60aaf908113322b0cae4c0d0836de Author: haavee
391 <hverkouter@gmail.com> Date: Wed Sep 5 15:35:47 2018 +0200
392
393 2018-09-05 haavee <hverkouter@gmail.com>
621 2018-09-05 Harro Verkouter <hverkouter@gmail.com>
622
623 * : commit 553bf85db2f60aaf908113322b0cae4c0d0836de Author: Harro
624 Verkouter <hverkouter@gmail.com> Date: Wed Sep 5 15:35:47 2018
625 +0200
626
627 2018-09-05 Harro Verkouter <hverkouter@gmail.com>
394628
395629 * src/giza-set-font.c, src/giza.h: giza_set_font_*(...) take const
396630 char* Sometimes compile time static strings are fed into
398632 mutable strings. None of the functions actually modify their argument so it probably
399633 is better to make this explicit in their prototypes.
400634
401 2018-09-04 haavee <hverkouter@gmail.com>
635 2018-09-04 Harro Verkouter <hverkouter@gmail.com>
402636
403637 * src/giza-driver-xw.c, src/giza-drivers.c: Better XWindow resizing
404638 implementation It turned out that the XWindow resizing wasn't handled correctly in
417651 window size has been achieved. Now it works reliably and windows can
418652 be resized between plotting.
419653
420 2018-08-30 haavee <hverkouter@gmail.com>
654 2018-08-30 Harro Verkouter <hverkouter@gmail.com>
421655
422656 * src/giza-io-private.h, src/giza-io.c: Enable formatted
423657 warning/error messages (compat) By changing _giza_warning() and _giza_error() prototype (and
428662 #%d '%s'", token, yytext); Existing _giza_warning()/_giza_error() calls are completely
429663 unaffected by this.
430664
431 2018-08-30 haavee <hverkouter@gmail.com>
665 2018-08-30 Harro Verkouter <hverkouter@gmail.com>
432666
433667 * src/giza-driver-xw.c: no XWindow resize waiting for keypress Whilst the system is waiting for a keypress, do not honour window
434668 resizing requests. PGPLOT also does not do this.
435669
436 2018-08-30 haavee <hverkouter@gmail.com>
670 2018-08-30 Harro Verkouter <hverkouter@gmail.com>
437671
438672 * src/giza-box.c: Fixed earlier broken 'repair' Sometimes the PGPLOT doc is somewhat ambiguous but not for 'N' and
439673 'M' options: both imply labels have to be drawn, only 'M' sais to do
441675 'M' ("write labels")? Or is 'L' only honoured if either 'N' or 'M'
442676 is specified (which is how the code currently works).
443677
444 2018-08-30 haavee <hverkouter@gmail.com>
678 2018-08-30 Harro Verkouter <hverkouter@gmail.com>
445679
446680 * src/giza-box.c: Add support for 'M' option to PG(T)BOX When it comes to writing labels PG(T)BOX supports the following: -N :- Label the axis (conventional, below/left viewport) -M :- Put labels in the unconvential location (above/right
447681 viewport) The 'M' option was not implemented by giza so I added it. Whilst at
449683 high-level check and sometimes continue'ing from a loop if the rest
450684 of the loop body is precluded from being executed anyway.
451685
452 2018-08-30 haavee <hverkouter@gmail.com>
686 2018-08-30 Harro Verkouter <hverkouter@gmail.com>
453687
454688 * src/giza-box-time.c: Fixed minor bugs (logic, off-by-one, missing
455689 /) There were two off-by-one lost-in-FORTRAN-to-C-translation: - using number of items as last accessible index ok in fortran, not so much in C (a classic) - end condition off by one because of pretty much the same in fortran "<" must be <= in C (if C-style counting with fortran meaning of index) I condensed what I thought three levels of fortran IF .. END IF into
458692 formats I had forgotten to escape the backslash with a backslash in
459693 the strings.
460694
461 2018-08-30 haavee <hverkouter@gmail.com>
695 2018-08-30 Harro Verkouter <hverkouter@gmail.com>
462696
463697 * src/giza-box.c: y-axis ticks on the right were drawn wrong side Obviously the previous edit introduced a sign error :-) If y-axis
464698 ticks were drawn on the right hand side they'd be drawn the same
465699 direction as the ones on the left-hand side. Fixed.
466700
467 2018-08-30 haavee <hverkouter@gmail.com>
701 2018-08-30 Harro Verkouter <hverkouter@gmail.com>
468702
469703 * src/giza-box.c: Support for PGBOX 'I' and 'P' options and bug fix giza's pgbox(...) routine did not support the PGPLOT options 'I' and
470704 'P': -I: Invert tick marks - write them outside the viewport in
475709 existing code drew the top tick marks outside the viewport because
476710 it would draw them 'up' as well.
477711
478 2018-08-30 haavee <hverkouter@gmail.com>
712 2018-08-30 Harro Verkouter <hverkouter@gmail.com>
479713
480714 * src/giza-box.c: Fix axis ticks not being drawn if axis 'reversed' In checking pgdemo1 certain axes did not display any tick marks at
481715 all! This was traced to be when the window set through pgswin() was
482716 such that Dev[id].Win.[xy]max < Dev[id].Win.[xy]min, i.e. the axis
483717 is reversed: the values decrease towards the right (X) or top (Y)
484718
485 2018-08-22 haavee <hverkouter@gmail.com>
486
487 * : commit c00f33c3c943fba12f94916ed468f76afdd76bd1 Author: haavee
488 <hverkouter@gmail.com> Date: Fri Aug 17 17:38:56 2018 +0200
489
490 2018-08-16 haavee <hverkouter@gmail.com>
719 2018-08-22 Harro Verkouter <hverkouter@gmail.com>
720
721 * : commit c00f33c3c943fba12f94916ed468f76afdd76bd1 Author: Harro
722 Verkouter <hverkouter@gmail.com> Date: Fri Aug 17 17:38:56 2018
723 +0200
724
725 2018-08-16 Harro Verkouter <hverkouter@gmail.com>
491726
492727 * src/giza-cursor-routines.c: fix pgdemo5 misbehaving of
493728 pgolin/pglcur pgdemo5 with giza master branch draws all subsequent polygons in
494729 black whereas PGPLOT draws subsequenct polygons in different colours
495730 by incrementing colour index at each new polygon.
496731
497 2018-08-16 haavee <hverkouter@gmail.com>
732 2018-08-16 Harro Verkouter <hverkouter@gmail.com>
498733
499734 * src/giza-viewport.c: Revert "fix PGPLOT incompatibility" This reverts commit e9644f6b098e54fb2cd246434d8d1c58fc6e1ba1.
500735 Breaks pgdemo2 (pgvsiz() function). It was not specifically a bug or
501736 fix and it doesn't hurt keeping the original code but it hurts not
502737 keeping the original version ... ;-)
503738
504 2018-08-16 haavee <hverkouter@gmail.com>
739 2018-08-16 Harro Verkouter <hverkouter@gmail.com>
505740
506741 * src/giza-driver-xw.c, src/giza-drivers.c: revert to drawing to
507742 pixamp, XCopyArea to window Turns out there's code relying on drawing onto the pixmap and in
520755 is the format string itself ... (*)
521756 https://en.wikipedia.org/wiki/Printf_format_string#Parameter_field
522757
523 2018-08-14 Harro Verkouter <verkouter@jive.eu>
758 2018-08-14 Harro Verkouter <hverkouter@gmail.com>
524759
525760 * src/giza-print-id.c: Fix compiler warning prototype for sprintf() missing
526761
527 2018-08-14 Harro Verkouter <verkouter@jive.eu>
762 2018-08-14 Harro Verkouter <hverkouter@gmail.com>
528763
529764 * src/giza-cpgplot.c: fix off-by-one between external/internal
530765 device id When using multiple open devices simultaneously, the returned device
531766 id from cpgoen should be usable to later select that open device.
532767 There was an extra +/- 1 mismatch between cpgopen and cpgslct.
533768
534 2018-08-14 Harro Verkouter <verkouter@jive.eu>
769 2018-08-14 Harro Verkouter <hverkouter@gmail.com>
535770
536771 * src/giza-drivers-private.h, src/giza-drivers.c, src/giza-io.c: fix
537772 compiler warning casting const away When splitting the device string sometimes 'const char*' was
538773 assigned to 'char *' - which the compiler doesn't like. Fixed by changing prototype and destination data type of the split
539774 string.
540775
541 2018-08-14 Harro Verkouter <verkouter@jive.eu>
776 2018-08-14 Harro Verkouter <hverkouter@gmail.com>
542777
543778 * src/giza-io.c: fix warning about unused return value fgets() returns an error code and the caller is expected to check
544779 that return valuer; compiler verifies this.
545780
546 2018-08-14 Harro Verkouter <verkouter@jive.eu>
781 2018-08-14 Harro Verkouter <hverkouter@gmail.com>
547782
548783 * src/giza-box-time.c: Support for pgtbox() The existing pgtbox() redirected to pgbox(). For astronomy application(s) time labelling is very important and a
549784 highly desirable property. The existing PGTBOX() from the PGPLOT source code was ported into an
550785 initial working version, behaving identically, modulo porting bugs.
551786
552 2018-08-14 Harro Verkouter <verkouter@jive.eu>
787 2018-08-14 Harro Verkouter <hverkouter@gmail.com>
553788
554789 * src/giza-scanner.l, src/lex.yy.c: Support for backspace (\b) in
555790 printing strings For time labelling to look good it is 'necessary' to make the
559794 the current version backing up to a previous character's position
560795 was impossible.
561796
562 2018-08-14 Harro Verkouter <verkouter@jive.eu>
797 2018-08-14 Harro Verkouter <hverkouter@gmail.com>
563798
564799 * src/giza-viewport.c: fix PGPLOT incompatibility When setting a viewport (pgsvp) the window should not be
565800 automatically set (pgswin), cf. "pgsvp.f" source code
566801
567 2018-08-14 Harro Verkouter <verkouter@jive.eu>
802 2018-08-14 Harro Verkouter <hverkouter@gmail.com>
568803
569804 * src/giza-io.c: fix warning about unused return value fgets() returns an error code and the caller is expected to check
570805 that return valuer; compiler verifies this.
571806
572 2018-08-14 Harro Verkouter <verkouter@jive.eu>
807 2018-08-14 Harro Verkouter <hverkouter@gmail.com>
573808
574809 * src/giza-drivers-private.h, src/giza-drivers.c, src/giza-io.c: fix
575810 compiler warning casting const away When splitting the device string sometimes 'const char*' was
576811 assigned to 'char *' - which the compiler doesn't like. Fixed by changing prototype and destination data type of the split
577812 string.
578813
579 2018-08-14 Harro Verkouter <verkouter@jive.eu>
814 2018-08-14 Harro Verkouter <hverkouter@gmail.com>
580815
581816 * src/giza-print-id.c: Fix compiler warning prototype for sprintf() missing
582817
583 2018-08-14 Harro Verkouter <verkouter@jive.eu>
818 2018-08-14 Harro Verkouter <hverkouter@gmail.com>
584819
585820 * src/giza-driver-xw.c, src/giza-drivers.c: fix external XWindow
586821 resize If plotting to an XWindow and the window was resized by the user
591826 never updated. Thus even if the XWindow was made smaller/larger,
592827 the amount of pixels actually drawn was never changed.
593828
594 2018-08-14 Harro Verkouter <verkouter@jive.eu>
829 2018-08-14 Harro Verkouter <hverkouter@gmail.com>
595830
596831 * src/giza-cpgplot.c: fix off-by-one between external/internal
597832 device id When using multiple open devices simultaneously, the returned device
0 Changes in v1.2.1 compared to v1.2.0
1 ------------------------------------
2 - bug fix specifying device at prompt with directory path, e.g. dir/file.png
0 Changes in v1.3.1
1 ------------------
2 - giza_axis and giza_tick added to libcpgplot interface (#12)
3 - fixed various documentation issues
4 - API documentation automatically updates via github workflow
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for giza 1.2.0.
2 # Generated by GNU Autoconf 2.69 for giza 1.3.1.
33 #
44 # Report bugs to <daniel.price@monash.edu>.
55 #
589589 # Identity of this package.
590590 PACKAGE_NAME='giza'
591591 PACKAGE_TARNAME='giza'
592 PACKAGE_VERSION='1.2.0'
593 PACKAGE_STRING='giza 1.2.0'
592 PACKAGE_VERSION='1.3.1'
593 PACKAGE_STRING='giza 1.3.1'
594594 PACKAGE_BUGREPORT='daniel.price@monash.edu'
595595 PACKAGE_URL='http://danieljprice.github.io/giza'
596596
13481348 # Omit some internal or obsolete options to make the list less imposing.
13491349 # This message is too long to be a string in the A/UX 3.1 sh.
13501350 cat <<_ACEOF
1351 \`configure' configures giza 1.2.0 to adapt to many kinds of systems.
1351 \`configure' configures giza 1.3.1 to adapt to many kinds of systems.
13521352
13531353 Usage: $0 [OPTION]... [VAR=VALUE]...
13541354
14181418
14191419 if test -n "$ac_init_help"; then
14201420 case $ac_init_help in
1421 short | recursive ) echo "Configuration of giza 1.2.0:";;
1421 short | recursive ) echo "Configuration of giza 1.3.1:";;
14221422 esac
14231423 cat <<\_ACEOF
14241424
15481548 test -n "$ac_init_help" && exit $ac_status
15491549 if $ac_init_version; then
15501550 cat <<\_ACEOF
1551 giza configure 1.2.0
1551 giza configure 1.3.1
15521552 generated by GNU Autoconf 2.69
15531553
15541554 Copyright (C) 2012 Free Software Foundation, Inc.
19101910 This file contains any messages produced by compilers while
19111911 running configure, to aid debugging if configure makes a mistake.
19121912
1913 It was created by giza $as_me 1.2.0, which was
1913 It was created by giza $as_me 1.3.1, which was
19141914 generated by GNU Autoconf 2.69. Invocation command line was
19151915
19161916 $ $0 $@
27682768
27692769 # Define the identity of the package.
27702770 PACKAGE='giza'
2771 VERSION='1.2.0'
2771 VERSION='1.3.1'
27722772
27732773
27742774 cat >>confdefs.h <<_ACEOF
41784178
41794179 GIZA_VERSION_MAJOR=1
41804180
4181 GIZA_VERSION_MINOR=2
4182
4183 GIZA_VERSION_MICRO=0
4181 GIZA_VERSION_MINOR=3
4182
4183 GIZA_VERSION_MICRO=1
41844184
41854185 #
41864186 # The following specify the interface version numbers for giza.
41964196 #
41974197 LT_CURRENT=1
41984198
4199 LT_REVISION=0
4199 LT_REVISION=1
42004200
42014201 LT_AGE=1
42024202
1635616356 # report actual input values of CONFIG_FILES etc. instead of their
1635716357 # values after options handling.
1635816358 ac_log="
16359 This file was extended by giza $as_me 1.2.0, which was
16359 This file was extended by giza $as_me 1.3.1, which was
1636016360 generated by GNU Autoconf 2.69. Invocation command line was
1636116361
1636216362 CONFIG_FILES = $CONFIG_FILES
1642316423 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1642416424 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1642516425 ac_cs_version="\\
16426 giza config.status 1.2.0
16426 giza config.status 1.3.1
1642716427 configured by $0, generated by GNU Autoconf 2.69,
1642816428 with options \\"\$ac_cs_config\\"
1642916429
00 AC_PREREQ(2.61)
11 m4_define(giza_version_major,1)
2 m4_define(giza_version_minor,2)
2 m4_define(giza_version_minor,3)
33 m4_define(giza_version_micro,1)
44 AC_INIT([giza],
55 [giza_version_major.giza_version_minor.giza_version_micro],
+0
-300
doc/api.pl less more
0 #!/usr/bin/perl
1 use IO::File;
2
3 # Open up the output files
4 $fh = new IO::File "> api.html";
5
6 # Lists for the index
7 @IText = ();
8 @ISettings = ();
9 @IDrawing = ();
10 @IDevices = ();
11 @IInteractive = ();
12
13 @Device = ();
14 @Test = ();
15 @Settings = ();
16 @Drawing = ();
17 @Interactive = ();
18
19 # Subroutine for parsing individual comments
20 sub processComment
21 {
22 my $fh;
23 my @prototype;
24 my $type = '';
25 my $name = '';
26 my $desciption = '';
27 my @seeAlso;
28 my @lists;
29
30 $desciption = '';
31 undef @lists;
32 undef @seeAlso;
33 undef @prototype;
34 # Get all the info
35 do
36 {
37 # Get the name and type
38 if ($_[0] =~ m/.* (Interactive|Text|Drawing|Device|Settings):\s*(.*)$/)
39 {
40 ($type, $name) = ($1, $2);
41 }
42 # Get the desciption
43 elsif ($_[0] =~ m/^.*Synopsis:\s*(.*)$/)
44 {
45 $description = $1;
46 while ($_[1] =~ m/\s\*\s*(\S.*)$/)
47 {
48 $description = $description . ' ' . $1;
49 shift;
50 }
51 }
52 # Get the see also list
53 elsif ($_[0] =~ m/.* See Also: (.*)$/)
54 {
55 @seeAlso = split (/,\s*/, $1);
56 }
57 # Get any lists
58 elsif ($_[0] =~ m/\s*\*\s*(\S.*):/)
59 {
60 # the title
61 my @tmp = ();
62 push @tmp, $1;
63
64 # the items
65 while ($_[1] =~ m/\s*\*\s*\-(.*)\s*:\-\s*(\S.*)$/)
66 {
67 push @tmp, $1;
68 push @tmp, $2;
69 shift;
70
71 # Items over more than one line.
72 while ($_[1] !~ m/^\s*\*\s*\-.*\s*:\-\s*\S.*$/ && $_[1] !~ m/^\s*\*\s*$/ && $_[1] =~ m/^\s*\*/)
73 {
74 $_[1] =~ m/^\s*\*\s*(\S.*)$/;
75 push (@tmp, pop (@tmp) . ' ' . $1);
76 shift;
77 }
78 }
79 push @lists, \@tmp;
80 }
81 # Fuction prototype
82 elsif ($_[0] !~ m/^ \*/)
83 {
84 # Type
85 chomp ($_[0]);
86 push @prototype, $_[0];
87 shift;
88 chomp ($_[0]);
89 # Name
90 push @prototype, substr ($_[0], 0, index ($_[0], ' '));
91 # Arguments
92 push @prototype, substr ($_[0], index ($_[0], ' '));
93 while (shift)
94 {
95 $_[0] =~ m/^\s*(.*)$/;
96 push @prototype, pop (@prototype) . " $1";
97 }
98 }
99 } while (shift);
100
101 # Add to the index and description lists
102 if ($type eq "Text")
103 {
104 $IFile = \@IText;
105 $File = \@Text;
106 }
107 elsif ($type eq "Drawing")
108 {
109 $IFile = \@IDrawing;
110 $File = \@Drawing;
111 }
112 elsif ($type eq "Device")
113 {
114 $IFile = \@IDevice;
115 $File = \@Device;
116 }
117 elsif ($type eq "Settings")
118 {
119 $IFile = \@ISettings;
120 $File = \@Settings;
121 }
122 elsif ($type eq "Interactive")
123 {
124 $IFile = \@IInteractive;
125 $File = \@Interactive;
126 }
127 else
128 {
129 return;
130 }
131
132 push @$IFile, $name;
133
134 # Name
135 push @$File, "<h3><a name=\"$name\">$name</a><hr></h3>\n";
136 # Prototype
137 push @$File, "<table class=\"proto\">\n<tr><td width=10%>" . shift (@prototype) . "</td><td width=20%>" . shift (@prototype) . "</td><td>" . shift (@prototype) . ";</tr></table>";
138 # Description
139 push @$File, "<p>$description</p>\n";
140 # Lists
141 foreach $item (@lists)
142 {
143 # Name
144 push @$File, "<h4>" . shift (@$item) . ":</h4>\n";
145 # Table preamble
146 push @$File, "<table class=\"api\">";
147 # Table contents
148 while (@$item)
149 {
150 push @$File, "<tr>\n<td>" . shift (@$item) . ":</td>";
151 push @$File, "<td>" . shift (@$item) . "</td>\n</tr>";
152 }
153 # Table postamble
154 push @$File, "</table>";
155 }
156 # See Also
157 if (@seeAlso)
158 {
159 push @$File, "<h4>See Also:</h4><p>";
160 foreach (@seeAlso)
161 {
162 push @$File, "<a href=\"#$_\">$_</a> ";
163 }
164 push @$File, "</p>";
165 }
166
167 }
168
169 # prossess each comment
170 my @currentComment = ();
171 my $inComment = 0;
172 while (<>)
173 {
174 # Begin a comment
175 if ($_ =~ m/\/\*\*/ && $inComment == 0)
176 {
177 $inComment = 1;
178 }
179 # End comment
180 elsif ($_ =~ m/\*\// && $inComment == 1)
181 {
182 # Get the prototype as well
183 my $nextL = <>;
184 while ($nextL && $nextL !~ m/{/)
185 {
186 push @currentComment, $nextL;
187 $nextL = <>;
188 }
189 &processComment (@currentComment);
190 @currentComment = ();
191 $inComment = 0;
192 }
193 # Add to comment
194 elsif ($inComment == 1)
195 {
196 push (@currentComment, $_);
197 }
198 }
199
200 # Write the output file
201 # First the formating junk
202 $fh->print (
203 "<html>
204 <head>
205 <meta http-equiv=\"Content-Type\" content=\"text/html\"; charset=utf-8\" \>
206 <title>giza - API Reference Manual</title>
207 <link rel=\"stylesheet\" href=\"../style.css\" type=\"text/css\" \>
208 </head>
209
210 <div class=\"header\">
211 <a href=\"/giza\"><img alt=\"giza\" src=\"../title.png\"\></a>
212 </div>
213
214 <div id=\"menucontainer\">
215 <ul id=\"menulist\">
216 <li><a href=\"../news/\">news</a></li>
217 <li><a href=\"../download/\">download</a></li>
218 <li><a href=\"../documentation/\">documentation</a></li>
219 <li><a href=\"../contact/\">contact</a></li>
220 <li><a href=\"../samples/\">samples</a></li>
221 </ul>
222 </div>
223
224 <div id=\"content\">
225 <h1>API Reference Manual</h1>
226 <p>Here we provided a function by function reference for the low-level C API to giza.
227 <br/>The giza API is <strong>stable</strong>.
228 From version 1.0 we aim to keep backwards compatibility, although new functionality may be added</p>
229 <h1>Index</h1>
230 <dl class=\"toc\">");
231 # Then the index
232 $fh->print ("<dt><a href=\"#Device_management\">Device Management</a></dt>\n");
233 foreach (@IDevice)
234 {
235 $fh->print ("<dd><a href=\"#$_\">$_</a></dd>\n");
236 }
237
238 $fh->print ("<dt><a href=\"#Drawing\">Drawing</a></dt>\n");
239 foreach (@IDrawing)
240 {
241 $fh->print ("<dd><a href=\"#$_\">$_</a></dd>\n");
242 }
243
244 $fh->print ("<dt><a href=\"#Text\">Text</a></dt>\n");
245 foreach (@IText)
246 {
247 $fh->print ("<dd><a href=\"#$_\">$_</a></dd>\n");
248 }
249
250 $fh->print ("<dt><a href=\"#Settings\">Settings</a></dt>\n");
251 foreach (@ISettings)
252 {
253 $fh->print ("<dd><a href=\"#$_\">$_</a></dd>\n");
254 }
255 $fh->print ("<dt><a href=\"#Interactive\">Interactive</a></dt>\n");
256 foreach (@IInteractive)
257 {
258 $fh->print ("<dd><a href=\"#$_\">$_</a></dd>\n");
259 }
260 $fh->print ("</dl>");
261
262 # Write descriptions for Device Management
263 $fh->print ("<a name=\"Device_managment\"></a><h1>Device Managment</h1>\n");
264 foreach (@Device)
265 {
266 $fh->print ("$_");
267 }
268
269 # Write descriptions for Drawing
270 $fh->print ("<a name=\"Drawing\"></a><h1>Drawing</h1>\n");
271 foreach (@Drawing)
272 {
273 $fh->print ("$_");
274 }
275
276 # Write descriptions for Text
277 $fh->print ("<a name=\"Text\"></a><h1>Text</h1>\n");
278 foreach (@Text)
279 {
280 $fh->print ("$_");
281 }
282
283 # Write descriptions for Settings
284 $fh->print ("<a name=\"Settings\"></a><h1>Settings</h1>\n");
285 foreach (@Settings)
286 {
287 $fh->print ("$_");
288 }
289
290 # Write descriptions for Interactive
291 $fh->print ("<a name=\"Interactive\"></a><h1>Interactive</h1>\n");
292 foreach (@Interactive)
293 {
294 $fh->print ("$_");
295 }
296
297 # Close the files
298 $fh->flush ();
299 $fh->close ();
+0
-48
doc/cpgplot_status.pl less more
0 #!/usr/bin/perl
1 #
2 # This script parses the giza-pgplot.f90 file
3 # to produce html documentation of the current
4 # status of the PGPLOT interface to giza
5 # (that can be built as libpgplot)
6 #
7 open(FILE, "<../src/giza-cpgplot.c");
8 my $module;
9 my $desc;
10 my $link;
11 my $status;
12 my $ntot = 0;
13 my $ndone = 0;
14 my $npar = 0;
15 print STDOUT "<table>\n";
16 while (<FILE>) {
17 if ( m/(^.*cpg)/)
18 {
19 ($module,$desc) = m/^.*(cpg.*) -- (.*)/;
20 ($link) = m/^.*c(pg.*) --/;
21 print STDOUT "<tr><td><a href=\"http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#$link\">$module</a></td>";
22 }
23 elsif ( m/(^.*Status:)/)
24 {
25 ($status) = m/^.*Status: (.*)/;
26 $_ = $status;
27 my $color = "#FF6600"; # default is orange
28 if ( m/.*(NOT).*/ )
29 {
30 $color = "#FF0000"; # red
31 }
32 elsif ( m/^IMPLEMENTED$/ )
33 {
34 $color = "#009900"; # green
35 $ndone = $ndone + 1;
36 $npar = $npar + 1;
37 }
38 else
39 {
40 $npar = $npar + 1;
41 }
42 $ntot = $ntot + 1;
43 print STDOUT "<td bgcolor=$color>$status</td><td>$desc</td></tr>\n";
44 }
45 }
46 print STDOUT "</table>\n";
47 print STDOUT "<p>$npar of $ntot routines implemented, $ndone of $ntot fully implemented.</p>\n";
+0
-15
doc/get-fortran-params.pl less more
0 #!/usr/bin/perl
1 #
2 # @(#) Perl script to convert defs in giza-shared.h to Fortran parameters
3 # @(#) Written by Daniel Price, daniel.price@monash.edu
4 #
5 my $var;
6 my $val;
7 open(FILE,"<../src/giza-shared.h");
8 while(<FILE>) {
9 if (m/define\s\S*\s*([0-9]*)/ && !m/GIZA_LEFT_CLICK/) {
10 ($var, $val) = m/define\s(\S*)\s*([0-9]*)/;
11 my $lvar = lc($var); #sprintf("%-27s",lc($var));
12 print " integer, parameter, public :: $lvar = $var\n";
13 }
14 }
+0
-13
doc/get-source-files.pl less more
0 #!/usr/bin/perl
1 #
2 # @(#) Perl script to get current source files for Makefile
3 #
4 # @(#) (c) Daniel Price, Jan 2011, daniel.price@monash.edu
5 #
6 use Text::Wrap;
7
8 $Text::Wrap::columns=80;
9 $Text::Wrap::separator=" \\\n";
10 #print wrap('PHEADERS= ',' ',@ARGV);
11 print wrap('SOURCE= ',' ',@ARGV);
12 print "\n";
+0
-46
doc/pgplot_status.pl less more
0 #!/usr/bin/perl
1 #
2 # This script parses the giza-pgplot.f90 file
3 # to produce html documentation of the current
4 # status of the PGPLOT interface to giza
5 # (that can be built as libpgplot)
6 #
7 open(FILE, "<../src/giza-pgplot.f90");
8 my $module;
9 my $desc;
10 my $status;
11 my $ntot = 0;
12 my $ndone = 0;
13 my $npar = 0;
14 print STDOUT "<table>\n";
15 while (<FILE>) {
16 if ( m/(^.*Module:)/)
17 {
18 ($module,$desc) = m/^.*Module: (.*) -- (.*)/;
19 print STDOUT "<tr><td><a href=\"http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#$module\">$module</a></td>";
20 }
21 elsif ( m/(^.*Status:)/)
22 {
23 ($status) = m/^.*Status: (.*)/;
24 $_ = $status;
25 my $color = "#FF6600"; # default is orange
26 if ( m/.*(NOT).*/ )
27 {
28 $color = "#FF0000"; # red
29 }
30 elsif ( m/^IMPLEMENTED$/ )
31 {
32 $color = "#009900"; # green
33 $ndone = $ndone + 1;
34 $npar = $npar + 1;
35 }
36 else
37 {
38 $npar = $npar + 1;
39 }
40 $ntot = $ntot + 1;
41 print STDOUT "<td bgcolor=$color>$status</td><td>$desc</td></tr>\n";
42 }
43 }
44 print STDOUT "</table>\n";
45 print STDOUT "<p>$npar of $ntot routines implemented, $ndone of $ntot fully implemented.</p>\n";
3838 <dd><a href="#_giza_close_device_unchecked">_giza_close_device_unchecked</a></dd>
3939 <dd><a href="#_giza_init_device_struct">_giza_init_device_struct</a></dd>
4040 <dd><a href="#giza_query_device">giza_query_device</a></dd>
41 <dd><a href="#giza_set_motion_callback">giza_set_motion_callback</a></dd>
42 <dd><a href="#giza_end_motion_callback">giza_end_motion_callback</a></dd>
4143 <dd><a href="#giza_get_surface_size">giza_get_surface_size</a></dd>
4244 <dd><a href="#giza_get_surface_size_float">giza_get_surface_size_float</a></dd>
4345 <dd><a href="#giza_histogram">giza_histogram</a></dd>
5254 <dt><a href="#Drawing">Drawing</a></dt>
5355 <dd><a href="#giza_arrow">giza_arrow</a></dd>
5456 <dd><a href="#giza_arrow_float">giza_arrow_float</a></dd>
57 <dd><a href="#giza_axis">giza_axis</a></dd>
58 <dd><a href="#giza_axis_float">giza_axis_float</a></dd>
5559 <dd><a href="#giza_box_time">giza_box_time</a></dd>
5660 <dd><a href="#giza_box_time_float">giza_box_time_float</a></dd>
5761 <dd><a href="#giza_box">giza_box</a></dd>
99103 <dd><a href="#giza_render_gray_float">giza_render_gray_float</a></dd>
100104 <dd><a href="#giza_draw_pixels">giza_draw_pixels</a></dd>
101105 <dd><a href="#giza_draw_pixels_float">giza_draw_pixels_float</a></dd>
106 <dd><a href="#giza_tick">giza_tick</a></dd>
107 <dd><a href="#giza_tick_float">giza_tick_float</a></dd>
102108 <dd><a href="#giza_vector">giza_vector</a></dd>
103109 <dd><a href="#giza_vector_float">giza_vector_float</a></dd>
104110 <dt><a href="#Text">Text</a></dt>
277283 <td>GIZA_UNITS_MM :</td><td>mm</td>
278284 </tr><tr>
279285 <td>GIZA_UNITS_INCHES :</td><td>inches Other values cause an error message and are treated as GIZA_UNITS_DEVICE</td>
280 </tr></table><h4>See also:</h4>
281 <table class="api"></table><h3><a name="giza_open_device_size_float">giza_open_device_size_float</a><hr></h3>
286 </tr></table><h4>See Also:</h4><p><a href="#giza_open_device">giza_open_device</a> </p><h3><a name="giza_open_device_size_float">giza_open_device_size_float</a><hr></h3>
282287 <table class="proto">
283288 <tr><td width=10%>int</td><td width=20%>giza_open_device_size_float</td><td> (const char *newDeviceName, const char *newPrefix, float width, float height, int units) ;</tr></table><p>Same functionality as giza_open_device_size but takes floats</p>
284289 <h3><a name="giza_get_device_id">giza_get_device_id</a><hr></h3>
285290 <table class="proto">
286291 <tr><td width=10%>void</td><td width=20%>giza_get_device_id</td><td> (int *devid) ;</tr></table><p>Returns the (external) id of the currently selected device</p>
287292 <h4>Output:</h4>
288 <table class="api"></table><h4>See also:</h4>
289 <table class="api"></table><h3><a name="giza_select_device">giza_select_device</a><hr></h3>
293 <table class="api"></table><h4>See Also:</h4><p><a href="#giza_open_device">giza_open_device</a> <a href="#giza_get_device_id">giza_get_device_id</a> </p><h3><a name="giza_select_device">giza_select_device</a><hr></h3>
290294 <table class="proto">
291295 <tr><td width=10%>void</td><td width=20%>giza_select_device</td><td> (int devid) ;</tr></table><p>Select between the currently open devices</p>
292296 <h4>Input:</h4>
293297 <table class="api"><tr>
294298 <td>devid :</td><td>device id, as returned by giza_open_device</td>
295 </tr></table><h4>See also:</h4>
296 <table class="api"></table><h3><a name="giza_flush_device">giza_flush_device</a><hr></h3>
299 </tr></table><h4>See Also:</h4><p><a href="#giza_get_device_id">giza_get_device_id</a> <a href="#giza_open_device">giza_open_device</a> </p><h3><a name="giza_flush_device">giza_flush_device</a><hr></h3>
297300 <table class="proto">
298301 <tr><td width=10%>void</td><td width=20%>giza_flush_device</td><td> (void) ;</tr></table><p>Flushes the currently open device.</p>
299302 <h3><a name="giza_change_page">giza_change_page</a><hr></h3>
300303 <table class="proto">
301304 <tr><td width=10%>void</td><td width=20%>giza_change_page</td><td> (void) ;</tr></table><p>Advances the currently open device to the next page, and redraws the background. If no other actions have been performed since the device was opened or the last call to giza_change_page the call is ignored.</p>
302 <h4>See also:</h4>
303 <table class="api"></table><h3><a name="giza_close_devices">giza_close_devices</a><hr></h3>
305 <h4>See Also:</h4><p><a href="#giza_subpanel">giza_subpanel</a> <a href="#giza_set_panel">giza_set_panel</a> </p><h3><a name="giza_close_devices">giza_close_devices</a><hr></h3>
304306 <table class="proto">
305307 <tr><td width=10%>void</td><td width=20%>giza_close_devices</td><td> (void) ;</tr></table><p>Close all open devices (to be called from PGEND())</p>
306308 <h3><a name="giza_close_device">giza_close_device</a><hr></h3>
318320 <table class="api"></table><h4>See https:</h4>
319321 <table class="api"></table><h4>Input:</h4>
320322 <table class="api"><tr>
321 <td>ptrDev :</td><td>a pointer to a giza_device_t </td>
323 <td>ptrDev :</td><td>a pointer to a giza_device_t</td>
322324 </tr></table><h3><a name="giza_query_device">giza_query_device</a><hr></h3>
323325 <table class="proto">
324326 <tr><td width=10%>int</td><td width=20%>giza_query_device</td><td> (const char *querytype, char *returnval, int* rlen) ;</tr></table><p>Queries various things about the current device.</p>
339341 <table class="api"></table><h4>"user" :</h4>
340342 <table class="api"></table><h4>"cursor" :</h4>
341343 <table class="api"></table><h4>"hardcopy" :</h4>
342 <table class="api"></table><h3><a name="giza_get_surface_size">giza_get_surface_size</a><hr></h3>
344 <table class="api"></table><h3><a name="giza_set_motion_callback">giza_set_motion_callback</a><hr></h3>
345 <table class="proto">
346 <tr><td width=10%>int</td><td width=20%>giza_set_motion_callback</td><td> (void (*func)(double *x, double *y, int *mode)) ;</tr></table><p>set a callback function to be called during cursor movement (e.g. to print things). Function should be of the form void func(double *x, double *y)</p>
347 <h4>Input:</h4>
348 <table class="api"><tr>
349 <td>func :</td><td>The subroutine to be called</td>
350 </tr></table><h4>See Also:</h4><p><a href="#giza_end_motion_callback">giza_end_motion_callback</a> </p><h3><a name="giza_end_motion_callback">giza_end_motion_callback</a><hr></h3>
351 <table class="proto">
352 <tr><td width=10%>int</td><td width=20%>giza_end_motion_callback</td><td> (void) ;</tr></table><p>Free the motion callback pointer</p>
353 <h4>See Also:</h4><p><a href="#giza_set_motion_callback">giza_set_motion_callback</a> </p><h3><a name="giza_get_surface_size">giza_get_surface_size</a><hr></h3>
343354 <table class="proto">
344355 <tr><td width=10%>void</td><td width=20%>giza_get_surface_size</td><td> (double *x1, double *x2, double *y1, double *y2) ;</tr></table><p>Gets the size of the current surface that can be drawn to in device units (pixels or points).</p>
345356 <h4>Input:</h4>
370381 <td>nbin :</td><td>number of bins</td>
371382 </tr><tr>
372383 <td>flag :</td><td>flag to indicate page changes, see below</td>
373 </tr></table><h4>See also:</h4>
374 <table class="api"></table><h4>Flag:</h4>
384 </tr></table><h4>Flag:</h4>
375385 <table class="api"><tr>
376386 <td>0 :</td><td>giza_histogram calls giza_environment to set up new plotting page</td>
377387 </tr><tr>
384394 <td>4 :</td><td>bins drawn as simple outlines, as in giza_histogram_binned, calls giza_environment</td>
385395 </tr><tr>
386396 <td>5 :</td><td>bins drawn as simple outlines, but in current window and viewport Other values treated as 1</td>
387 </tr></table><h3><a name="giza_histogram_float">giza_histogram_float</a><hr></h3>
397 </tr></table><h4>See Also:</h4><p><a href="#giza_histogram_binned">giza_histogram_binned</a> <a href="#giza_histogram_float">giza_histogram_float</a> </p><h3><a name="giza_histogram_float">giza_histogram_float</a><hr></h3>
388398 <table class="proto">
389399 <tr><td width=10%>void</td><td width=20%>giza_histogram_float</td><td> (int n, const float *dat, float min, float max, int nbin, int flag) ;</tr></table><p>Same as giza_histogram but takes floats</p>
390 <h4>See also:</h4>
391 <table class="api"></table><h3><a name="giza_histogram_binned">giza_histogram_binned</a><hr></h3>
400 <h4>See Also:</h4><p><a href="#giza_histogram">giza_histogram</a> <a href="#giza_histogram_binned_float">giza_histogram_binned_float</a> </p><h3><a name="giza_histogram_binned">giza_histogram_binned</a><hr></h3>
392401 <table class="proto">
393402 <tr><td width=10%>void</td><td width=20%>giza_histogram_binned</td><td> (int n, const double *x, const double *dat, int centre) ;</tr></table><p>Plot a histogram of already binned data</p>
394403 <h4>Input:</h4>
400409 <td>dat :</td><td>data values for each bin</td>
401410 </tr><tr>
402411 <td>center :</td><td>if true (1) x values correspond to centre of each bin</td>
403 </tr></table><h4>See also:</h4>
404 <table class="api"></table><h3><a name="giza_histogram_binned_float">giza_histogram_binned_float</a><hr></h3>
412 </tr></table><h4>See Also:</h4><p><a href="#giza_histogram">giza_histogram</a> <a href="#giza_histogram_binned_float">giza_histogram_binned_float</a> </p><h3><a name="giza_histogram_binned_float">giza_histogram_binned_float</a><hr></h3>
405413 <table class="proto">
406414 <tr><td width=10%>void</td><td width=20%>giza_histogram_binned_float</td><td> (int n, const float *x, const float *dat, int centre) ;</tr></table><p>Same as giza_histogram_binned but takes floats</p>
407 <h4>See also:</h4>
408 <table class="api"></table><h3><a name="giza_subpanel">giza_subpanel</a><hr></h3>
415 <h4>See Also:</h4><p><a href="#giza_histogram">giza_histogram</a> <a href="#giza_histogram_binned_float">giza_histogram_binned_float</a> </p><h3><a name="giza_subpanel">giza_subpanel</a><hr></h3>
409416 <table class="proto">
410417 <tr><td width=10%>void</td><td width=20%>giza_subpanel</td><td> (int nx, int ny) ;</tr></table><p>Set the number of sub panels</p>
411418 <h4>Input:</h4>
413420 <td>nx :</td><td>number of sub-panels in x direction</td>
414421 </tr><tr>
415422 <td>ny :</td><td>number of sub panels in y direction</td>
416 </tr></table><h4>See also:</h4>
417 <table class="api"></table><h3><a name="giza_set_panel">giza_set_panel</a><hr></h3>
423 </tr></table><h4>See Also:</h4><p><a href="#giza_select_panel">giza_select_panel</a> <a href="#giza_get_panel">giza_get_panel</a> </p><h3><a name="giza_set_panel">giza_set_panel</a><hr></h3>
418424 <table class="proto">
419425 <tr><td width=10%>void</td><td width=20%>giza_set_panel</td><td> (int ix, int iy) ;</tr></table><p>Select the panel we are currently plotting in</p>
420426 <h4>Input:</h4>
422428 <td>ix :</td><td>panel index in x direction</td>
423429 </tr><tr>
424430 <td>iy :</td><td>panel index in y direction</td>
425 </tr></table><h4>See also:</h4>
426 <table class="api"></table><h3><a name="giza_get_panel">giza_get_panel</a><hr></h3>
431 </tr></table><h4>See Also:</h4><p><a href="#giza_subpanel">giza_subpanel</a> <a href="#giza_get_panel">giza_get_panel</a> </p><h3><a name="giza_get_panel">giza_get_panel</a><hr></h3>
427432 <table class="proto">
428433 <tr><td width=10%>void</td><td width=20%>giza_get_panel</td><td> (int *ix, int *iy) ;</tr></table><p>Select the panel we are currently plotting in</p>
429434 <h4>Input:</h4>
431436 <td>ix :</td><td>panel index in x direction</td>
432437 </tr><tr>
433438 <td>iy :</td><td>panel index in y direction</td>
434 </tr></table><h4>See also:</h4>
435 <table class="api"></table><h3><a name="giza_init_subpanel">giza_init_subpanel</a><hr></h3>
439 </tr></table><h4>See Also:</h4><p><a href="#giza_subpanel">giza_subpanel</a> <a href="#giza_set_panel">giza_set_panel</a> </p><h3><a name="giza_init_subpanel">giza_init_subpanel</a><hr></h3>
436440 <table class="proto">
437441 <tr><td width=10%>void</td><td width=20%>_giza_init_subpanel</td><td> () ;</tr></table><p>initialises subpanel settings for device</p>
438442 <h3><a name="giza_advance_panel">giza_advance_panel</a><hr></h3>
444448 <tr><td width=10%>void</td><td width=20%>giza_arrow</td><td> (double x1, double y1, double x2, double y2) ;</tr></table><p>Draws an arrow. The style of the head of the arrow is set by giza_set_arrow_style.</p>
445449 <h4>Input:</h4>
446450 <table class="api"><tr>
447 <td>x1 :</td><td>The world x-coord of the tail of the arrow.</td>
448 </tr><tr>
449 <td>y1 :</td><td>The world y-coord of the tail of the arrow.</td>
450 </tr><tr>
451 <td>x2 :</td><td>The world x-coord of the head of the arrow.</td>
452 </tr><tr>
453 <td>y2 :</td><td>The world y-coord of the head of the arrow.</td>
454 </tr></table><h4>See Also:</h4><p><a href="#giza_set_arrow_style">giza_set_arrow_style</a> </p><h3><a name="giza_arrow_float">giza_arrow_float</a><hr></h3>
451 <td>x1 :</td><td>The world x-coord of the tail of the arrow</td>
452 </tr><tr>
453 <td>y1 :</td><td>The world y-coord of the tail of the arrow</td>
454 </tr><tr>
455 <td>x2 :</td><td>The world x-coord of the head of the arrow</td>
456 </tr><tr>
457 <td>y2 :</td><td>The world y-coord of the head of the arrow</td>
458 </tr></table><h4>See Also:</h4><p><a href="#giza_set_arrow_style">giza_set_arrow_style</a> <a href="#giza_arrow_float">giza_arrow_float</a> </p><h3><a name="giza_arrow_float">giza_arrow_float</a><hr></h3>
455459 <table class="proto">
456460 <tr><td width=10%>void</td><td width=20%>giza_arrow_float</td><td> (float x1, float y1, float x2, float y2) ;</tr></table><p>Same functionality as giza_arrow.</p>
457 <h4>See Also:</h4><p><a href="#giza_arrow_float">giza_arrow_float</a> </p><h3><a name="giza_box_time">giza_box_time</a><hr></h3>
461 <h4>See Also:</h4><p><a href="#giza_arrow">giza_arrow</a> <a href="#giza_set_arrow_style">giza_set_arrow_style</a> </p><h3><a name="giza_axis">giza_axis</a><hr></h3>
462 <table class="proto">
463 <tr><td width=10%>void</td><td width=20%>giza_axis</td><td> (const char *opt, double x1, double y1, double x2, double y2, double v1, double v2, double tick, int nsub, double dmajl, double dmajr, double fmin, double disp, double angle) ;</tr></table><p>Draw a labelled axis from (x1,y1) to (x2,y2)</p>
464 <h4>Input:</h4>
465 <table class="api"><tr>
466 <td>opt :</td><td>String of options for the axis. The options may be in any order. See below for details</td>
467 </tr><tr>
468 <td>x1 :</td><td>starting x position in world coordinates</td>
469 </tr><tr>
470 <td>y1 :</td><td>starting y position in world coordinates</td>
471 </tr><tr>
472 <td>x2 :</td><td>finishing x position in world coordinates</td>
473 </tr><tr>
474 <td>y2 :</td><td>finishing y position in world coordinates</td>
475 </tr><tr>
476 <td>v1 :</td><td>axis value at starting position</td>
477 </tr><tr>
478 <td>v2 :</td><td>axis value at finishing position</td>
479 </tr><tr>
480 <td>tick :</td><td>The distance, in world coordinates, between major ticks on the axis. If 0.0 the interval is chosen automatically.</td>
481 </tr><tr>
482 <td>nsub :</td><td>The number of minor ticks to be placed between each major tick. If 0 the number is chosen automatically. Ignored if log axis.</td>
483 </tr><tr>
484 <td>dmajl :</td><td>Length of major tick marks drawn to "left/bottom" of axis in units of character height</td>
485 </tr><tr>
486 <td>dmajr :</td><td>Length of major tick marks drawn to "right/top" of axis in units of character height</td>
487 </tr><tr>
488 <td>fmin :</td><td>Length of minor tick marks as fraction of major</td>
489 </tr><tr>
490 <td>disp :</td><td>Displacement of labels from axis in units of character height</td>
491 </tr><tr>
492 <td>angle :</td><td>Label orientation; angle between text and direction of axis; in degrees</td>
493 </tr></table><h4>Options:</h4>
494 <table class="api"><tr>
495 <td>T :</td><td>Draw major ticks.</td>
496 </tr><tr>
497 <td>S :</td><td>Draw minor ticks.</td>
498 </tr><tr>
499 <td>N :</td><td>Label the axis</td>
500 </tr><tr>
501 <td>L :</td><td>Label axis logarithmically</td>
502 </tr><tr>
503 <td>H :</td><td>Hide the axis (draw ticks only)</td>
504 </tr><tr>
505 <td>I :</td><td>'Invert' tick marks, draw them on opposite side</td>
506 </tr><tr>
507 <td>1 :</td><td>Force decimal labelling instead of automatic choice (see giza_format_number)</td>
508 </tr><tr>
509 <td>2 :</td><td>Force exponential labelling instead of automatic choice (see giza_format_number)</td>
510 </tr></table><h4>See Also:</h4><p><a href="#giza_axis_float">giza_axis_float</a> <a href="#giza_box">giza_box</a> <a href="#giza_tick">giza_tick</a> <a href="#giza_box_time">giza_box_time</a> </p><h3><a name="giza_axis_float">giza_axis_float</a><hr></h3>
511 <table class="proto">
512 <tr><td width=10%>void</td><td width=20%>giza_axis_float</td><td> (const char *opt, float x1, float y1, float x2, float y2, float v1, float v2, float step, int nsub, float dmajl, float dmajr, float fmin, float disp, float angle) ;</tr></table><p>Same functionality as giza_axis but takes floats instead of doubles.</p>
513 <h4>See Also:</h4><p><a href="#giza_axis">giza_axis</a> </p><h3><a name="giza_box_time">giza_box_time</a><hr></h3>
458514 <table class="proto">
459515 <tr><td width=10%> void</td><td width=20%></td><td> giza_box_time (const char *xopt, double xtick, int nxsub, const char *yopt, double ytick, int nysub) ;</tr></table><p>Same as giza_box, but labels axes with time-style labels i.e. DD HH MM SS as used in RA - DEC plots for Astronomy. If this option is used then giza_set_window should have been called with min/max given in seconds of time.</p>
460516 <h4>Input:</h4>
810866 </tr><tr>
811867 <td>sizey :</td><td>The dimensions of data in the y-direction</td>
812868 </tr><tr>
813 <td>data :</td><td>The data to be render</td>
869 <td>data :</td><td>The data to be rendered</td>
814870 </tr><tr>
815871 <td>i1 :</td><td>The inclusive range of data to render in the x dimension.</td>
816872 </tr><tr>
888944 </tr></table><h4>See Also:</h4><p><a href="#giza_render">giza_render</a> <a href="#giza_draw_pixels_float">giza_draw_pixels_float</a> </p><h3><a name="giza_draw_pixels_float">giza_draw_pixels_float</a><hr></h3>
889945 <table class="proto">
890946 <tr><td width=10%>void</td><td width=20%>giza_draw_pixels_float</td><td> (int sizex, int sizey, const int* idata, int i1, int i2, int j1, int j2, float xmin, float xmax, float ymin, float ymax, int extend) ;</tr></table><p>Same as giza_draw_pixels, but takes floats</p>
891 <h4>See Also:</h4><p><a href="#giza_draw_pixels">giza_draw_pixels</a> </p><h3><a name="giza_vector">giza_vector</a><hr></h3>
947 <h4>See Also:</h4><p><a href="#giza_draw_pixels">giza_draw_pixels</a> </p><h3><a name="giza_tick">giza_tick</a><hr></h3>
948 <table class="proto">
949 <tr><td width=10%>void</td><td width=20%>giza_tick</td><td> (double x1, double y1, double x2, double y2, double v, double tickl, double tickr, double disp, double angle, const char *label) ;</tr></table><p>Draw a single tick along an axis. The axis extends from (x1,y1) to (x2,y2) and the tick is drawn perpendicular to the axis which is not drawn by this routine. Optional text label drawn parallel to the axis if the orientation angle is zero</p>
950 <h4>Input:</h4>
951 <table class="api"><tr>
952 <td>x1 :</td><td>starting x position in world coordinates</td>
953 </tr><tr>
954 <td>y1 :</td><td>starting y position in world coordinates</td>
955 </tr><tr>
956 <td>x2 :</td><td>finishing x position in world coordinates</td>
957 </tr><tr>
958 <td>y2 :</td><td>finishing y position in world coordinates</td>
959 </tr><tr>
960 <td>v :</td><td>axis value at tick location</td>
961 </tr><tr>
962 <td>tickl :</td><td>Length of tick mark drawn to "left/bottom" of axis in units of character height</td>
963 </tr><tr>
964 <td>tickr :</td><td>Length of tick mark drawn to "right/top" of axis in units of character height</td>
965 </tr><tr>
966 <td>disp :</td><td>Displacement of labels from axis in units of character height</td>
967 </tr><tr>
968 <td>angle :</td><td>Label orientation; angle between text and direction of axis; in degrees</td>
969 </tr><tr>
970 <td>label :</td><td>Text string used for label (can be blank)</td>
971 </tr></table><h3><a name="giza_tick_float">giza_tick_float</a><hr></h3>
972 <table class="proto">
973 <tr><td width=10%>void</td><td width=20%>giza_tick_float</td><td> (float x1, float y1, float x2, float y2, float v, float tickl, float tickr, float disp, float angle, const char *label) ;</tr></table><p>Same functionality as giza_tick but takes floats instead of doubles.</p>
974 <h4>See Also:</h4><p><a href="#giza_tick">giza_tick</a> </p><h3><a name="giza_vector">giza_vector</a><hr></h3>
892975 <table class="proto">
893976 <tr><td width=10%>void</td><td width=20%>giza_vector</td><td> (int n, int m, const double* horizontal, const double* vertical, int i1, int i2, int j1, int j2, double scale, int position, const double* affine, double blank) ;</tr></table><p>Plot of vector data.</p>
894977 <h4>Input:</h4>
10691152 <tr><td width=10%>void</td><td width=20%>giza_flush_buffer</td><td> (void) ;</tr></table><p>Updates graphics display Can be used to flush the graphics buffer manually between calls to giza_begin_buffer and giza_end_buffer</p>
10701153 <h4>See Also:</h4><p><a href="#giza_begin_buffer">giza_begin_buffer</a> <a href="#giza_end_buffer">giza_end_buffer</a> </p><h3><a name="giza_set_character_height">giza_set_character_height</a><hr></h3>
10711154 <table class="proto">
1072 <tr><td width=10%>void</td><td width=20%>giza_set_character_height</td><td> (double ch) ;</tr></table><p>Sets the font size in units of character height.</p>
1155 <tr><td width=10%>void</td><td width=20%>giza_set_character_height</td><td> (double ch) ;</tr></table><p>Sets the font size in units of character height. A character height of 1.0 corresponds to 1/37th of the plotting surface height by default</p>
10731156 <h4>Input:</h4>
10741157 <table class="api"><tr>
10751158 <td>ch :</td><td>the new character height</td>
10911174 <h4>Input:</h4>
10921175 <table class="api"><tr>
10931176 <td>units :</td><td>select the units the result will be returned in.</td>
1094 </tr><tr>
1177 </tr></table><h4>Output:</h4>
1178 <table class="api"><tr>
10951179 <td>width :</td><td>will be set to the width of a character.</td>
10961180 </tr><tr>
10971181 <td>height :</td><td>will be set to the height of a character.</td>
12471331 <tr><td width=10%>/*void</td><td width=20%>giza_set_range_as_colour_table</td><td> (int *cimin, int *cimax) ;</tr></table><p>Can be used in place of giza_set_colour_table to install the colour table from a predefined set of colour indices</p>
12481332 <h4>See Also:</h4><p><a href="#giza_set_colour_table">giza_set_colour_table</a> </p><h3><a name="giza_set_colour_palette">giza_set_colour_palette</a><hr></h3>
12491333 <table class="proto">
1250 <tr><td width=10%>void </td><td width=20%>giza_set_colour_palette</td><td> (int palette) ;</tr></table><p>Choose between various preset colour "palettes" for the first 16 colour indices commonly used for point and line drawing. This is equivalent to using giza_set_colour_representation for each index in turn.</p>
1334 <tr><td width=10%>void</td><td width=20%>giza_set_colour_palette</td><td> (int palette) ;</tr></table><p>Choose between various preset colour "palettes" for the first 16 colour indices commonly used for point and line drawing. This is equivalent to using giza_set_colour_representation for each index in turn.</p>
12511335 <h4>Note:</h4>
12521336 <table class="api"></table><h4>Input:</h4>
12531337 <table class="api"><tr>
12911375 </tr></table><h3><a name="giza_set_colour_table_float">giza_set_colour_table_float</a><hr></h3>
12921376 <table class="proto">
12931377 <tr><td width=10%>int</td><td width=20%>giza_set_colour_table_float</td><td> (const float *controlPoints, const float *red, const float *green, const float *blue, int n, float contrast, float brightness) ;</tr></table><p>Same functionality as giza_set_colour_table but takes floats</p>
1294 <h4>See also:</h4>
1295 <table class="api"></table><h3><a name="giza_rgb_from_table">giza_rgb_from_table</a><hr></h3>
1378 <h4>See Also:</h4><p><a href="#giza_set_colour_table">giza_set_colour_table</a> </p><h3><a name="giza_rgb_from_table">giza_rgb_from_table</a><hr></h3>
12961379 <table class="proto">
12971380 <tr><td width=10%>void</td><td width=20%>giza_rgb_from_table</td><td> (double pos, double *red, double *green, double *blue) ;</tr></table><p>Gets the rgb values from the colour table corresponding to the fraction of the table.</p>
12981381 <h4>Input:</h4>
13041387 <td>green :</td><td>Gets set to the green component of the colour at pos.</td>
13051388 </tr><tr>
13061389 <td>blue :</td><td>Gets set to the blue component of the colour at pos.</td>
1307 </tr></table><h4>See also:</h4>
1308 <table class="api"></table><h3><a name="giza_rgb_from_table_float">giza_rgb_from_table_float</a><hr></h3>
1390 </tr></table><h4>See Also:</h4><p><a href="#giza_set_colour_table">giza_set_colour_table</a> </p><h3><a name="giza_rgb_from_table_float">giza_rgb_from_table_float</a><hr></h3>
13091391 <table class="proto">
13101392 <tr><td width=10%>void</td><td width=20%>giza_rgb_from_table_float</td><td> (float pos, float *red, float *green, float *blue) ;</tr></table><p>Same functionality giza_rgb_from_table but takes floats</p>
13111393 <h4>See Also:</h4><p><a href="#giza_rgb_from_table">giza_rgb_from_table</a> <a href="#giza_set_colour_table">giza_set_colour_table</a> </p><h3><a name="giza_save_colour_table">giza_save_colour_table</a><hr></h3>
16511733 </tr><tr>
16521734 <td>yanc :</td><td>the y-coord of the anchor point.</td>
16531735 </tr><tr>
1654 <td>x :</td><td>Gets set the position of the cursor.</td>
1655 </tr><tr>
1656 <td>y :</td><td>Gets set to the position of the cursor.</td>
1736 <td>x :</td><td>Gets set to the x position of the cursor.</td>
1737 </tr><tr>
1738 <td>y :</td><td>Gets set to the y position of the cursor.</td>
16571739 </tr><tr>
16581740 <td>ch :</td><td>Gets set to the character pressed by the user.</td>
16591741 </tr></table><h4>Return:</h4>
00 <table>
11 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgarro">cpgarro</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw an arrow</td></tr>
22 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgask">cpgask</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>control new page prompting</td></tr>
3 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgaxis">cpgaxis</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>draw an axis</td></tr>
3 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgaxis">cpgaxis</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw an axis</td></tr>
44 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgband">cpgband</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>read cursor position, with anchor</td></tr>
55 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgbbuf">cpgbbuf</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>begin batch of output (buffer)</td></tr>
66 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgbeg">cpgbeg</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>open a graphics device</td></tr>
101101 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgswin">cpgswin</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set window</td></tr>
102102 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgtbox">cpgtbox</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw frame and write (dd) hh mm ss.s labelling</td></tr>
103103 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgtext">cpgtext</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>write text (horizontal, left-justified)</td></tr>
104 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgtick">cpgtick</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>draw a single tick mark on an axis</td></tr>
104 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgtick">cpgtick</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw a single tick mark on an axis</td></tr>
105105 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgupdt">cpgupdt</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>update display</td></tr>
106106 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgvect">cpgvect</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>vector map of a 2D data array, with blanking</td></tr>
107107 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgvsiz">cpgvsiz</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set viewport (inches)</td></tr>
109109 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgwedg">cpgwedg</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>annotate an image plot with a wedge</td></tr>
110110 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgwnad">cpgwnad</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set window and adjust viewport to same aspect ratio</td></tr>
111111 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td></table>
112 <p>97 of 110 routines implemented, 95 of 110 fully implemented.</p>
112 <p>99 of 110 routines implemented, 97 of 110 fully implemented.</p>
2323 <p>This tutorial will show you the basics of using giza to create scientific plots
2424 with a simple example. We will generate the following graph;</p>
2525 <table class="img">
26 <tr><td><a href="../images/Getting_Started.png"><img alt="sample1" src="../images/Getting_Started.png"></a></td></tr>
26 <tr><td><a href="images/Getting_Started.png"><img alt="sample1" src="images/Getting_Started.png"></a></td></tr>
2727 </table>
2828 <br>
2929 <p>Click <a href="gettingstarted.c">here</a> to get the source file, or read on for
3131 <h2>PGPLOT interface</h2>
3232 <p>Included with giza is a PGPLOT interface that allows code written using
3333 PGPLOT to be instantly linked against giza.
34 Here is the status of the <a href="pgplot.shtml">PGPLOT interface</a>.</p>
34 Here is the status of the <a href="pgplot.html">PGPLOT interface</a>.</p>
3535 </div>
3636
3737 </html>
0 <html>
1 <head>
2 <meta http-equiv="Content-Type" content="text/html"; charset=utf-8" \>
3 <title>giza - documentation</title>
4 <link rel="stylesheet" href="../style.css" type="text/css" \>
5 </head>
6
7 <div class="header">
8 <a href="/"><img alt="giza" src="../title.png"\></a>
9 </div>
10
11 <div id="menucontainer">
12 <ul id="menulist">
13 <li><a href="../news/">news</a></li>
14 <li><a href="../download/">download</a></li>
15 <li><a href="../documentation/">documentation</a></li>
16 <li><a href="../contact/">contact</a></li>
17 <li><a href="../samples/">samples</a></li>
18 </ul>
19 </div>
20
21 <div id="content">
22 <h1>PGPLOT interface</h1>
23 <p>Included with giza are PGPLOT interfaces that aim to replicate the full public interface to PGPLOT. This means that giza can be compiled as a drop-in replacement for
24 libpgplot and libcpgplot. So older programs written using PGPLOT can be linked against giza with the source code unchanged, giving a modern
25 plotting library with antialiased lines, real fonts and PDF output. For the c library (libcpgplot) it also avoids the unnecessary linking against FORTRAN
26 necessary with the original libcpgplot so increases portability of code written in c.
27 The giza-PGPLOT API also aims to provide maximum backwards compatibility with PGPLOT (e.g., line styles,
28 greek letter escape sequences, etc.) so that codes can be transitioned with ease.</p>
29
30 <p>The status of the standard <a href="#libpgplot">Fortran</a> (libpgplot) and <a href="#libcpgplot">C</a> (libcpgplot) interfaces are given below. Contributions most welcome!</p>
31 </div>
32
00 <table>
11 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGARRO">PGARRO</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw an arrow</td></tr>
22 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGASK">PGASK</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>control new page prompting</td></tr>
3 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGAXIS">PGAXIS</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>draw an axis</td></tr>
3 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGAXIS">PGAXIS</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw an axis</td></tr>
44 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGBAND">PGBAND</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>read cursor position, with anchor</td></tr>
55 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGBBUF">PGBBUF</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>begin batch of output (buffer)</td></tr>
66 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGBEG">PGBEG</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>open a graphics device</td></tr>
105105 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSWIN">PGSWIN</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set window</td></tr>
106106 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGTBOX">PGTBOX</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw frame and write (DD) HH MM SS.S labelling</td></tr>
107107 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGTEXT">PGTEXT</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>write text (horizontal, left-justified)</td></tr>
108 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGTICK">PGTICK</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>draw a single tick mark on an axis</td></tr>
108 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGTICK">PGTICK</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw a single tick mark on an axis</td></tr>
109109 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGUPDT">PGUPDT</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>update display</td></tr>
110110 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGVECT">PGVECT</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>vector map of a 2D data array, with blanking</td></tr>
111111 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGVSIZ">PGVSIZ</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set viewport (inches)</td></tr>
126126 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGVSTAND">PGVSTAND</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>non-standard alias for PGVSTD</td></tr>
127127 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGWINDOW">PGWINDOW</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>non-standard alias for PGSWIN</td></tr>
128128 </table>
129 <p>114 of 127 routines implemented, 111 of 127 fully implemented.</p>
129 <p>116 of 127 routines implemented, 113 of 127 fully implemented.</p>
0 <html>
1 <head>
2 <meta http-equiv="Content-Type" content="text/html"; charset=utf-8" \>
3 <title>giza - documentation</title>
4 <link rel="stylesheet" href="../style.css" type="text/css" \>
5 </head>
6
7 <div class="header">
8 <a href="/"><img alt="giza" src="../title.png"\></a>
9 </div>
10
11 <div id="menucontainer">
12 <ul id="menulist">
13 <li><a href="../news/">news</a></li>
14 <li><a href="../download/">download</a></li>
15 <li><a href="../documentation/">documentation</a></li>
16 <li><a href="../contact/">contact</a></li>
17 <li><a href="../samples/">samples</a></li>
18 </ul>
19 </div>
20
21 <div id="content">
22 <h1>PGPLOT interface</h1>
23 <p>Included with giza are PGPLOT interfaces that aim to replicate the full public interface to PGPLOT. This means that giza can be compiled as a drop-in replacement for
24 libpgplot and libcpgplot. So older programs written using PGPLOT can be linked against giza with the source code unchanged, giving a modern
25 plotting library with antialiased lines, real fonts and PDF output. For the c library (libcpgplot) it also avoids the unnecessary linking against FORTRAN
26 necessary with the original libcpgplot so increases portability of code written in c.
27 The giza-PGPLOT API also aims to provide maximum backwards compatibility with PGPLOT (e.g., line styles,
28 greek letter escape sequences, etc.) so that codes can be transitioned with ease.</p>
29
30 <p>The status of the standard <a href="#libpgplot">Fortran</a> (libpgplot) and <a href="#libcpgplot">C</a> (libcpgplot) interfaces are given below. Contributions most welcome!</p>
31 </div>
32
33 <div id="content">
34 <h2><a name="libpgplot"></a>Current status (libpgplot):</h2>
35 <table>
36 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGARRO">PGARRO</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw an arrow</td></tr>
37 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGASK">PGASK</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>control new page prompting</td></tr>
38 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGAXIS">PGAXIS</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw an axis</td></tr>
39 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGBAND">PGBAND</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>read cursor position, with anchor</td></tr>
40 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGBBUF">PGBBUF</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>begin batch of output (buffer)</td></tr>
41 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGBEG">PGBEG</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>open a graphics device</td></tr>
42 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGBIN">PGBIN</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>histogram of binned data</td></tr>
43 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGBOX">PGBOX</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw labeled frame around viewport</td></tr>
44 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGCIRC">PGCIRC</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw a circle, using fill-area attributes</td></tr>
45 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGCLOS">PGCLOS</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>close the selected graphics device</td></tr>
46 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGCONB">PGCONB</a></td><td bgcolor=#FF6600>PARTIALLY IMPLEMENTED</td><td>contour map of a 2D data array, with blanking</td></tr>
47 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGCONF">PGCONF</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>fill between two contours</td></tr>
48 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGCONL">PGCONL</a></td><td bgcolor=#FF6600>PARTIALLY IMPLEMENTED</td><td>label contour map of a 2D data array</td></tr>
49 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGCONS">PGCONS</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>contour map of a 2D data array (fast algorithm)</td></tr>
50 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGCONT">PGCONT</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>contour map of a 2D data array (contour-following)</td></tr>
51 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGCONX">PGCONX</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>contour map of a 2D data array (non rectangular)</td></tr>
52 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGCTAB">PGCTAB</a></td><td bgcolor=#FF6600>PARTIALLY IMPLEMENTED</td><td>install the color table to be used by PGIMAG</td></tr>
53 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGCURS">PGCURS</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>read cursor position</td></tr>
54 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGDRAW">PGDRAW</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw a line from the current pen position to a point</td></tr>
55 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGEBUF">PGEBUF</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>end batch of output (buffer)</td></tr>
56 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGEND">PGEND</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>close all open graphics devices</td></tr>
57 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGENV">PGENV</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set window and viewport and draw labeled frame</td></tr>
58 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGERAS">PGERAS</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>erase all graphics from current page</td></tr>
59 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGERR1">PGERR1</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>horizontal or vertical error bar</td></tr>
60 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGERRB">PGERRB</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>horizontal or vertical error bar</td></tr>
61 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGERRX">PGERRX</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>horizontal error bar</td></tr>
62 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGERRY">PGERRY</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>vertical error bar</td></tr>
63 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGETXT">PGETXT</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>erase text from graphics display</td></tr>
64 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGFUNT">PGFUNT</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>function defined by X = F(T), Y = G(T)</td></tr>
65 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGFUNX">PGFUNX</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>function defined by Y = F(X)</td></tr>
66 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGFUNY">PGFUNY</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>function defined by X = F(Y)</td></tr>
67 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGGRAY">PGGRAY</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>gray-scale map of a 2D data array</td></tr>
68 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGHI2D">PGHI2D</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>cross-sections through a 2D data array</td></tr>
69 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGHIST">PGHIST</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>histogram of unbinned data</td></tr>
70 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGIDEN">PGIDEN</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>write username, date, and time at bottom of plot</td></tr>
71 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGIMAG">PGIMAG</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>color image from a 2D data array</td></tr>
72 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGLAB">PGLAB</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>write labels for x-axis, y-axis, and top of plot</td></tr>
73 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGLCUR">PGLCUR</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw a line using the cursor</td></tr>
74 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGLDEV">PGLDEV</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>list available device types on standard output</td></tr>
75 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGLEN">PGLEN</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>find length of a string in a variety of units</td></tr>
76 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGLINE">PGLINE</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw a polyline (curve defined by line-segments)</td></tr>
77 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGMOVE">PGMOVE</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>move pen (change current pen position)</td></tr>
78 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGMTXT">PGMTXT</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>write text at position relative to viewport</td></tr>
79 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGNCUR">PGNCUR</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>mark a set of points using the cursor</td></tr>
80 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGNUMB">PGNUMB</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>convert a number into a plotable character string</td></tr>
81 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGOLIN">PGOLIN</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>mark a set of points using the cursor</td></tr>
82 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGOPEN">PGOPEN</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>open a graphics device</td></tr>
83 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGPAGE">PGPAGE</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>advance to new page</td></tr>
84 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGPANL">PGPANL</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>switch to a different panel on the view surface</td></tr>
85 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGPAP">PGPAP</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>change the size of the view surface</td></tr>
86 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGPIXL">PGPIXL</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw pixels</td></tr>
87 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGPNTS">PGPNTS</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>draw several graph markers, not all the same</td></tr>
88 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGPOLY">PGPOLY</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw a polygon, using fill-area attributes</td></tr>
89 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGPT">PGPT</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw several graph markers</td></tr>
90 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGPT1">PGPT1</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw one graph marker</td></tr>
91 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGPTXT">PGPTXT</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>write text at arbitrary position and angle</td></tr>
92 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQAH">PGQAH</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire arrow-head style</td></tr>
93 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQCF">PGQCF</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire character font</td></tr>
94 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQCH">PGQCH</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire character height</td></tr>
95 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQCI">PGQCI</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire color index</td></tr>
96 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQCIR">PGQCIR</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire color index range</td></tr>
97 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQCLP">PGQCLP</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire clipping status</td></tr>
98 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQCOL">PGQCOL</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire color capability</td></tr>
99 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQCR ">PGQCR </a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire color representation</td></tr>
100 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQCS ">PGQCS </a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire character height in a variety of units</td></tr>
101 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQDT">PGQDT</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>inquire name of nth available device type</td></tr>
102 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQFS">PGQFS</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire fill-area style</td></tr>
103 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQHS">PGQHS</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire hatching style</td></tr>
104 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQID">PGQID</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire current device identifier</td></tr>
105 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQINF">PGQINF</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire PGPLOT general information</td></tr>
106 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQITF">PGQITF</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>inquire image transfer function</td></tr>
107 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQLS">PGQLS</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire line style</td></tr>
108 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQLW">PGQLW</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire line width</td></tr>
109 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQNDT">PGQNDT</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>inquire number of available device types</td></tr>
110 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQPOS">PGQPOS</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire current pen position</td></tr>
111 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQTBG">PGQTBG</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire text background color index</td></tr>
112 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQTXT">PGQTXT</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>find bounding box of text string</td></tr>
113 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQVP">PGQVP</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire viewport size and position</td></tr>
114 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQVSZ">PGQVSZ</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire size of view surface</td></tr>
115 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGQWIN">PGQWIN</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire window boundary coordinates</td></tr>
116 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGRECT">PGRECT</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw a rectangle, using fill-area attributes</td></tr>
117 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGRND">PGRND</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>find the smallest `round' number greater than x</td></tr>
118 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGRNGE">PGRNGE</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>choose axis limits</td></tr>
119 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSAH">PGSAH</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set arrow-head style</td></tr>
120 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSAVE">PGSAVE</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>save PGPLOT attributes</td></tr>
121 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGUNSA">PGUNSA</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>restore PGPLOT attributes</td></tr>
122 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSCF">PGSCF</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set character font</td></tr>
123 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSCH">PGSCH</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set character height</td></tr>
124 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSCI">PGSCI</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set color index</td></tr>
125 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSCIR">PGSCIR</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set color index range</td></tr>
126 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSCLP">PGSCLP</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>enable or disable clipping at edge of viewport</td></tr>
127 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSCR">PGSCR</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set color representation</td></tr>
128 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSCRL">PGSCRL</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>scroll window</td></tr>
129 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSCRN">PGSCRN</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>set color representation by name</td></tr>
130 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSFS">PGSFS</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set fill-area style</td></tr>
131 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSHLS">PGSHLS</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set color representation using HLS system</td></tr>
132 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSHS">PGSHS</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set hatching style</td></tr>
133 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSITF">PGSITF</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>set image transfer function</td></tr>
134 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSLCT">PGSLCT</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>select an open graphics device</td></tr>
135 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSLS">PGSLS</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set line style</td></tr>
136 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSLW">PGSLW</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set line width</td></tr>
137 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSTBG">PGSTBG</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set text background color index</td></tr>
138 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSUBP">PGSUBP</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>subdivide view surface into panels</td></tr>
139 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSVP">PGSVP</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set viewport (normalized device coordinates)</td></tr>
140 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGSWIN">PGSWIN</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set window</td></tr>
141 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGTBOX">PGTBOX</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw frame and write (DD) HH MM SS.S labelling</td></tr>
142 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGTEXT">PGTEXT</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>write text (horizontal, left-justified)</td></tr>
143 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGTICK">PGTICK</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw a single tick mark on an axis</td></tr>
144 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGUPDT">PGUPDT</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>update display</td></tr>
145 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGVECT">PGVECT</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>vector map of a 2D data array, with blanking</td></tr>
146 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGVSIZ">PGVSIZ</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set viewport (inches)</td></tr>
147 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGVSTD">PGVSTD</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set standard (default) viewport</td></tr>
148 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGWEDG">PGWEDG</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>annotate an image plot with a wedge</td></tr>
149 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGWNAD">PGWNAD</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set window and adjust viewport to same aspect ratio</td></tr>
150 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGADVANCE">PGADVANCE</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>non-standard alias for PGPAGE</td></tr>
151 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGBEGIN">PGBEGIN</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>non-standard alias for PGBEG</td></tr>
152 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGCURSE">PGCURSE</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>non-standard alias for PGCURS</td></tr>
153 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGLABEL">PGLABEL</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>non-standard alias for PGLAB</td></tr>
154 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGMTEXT">PGMTEXT</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>non-standard alias for PGMTXT</td></tr>
155 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGNCURSE">PGNCURSE</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>non-standard alias for PGNCUR</td></tr>
156 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGPAPER">PGPAPER</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>non-standard alias for PGPAP</td></tr>
157 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGPOINT">PGPOINT</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>non-standard alias for PGPT</td></tr>
158 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGPTEXT">PGPTEXT</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>non-standard alias for PGPTXT</td></tr>
159 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGVPORT">PGVPORT</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>non-standard alias for PGSVP</td></tr>
160 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGVSIZE">PGVSIZE</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>non-standard alias for PGVSIZ</td></tr>
161 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGVSTAND">PGVSTAND</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>non-standard alias for PGVSTD</td></tr>
162 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGWINDOW">PGWINDOW</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>non-standard alias for PGSWIN</td></tr>
163 </table>
164 <p>116 of 127 routines implemented, 113 of 127 fully implemented.</p>
165 </div>
166 <div id="content">
167 <h2><a name="libcpgplot"></a>Current status (libcpgplot):</h2>
168 <table>
169 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgarro">cpgarro</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw an arrow</td></tr>
170 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgask">cpgask</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>control new page prompting</td></tr>
171 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgaxis">cpgaxis</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw an axis</td></tr>
172 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgband">cpgband</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>read cursor position, with anchor</td></tr>
173 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgbbuf">cpgbbuf</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>begin batch of output (buffer)</td></tr>
174 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgbeg">cpgbeg</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>open a graphics device</td></tr>
175 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgbin">cpgbin</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>histogram of binned data</td></tr>
176 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgbox">cpgbox</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw labeled frame around viewport</td></tr>
177 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgcirc">cpgcirc</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw a circle, using fill-area attributes</td></tr>
178 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgclos">cpgclos</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>close the selected graphics device</td></tr>
179 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgconb">cpgconb</a></td><td bgcolor=#FF6600>PARTIALLY IMPLEMENTED</td><td>contour map of a 2D data array, with blanking</td></tr>
180 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgconf">cpgconf</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>fill between two contours</td></tr>
181 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgconl">cpgconl</a></td><td bgcolor=#FF6600>PARTIALLY IMPLEMENTED</td><td>label contour map of a 2D data array</td></tr>
182 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgcons">cpgcons</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>contour map of a 2D data array (fast algorithm)</td></tr>
183 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgcont">cpgcont</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>contour map of a 2D data array (contour-following)</td></tr>
184 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgctab">cpgctab</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>install the color table to be used by pgimag</td></tr>
185 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgcurs">cpgcurs</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>read cursor position</td></tr>
186 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgdraw">cpgdraw</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw a line from the current pen position to a point</td></tr>
187 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgebuf">cpgebuf</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>end batch of output (buffer)</td></tr>
188 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgend">cpgend</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>close all open graphics devices</td></tr>
189 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgenv">cpgenv</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set window and viewport and draw labeled frame</td></tr>
190 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgeras">cpgeras</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>erase all graphics from current page</td></tr>
191 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgerr1">cpgerr1</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>horizontal or vertical error bar</td></tr>
192 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgerrb">cpgerrb</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>horizontal or vertical error bar</td></tr>
193 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgerrx">cpgerrx</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>horizontal error bar</td></tr>
194 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgerry">cpgerry</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>vertical error bar</td></tr>
195 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgetxt">cpgetxt</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>erase text from graphics display</td></tr>
196 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pggray">cpggray</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>gray-scale map of a 2D data array</td></tr>
197 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pghi2d">cpghi2d</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>cross-sections through a 2D data array</td></tr>
198 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pghist">cpghist</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>histogram of unbinned data</td></tr>
199 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgiden">cpgiden</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>write username, date, and time at bottom of plot</td></tr>
200 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgimag">cpgimag</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>color image from a 2D data array</td></tr>
201 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pglab">cpglab</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>write labels for x-axis, y-axis, and top of plot</td></tr>
202 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pglcur">cpglcur</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw a line using the cursor</td></tr>
203 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgldev">cpgldev</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>list available device types on standard output</td></tr>
204 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pglen">cpglen</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>find length of a string in a variety of units</td></tr>
205 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgline">cpgline</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw a polyline (curve defined by line-segments)</td></tr>
206 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgmove">cpgmove</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>move pen (change current pen position)</td></tr>
207 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgmtxt">cpgmtxt</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>write text at position relative to viewport</td></tr>
208 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgncur">cpgncur</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>mark a set of points using the cursor</td></tr>
209 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgnumb">cpgnumb</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>convert a number into a plottable character string</td></tr>
210 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgolin">cpgolin</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>mark a set of points using the cursor</td></tr>
211 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgopen">cpgopen</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>open a graphics device</td></tr>
212 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgpage">cpgpage</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>advance to new page</td></tr>
213 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgpanl">cpgpanl</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>switch to a different panel on the view surface</td></tr>
214 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgpap">cpgpap</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>change the size of the view surface</td></tr>
215 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgpixl">cpgpixl</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw pixels</td></tr>
216 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgpnts">cpgpnts</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>draw several graph markers, not all the same</td></tr>
217 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgpoly">cpgpoly</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw a polygon, using fill-area attributes</td></tr>
218 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgpt">cpgpt</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw several graph markers</td></tr>
219 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgpt1">cpgpt1</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw one graph marker</td></tr>
220 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgptxt">cpgptxt</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>write text at arbitrary position and angle</td></tr>
221 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqah">cpgqah</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire arrow-head style</td></tr>
222 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqcf">cpgqcf</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire character font</td></tr>
223 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqch">cpgqch</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire character height</td></tr>
224 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqci">cpgqci</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire color index</td></tr>
225 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqcir">cpgqcir</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire color index range</td></tr>
226 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqclp">cpgqclp</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire clipping Status</td></tr>
227 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqcol">cpgqcol</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire color capability</td></tr>
228 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqcr">cpgqcr</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire color representation</td></tr>
229 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqcs">cpgqcs</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire character height in a variety of units</td></tr>
230 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqdt">cpgqdt</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>inquire name of nth available device type</td></tr>
231 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqfs">cpgqfs</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire fill-area style</td></tr>
232 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqhs">cpgqhs</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire hatching style</td></tr>
233 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqid">cpgqid</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire current device identifier</td></tr>
234 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqinf">cpgqinf</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>inquire pgplot general information</td></tr>
235 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqitf">cpgqitf</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>inquire image transfer function</td></tr>
236 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqls">cpgqls</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire line style</td></tr>
237 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqlw">cpgqlw</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire line width (as integer)</td></tr>
238 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqndt">cpgqndt</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>inquire number of available device types</td></tr>
239 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqpos">cpgqpos</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire current pen position</td></tr>
240 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqtbg">cpgqtbg</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire text background color index</td></tr>
241 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqtxt">cpgqtxt</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>find bounding box of text string</td></tr>
242 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqvp">cpgqvp</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire viewport size and position</td></tr>
243 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqvsz">cpgqvsz</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire size of view surface</td></tr>
244 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgqwin">cpgqwin</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>inquire window boundary coordinates</td></tr>
245 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgrect">cpgrect</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw a rectangle, using fill-area attributes</td></tr>
246 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgrnd">cpgrnd</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>find the smallest `round' number greater than x</td></tr>
247 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgrnge">cpgrnge</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>choose axis limits</td></tr>
248 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgsah">cpgsah</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set arrow-head style</td></tr>
249 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgsave">cpgsave</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>save pgplot attributes</td></tr>
250 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgunsa">cpgunsa</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>restore pgplot attributes</td></tr>
251 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgscf">cpgscf</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set character font</td></tr>
252 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgsch">cpgsch</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set character height</td></tr>
253 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgsci">cpgsci</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set color index</td></tr>
254 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgscir">cpgscir</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set color index range</td></tr>
255 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgsclp">cpgsclp</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>enable or disable clipping at edge of viewport</td></tr>
256 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgscr">cpgscr</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set color representation</td></tr>
257 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgscrl">cpgscrl</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>scroll window</td></tr>
258 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgscrn">cpgscrn</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>set color representation by name</td></tr>
259 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgsfs">cpgsfs</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set fill-area style</td></tr>
260 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgshls">cpgshls</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set color representation using hls system</td></tr>
261 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgshs">cpgshs</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set hatching style</td></tr>
262 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgsitf">cpgsitf</a></td><td bgcolor=#FF0000>NOT IMPLEMENTED</td><td>set image transfer function</td></tr>
263 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgslct">cpgslct</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>select an open graphics device</td></tr>
264 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgsls">cpgsls</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set line style</td></tr>
265 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgslw">cpgslw</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set line width</td></tr>
266 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgstbg">cpgstbg</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set text background color index</td></tr>
267 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgsubp">cpgsubp</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>subdivide view surface into panels</td></tr>
268 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgsvp">cpgsvp</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set viewport (normalized device coordinates)</td></tr>
269 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgswin">cpgswin</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set window</td></tr>
270 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgtbox">cpgtbox</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw frame and write (dd) hh mm ss.s labelling</td></tr>
271 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgtext">cpgtext</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>write text (horizontal, left-justified)</td></tr>
272 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgtick">cpgtick</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>draw a single tick mark on an axis</td></tr>
273 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgupdt">cpgupdt</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>update display</td></tr>
274 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgvect">cpgvect</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>vector map of a 2D data array, with blanking</td></tr>
275 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgvsiz">cpgvsiz</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set viewport (inches)</td></tr>
276 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgvstd">cpgvstd</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set standard (default) viewport</td></tr>
277 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgwedg">cpgwedg</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>annotate an image plot with a wedge</td></tr>
278 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td><tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#pgwnad">cpgwnad</a></td><td bgcolor=#009900>IMPLEMENTED</td><td>set window and adjust viewport to same aspect ratio</td></tr>
279 <tr><td><a href="http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#"></a></td></table>
280 <p>99 of 110 routines implemented, 97 of 110 fully implemented.</p>
281 </div>
282 </html>
+0
-44
docs/documentation/pgplot.shtml less more
0 <html>
1 <head>
2 <meta http-equiv="Conent-Type" content="text/html"; charset=utf-8" \>
3 <title>giza - documentation</title>
4 <link rel="stylesheet" href="../style.css" type="text/css" \>
5 </head>
6
7 <div class="header">
8 <a href="/"><img alt="giza" src="../title.png"\></a>
9 </div>
10
11 <div id="menucontainer">
12 <ul id="menulist">
13 <li><a href="/news/">news</a></li>
14 <li><a href="/download/">download</a></li>
15 <li><a href="/documentation/">documentation</a></li>
16 <li><a href="/contact/">contact</a></li>
17 <li><a href="/samples/">samples</a></li>
18 </ul>
19 </div>
20
21 <div id="content">
22 <h1>PGPLOT interface</h1>
23 <p>Included with giza are PGPLOT interfaces that aim to replicate the full public interface to PGPLOT. This means that giza can be compiled as a drop-in replacement for
24 libpgplot and libcpgplot. So older programs written using PGPLOT can be linked against giza with the source code unchanged, giving a modern
25 plotting library with antialiased lines, real fonts and PDF output. For the c library (libcpgplot) it also avoids the unnecessary linking against FORTRAN
26 necessary with the original libcpgplot so increases portability of code written in c.
27 The giza-PGPLOT API also aims to provide maximum backwards compatibility with PGPLOT (e.g., line styles,
28 greek letter escape sequences, etc.) so that codes can be transitioned with ease.</p>
29
30 <p>The status of the standard <a href="#libpgplot">Fortran</a> (libpgplot) and <a href="#libcpgplot">C</a> (libcpgplot) interfaces are given below. Contributions most welcome!</p>
31 </div>
32 <div id="content">
33 <h2><a name="libpgplot"></a>Current status (libpgplot):</h2>
34 <p>
35 <!--#include virtual="pgplot-status.html"-->
36 </p>
37 <h2><a name="libcpgplot"></a>Current status (libcpgplot):</h2>
38 <p>
39 <!--#include virtual="cpgplot-status.html"-->
40 </p>
41 </div>
42
43 </html>
2929 PostScript, eps, png and svg.</p>
3030
3131 <p>Giza also provides a drop-in, modern replacement for the PGPLOT graphics library (libpgplot and libcpgplot).
32 Current status of the PGPLOT interface <a href="documentation/pgplot.shtml">here</a>.</p>
32 Current status of the PGPLOT interface <a href="documentation/pgplot.html">here</a>.</p>
3333
3434 <p>
3535 Written by James Wetter and Daniel Price, initially as a backend for the
2020
2121 <div id="content">
2222 <h1>News</h1>
23 <p>2020.01.22: <a href="https://github.com/danieljprice/giza/releases/download/v1.2.0/giza-1.2.0.tar.gz">1.2.0</a> released.</p>
24 <p>2018.11.20: <a href="https://github.com/danieljprice/giza/releases/download/v1.1.0/giza-1.1.0.tar.gz">1.1.0</a> released.</p>
25 <p>2018.09.06: <a href="https://github.com/danieljprice/giza/releases/download/v1.0.0/giza-1.0.0.tar.gz">1.0.0</a> released.</p>
26 <p>2018.03.07: <a href="https://github.com/danieljprice/giza/releases/download/v0.9.5/giza-0.9.5.tar.gz">0.9.5</a> released.</p>
23 <p>2022.01.28: <a href="https://github.com/danieljprice/giza/releases">1.3.1</a> released.</p>
24 <p>2022.01.27: <a href="https://github.com/danieljprice/giza/releases">1.3.0</a> released.</p>
25 <p>2021.06.18: <a href="https://github.com/danieljprice/giza/releases">1.2.1</a> released.</p>
26 <p>2020.01.22: <a href="https://github.com/danieljprice/giza/releases">1.2.0</a> released.</p>
27 <p>2018.11.20: <a href="https://github.com/danieljprice/giza/releases">1.1.0</a> released.</p>
28 <p>2018.09.06: <a href="https://github.com/danieljprice/giza/releases">1.0.0</a> released.</p>
29 <p>2018.03.07: <a href="https://github.com/danieljprice/giza/releases">0.9.5</a> released.</p>
2730 <p>2015.12.23: <a href="https://sourceforge.net/projects/giza/files/">0.9.4</a> released.</p>
2831 <p>2015.04.28: <a href="https://sourceforge.net/projects/giza/files/">0.9.3</a> released.</p>
2932 <p>2015.01.05: <a href="https://sourceforge.net/projects/giza/files/">0.9.2</a> released.</p>
0 #!/usr/bin/perl
1 use IO::File;
2
3 # Open up the output files
4 $fh = new IO::File "> api.html";
5
6 # Lists for the index
7 @IText = ();
8 @ISettings = ();
9 @IDrawing = ();
10 @IDevices = ();
11 @IInteractive = ();
12
13 @Device = ();
14 @Test = ();
15 @Settings = ();
16 @Drawing = ();
17 @Interactive = ();
18
19 # Subroutine for parsing individual comments
20 sub processComment
21 {
22 my $fh;
23 my @prototype;
24 my $type = '';
25 my $name = '';
26 my $desciption = '';
27 my @seeAlso;
28 my @lists;
29
30 $desciption = '';
31 undef @lists;
32 undef @seeAlso;
33 undef @prototype;
34 # Get all the info
35 do
36 {
37 # Get the name and type
38 if ($_[0] =~ m/.* (Interactive|Text|Drawing|Device|Settings):\s*(.*)$/)
39 {
40 ($type, $name) = ($1, $2);
41 }
42 # Get the desciption
43 elsif ($_[0] =~ m/^.*Synopsis:\s*(.*)$/)
44 {
45 $description = $1;
46 while ($_[1] =~ m/\s\*\s*(\S.*)$/)
47 {
48 $description = $description . ' ' . $1;
49 shift;
50 }
51 }
52 # Get the see also list
53 elsif ($_[0] =~ m/.* See Also: (.*)$/)
54 {
55 @seeAlso = split (/,\s*/, $1);
56 }
57 # Get any lists
58 elsif ($_[0] =~ m/\s*\*\s*(\S.*):/)
59 {
60 # the title
61 my @tmp = ();
62 push @tmp, $1;
63
64 # the items
65 while ($_[1] =~ m/\s*\*\s*\-(.*)\s*:\-\s*(\S.*)$/)
66 {
67 push @tmp, $1;
68 push @tmp, $2;
69 shift;
70
71 # Items over more than one line.
72 while ($_[1] !~ m/^\s*\*\s*\-.*\s*:\-\s*\S.*$/ && $_[1] !~ m/^\s*\*\s*$/ && $_[1] =~ m/^\s*\*/)
73 {
74 $_[1] =~ m/^\s*\*\s*(\S.*)$/;
75 push (@tmp, pop (@tmp) . ' ' . $1);
76 shift;
77 }
78 }
79 push @lists, \@tmp;
80 }
81 # Fuction prototype
82 elsif ($_[0] !~ m/^ \*/)
83 {
84 # Type
85 chomp ($_[0]);
86 push @prototype, $_[0];
87 shift;
88 chomp ($_[0]);
89 # Name
90 push @prototype, substr ($_[0], 0, index ($_[0], ' '));
91 # Arguments
92 push @prototype, substr ($_[0], index ($_[0], ' '));
93 while (shift)
94 {
95 $_[0] =~ m/^\s*(.*)$/;
96 push @prototype, pop (@prototype) . " $1";
97 }
98 }
99 } while (shift);
100
101 # Add to the index and description lists
102 if ($type eq "Text")
103 {
104 $IFile = \@IText;
105 $File = \@Text;
106 }
107 elsif ($type eq "Drawing")
108 {
109 $IFile = \@IDrawing;
110 $File = \@Drawing;
111 }
112 elsif ($type eq "Device")
113 {
114 $IFile = \@IDevice;
115 $File = \@Device;
116 }
117 elsif ($type eq "Settings")
118 {
119 $IFile = \@ISettings;
120 $File = \@Settings;
121 }
122 elsif ($type eq "Interactive")
123 {
124 $IFile = \@IInteractive;
125 $File = \@Interactive;
126 }
127 else
128 {
129 return;
130 }
131
132 push @$IFile, $name;
133
134 # Name
135 push @$File, "<h3><a name=\"$name\">$name</a><hr></h3>\n";
136 # Prototype
137 push @$File, "<table class=\"proto\">\n<tr><td width=10%>" . shift (@prototype) . "</td><td width=20%>" . shift (@prototype) . "</td><td>" . shift (@prototype) . ";</tr></table>";
138 # Description
139 push @$File, "<p>$description</p>\n";
140 # Lists
141 foreach $item (@lists)
142 {
143 # Name
144 push @$File, "<h4>" . shift (@$item) . ":</h4>\n";
145 # Table preamble
146 push @$File, "<table class=\"api\">";
147 # Table contents
148 while (@$item)
149 {
150 push @$File, "<tr>\n<td>" . shift (@$item) . ":</td>";
151 push @$File, "<td>" . shift (@$item) . "</td>\n</tr>";
152 }
153 # Table postamble
154 push @$File, "</table>";
155 }
156 # See Also
157 if (@seeAlso)
158 {
159 push @$File, "<h4>See Also:</h4><p>";
160 foreach (@seeAlso)
161 {
162 push @$File, "<a href=\"#$_\">$_</a> ";
163 }
164 push @$File, "</p>";
165 }
166
167 }
168
169 # prossess each comment
170 my @currentComment = ();
171 my $inComment = 0;
172 while (<>)
173 {
174 # Begin a comment
175 if ($_ =~ m/\/\*\*/ && $inComment == 0)
176 {
177 $inComment = 1;
178 }
179 # End comment
180 elsif ($_ =~ m/\*\// && $inComment == 1)
181 {
182 # Get the prototype as well
183 my $nextL = <>;
184 while ($nextL && $nextL !~ m/{/)
185 {
186 push @currentComment, $nextL;
187 $nextL = <>;
188 }
189 &processComment (@currentComment);
190 @currentComment = ();
191 $inComment = 0;
192 }
193 # Add to comment
194 elsif ($inComment == 1)
195 {
196 push (@currentComment, $_);
197 }
198 }
199
200 # Write the output file
201 # First the formating junk
202 $fh->print (
203 "<html>
204 <head>
205 <meta http-equiv=\"Content-Type\" content=\"text/html\"; charset=utf-8\" \>
206 <title>giza - API Reference Manual</title>
207 <link rel=\"stylesheet\" href=\"../style.css\" type=\"text/css\" \>
208 </head>
209
210 <div class=\"header\">
211 <a href=\"/giza\"><img alt=\"giza\" src=\"../title.png\"\></a>
212 </div>
213
214 <div id=\"menucontainer\">
215 <ul id=\"menulist\">
216 <li><a href=\"../news/\">news</a></li>
217 <li><a href=\"../download/\">download</a></li>
218 <li><a href=\"../documentation/\">documentation</a></li>
219 <li><a href=\"../contact/\">contact</a></li>
220 <li><a href=\"../samples/\">samples</a></li>
221 </ul>
222 </div>
223
224 <div id=\"content\">
225 <h1>API Reference Manual</h1>
226 <p>Here we provided a function by function reference for the low-level C API to giza.
227 <br/>The giza API is <strong>stable</strong>.
228 From version 1.0 we aim to keep backwards compatibility, although new functionality may be added</p>
229 <h1>Index</h1>
230 <dl class=\"toc\">");
231 # Then the index
232 $fh->print ("<dt><a href=\"#Device_management\">Device Management</a></dt>\n");
233 foreach (@IDevice)
234 {
235 $fh->print ("<dd><a href=\"#$_\">$_</a></dd>\n");
236 }
237
238 $fh->print ("<dt><a href=\"#Drawing\">Drawing</a></dt>\n");
239 foreach (@IDrawing)
240 {
241 $fh->print ("<dd><a href=\"#$_\">$_</a></dd>\n");
242 }
243
244 $fh->print ("<dt><a href=\"#Text\">Text</a></dt>\n");
245 foreach (@IText)
246 {
247 $fh->print ("<dd><a href=\"#$_\">$_</a></dd>\n");
248 }
249
250 $fh->print ("<dt><a href=\"#Settings\">Settings</a></dt>\n");
251 foreach (@ISettings)
252 {
253 $fh->print ("<dd><a href=\"#$_\">$_</a></dd>\n");
254 }
255 $fh->print ("<dt><a href=\"#Interactive\">Interactive</a></dt>\n");
256 foreach (@IInteractive)
257 {
258 $fh->print ("<dd><a href=\"#$_\">$_</a></dd>\n");
259 }
260 $fh->print ("</dl>");
261
262 # Write descriptions for Device Management
263 $fh->print ("<a name=\"Device_managment\"></a><h1>Device Managment</h1>\n");
264 foreach (@Device)
265 {
266 $fh->print ("$_");
267 }
268
269 # Write descriptions for Drawing
270 $fh->print ("<a name=\"Drawing\"></a><h1>Drawing</h1>\n");
271 foreach (@Drawing)
272 {
273 $fh->print ("$_");
274 }
275
276 # Write descriptions for Text
277 $fh->print ("<a name=\"Text\"></a><h1>Text</h1>\n");
278 foreach (@Text)
279 {
280 $fh->print ("$_");
281 }
282
283 # Write descriptions for Settings
284 $fh->print ("<a name=\"Settings\"></a><h1>Settings</h1>\n");
285 foreach (@Settings)
286 {
287 $fh->print ("$_");
288 }
289
290 # Write descriptions for Interactive
291 $fh->print ("<a name=\"Interactive\"></a><h1>Interactive</h1>\n");
292 foreach (@Interactive)
293 {
294 $fh->print ("$_");
295 }
296
297 # Close the files
298 $fh->flush ();
299 $fh->close ();
0 #!/usr/bin/perl
1 #
2 # This script parses the giza-pgplot.f90 file
3 # to produce html documentation of the current
4 # status of the PGPLOT interface to giza
5 # (that can be built as libpgplot)
6 #
7 open(FILE, "<../src/giza-cpgplot.c");
8 my $module;
9 my $desc;
10 my $link;
11 my $status;
12 my $ntot = 0;
13 my $ndone = 0;
14 my $npar = 0;
15 print STDOUT "<table>\n";
16 while (<FILE>) {
17 if ( m/(^.*cpg)/)
18 {
19 ($module,$desc) = m/^.*(cpg.*) -- (.*)/;
20 ($link) = m/^.*c(pg.*) --/;
21 print STDOUT "<tr><td><a href=\"http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#$link\">$module</a></td>";
22 }
23 elsif ( m/(^.*Status:)/)
24 {
25 ($status) = m/^.*Status: (.*)/;
26 $_ = $status;
27 my $color = "#FF6600"; # default is orange
28 if ( m/.*(NOT).*/ )
29 {
30 $color = "#FF0000"; # red
31 }
32 elsif ( m/^IMPLEMENTED$/ )
33 {
34 $color = "#009900"; # green
35 $ndone = $ndone + 1;
36 $npar = $npar + 1;
37 }
38 else
39 {
40 $npar = $npar + 1;
41 }
42 $ntot = $ntot + 1;
43 print STDOUT "<td bgcolor=$color>$status</td><td>$desc</td></tr>\n";
44 }
45 }
46 print STDOUT "</table>\n";
47 print STDOUT "<p>$npar of $ntot routines implemented, $ndone of $ntot fully implemented.</p>\n";
0 #!/bin/bash
1 destdir=../docs/documentation
2 ./pgplot_status.pl > $destdir/pgplot-status.html;
3 ./cpgplot_status.pl > $destdir/cpgplot-status.html;
4 ./api.pl ../src/*.c;
5 mv api.html $destdir;
6 cd $destdir;
7 cat pgplot-header.html > pgplot.html
8 cat >> pgplot.html << EOF
9 <div id="content">
10 <h2><a name="libpgplot"></a>Current status (libpgplot):</h2>
11 EOF
12 cat pgplot-status.html >> pgplot.html
13 cat >> pgplot.html << EOF
14 </div>
15 EOF
16 cat >> pgplot.html << EOF
17 <div id="content">
18 <h2><a name="libcpgplot"></a>Current status (libcpgplot):</h2>
19 EOF
20 cat cpgplot-status.html >> pgplot.html
21 cat >> pgplot.html << EOF
22 </div>
23 </html>
24 EOF
0 #!/usr/bin/perl
1 #
2 # @(#) Perl script to convert defs in giza-shared.h to Fortran parameters
3 # @(#) Written by Daniel Price, daniel.price@monash.edu
4 #
5 my $var;
6 my $val;
7 open(FILE,"<../src/giza-shared.h");
8 while(<FILE>) {
9 if (m/define\s\S*\s*([0-9]*)/ && !m/GIZA_LEFT_CLICK/) {
10 ($var, $val) = m/define\s(\S*)\s*([0-9]*)/;
11 my $lvar = lc($var); #sprintf("%-27s",lc($var));
12 print " integer, parameter, public :: $lvar = $var\n";
13 }
14 }
0 #!/usr/bin/perl
1 #
2 # @(#) Perl script to get current source files for Makefile
3 #
4 # @(#) (c) Daniel Price, Jan 2011, daniel.price@monash.edu
5 #
6 use Text::Wrap;
7
8 $Text::Wrap::columns=80;
9 $Text::Wrap::separator=" \\\n";
10 #print wrap('PHEADERS= ',' ',@ARGV);
11 print wrap('SOURCE= ',' ',@ARGV);
12 print "\n";
0 #!/usr/bin/perl
1 #
2 # This script parses the giza-pgplot.f90 file
3 # to produce html documentation of the current
4 # status of the PGPLOT interface to giza
5 # (that can be built as libpgplot)
6 #
7 open(FILE, "<../src/giza-pgplot.f90");
8 my $module;
9 my $desc;
10 my $status;
11 my $ntot = 0;
12 my $ndone = 0;
13 my $npar = 0;
14 print STDOUT "<table>\n";
15 while (<FILE>) {
16 if ( m/(^.*Module:)/)
17 {
18 ($module,$desc) = m/^.*Module: (.*) -- (.*)/;
19 print STDOUT "<tr><td><a href=\"http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#$module\">$module</a></td>";
20 }
21 elsif ( m/(^.*Status:)/)
22 {
23 ($status) = m/^.*Status: (.*)/;
24 $_ = $status;
25 my $color = "#FF6600"; # default is orange
26 if ( m/.*(NOT).*/ )
27 {
28 $color = "#FF0000"; # red
29 }
30 elsif ( m/^IMPLEMENTED$/ )
31 {
32 $color = "#009900"; # green
33 $ndone = $ndone + 1;
34 $npar = $npar + 1;
35 }
36 else
37 {
38 $npar = $npar + 1;
39 }
40 $ntot = $ntot + 1;
41 print STDOUT "<td bgcolor=$color>$status</td><td>$desc</td></tr>\n";
42 }
43 }
44 print STDOUT "</table>\n";
45 print STDOUT "<p>$npar of $ntot routines implemented, $ndone of $ntot fully implemented.</p>\n";
33
44 lib_LTLIBRARIES = libgiza.la libcpgplot.la libpgplot.la
55
6 libgiza_la_SOURCES = giza-annotate.c giza-arrow-style.c giza-arrow.c \
6 libgiza_la_SOURCES = giza-annotate.c giza-arrow-style.c giza-arrow.c giza-axis.c \
77 giza-band-style.c giza-band.c giza-box-time.c giza-box.c \
88 giza-buffering.c giza-character-size.c giza-circle.c \
99 giza-clipping.c giza-colour-bar.c giza-colour-index.c \
2020 giza-paper.c giza-points.c giza-polygon.c giza-print-id.c \
2121 giza-prompting.c giza-ptext.c giza-qtext.c giza-rectangle.c \
2222 giza-render.c giza-save.c giza-set-font.c giza-stroke.c \
23 giza-subpanel.c giza-text-background.c giza-text.c \
23 giza-subpanel.c giza-text-background.c giza-text.c giza-tick.c \
2424 giza-transforms.c giza-vector.c giza-viewport.c giza-version.c \
2525 giza-warnings.c giza-window.c giza.c lex.yy.c \
2626 giza-arrow-style-private.h giza-driver-svg-private.h giza-stroke-private.h \
2727 giza-band-private.h giza-driver-xw-private.h giza-subpanel-private.h \
2828 giza-character-size-private.h giza-drivers-private.h giza-text-background-private.h \
2929 giza-colour-private.h giza-fill-private.h giza-text-private.h \
30 giza-cursor-private.h giza-io-private.h giza-transforms-private.h \
30 giza-cursor-private.h giza-io-private.h giza-tick-private.h giza-transforms-private.h \
3131 giza-driver-eps-private.h giza-line-style-private.h giza-version.h \
3232 giza-driver-null-private.h giza-private.h giza-viewport-private.h \
3333 giza-driver-pdf-private.h giza-render-private.h giza-warnings-private.h \
146146 libgiza_la_LIBADD =
147147 am_libgiza_la_OBJECTS = libgiza_la-giza-annotate.lo \
148148 libgiza_la-giza-arrow-style.lo libgiza_la-giza-arrow.lo \
149 libgiza_la-giza-band-style.lo libgiza_la-giza-band.lo \
150 libgiza_la-giza-box-time.lo libgiza_la-giza-box.lo \
151 libgiza_la-giza-buffering.lo libgiza_la-giza-character-size.lo \
152 libgiza_la-giza-circle.lo libgiza_la-giza-clipping.lo \
153 libgiza_la-giza-colour-bar.lo libgiza_la-giza-colour-index.lo \
149 libgiza_la-giza-axis.lo libgiza_la-giza-band-style.lo \
150 libgiza_la-giza-band.lo libgiza_la-giza-box-time.lo \
151 libgiza_la-giza-box.lo libgiza_la-giza-buffering.lo \
152 libgiza_la-giza-character-size.lo libgiza_la-giza-circle.lo \
153 libgiza_la-giza-clipping.lo libgiza_la-giza-colour-bar.lo \
154 libgiza_la-giza-colour-index.lo \
154155 libgiza_la-giza-colour-palette.lo \
155156 libgiza_la-giza-colour-table.lo libgiza_la-giza-contour.lo \
156157 libgiza_la-giza-cursor-routines.lo \
176177 libgiza_la-giza-save.lo libgiza_la-giza-set-font.lo \
177178 libgiza_la-giza-stroke.lo libgiza_la-giza-subpanel.lo \
178179 libgiza_la-giza-text-background.lo libgiza_la-giza-text.lo \
179 libgiza_la-giza-transforms.lo libgiza_la-giza-vector.lo \
180 libgiza_la-giza-viewport.lo libgiza_la-giza-version.lo \
181 libgiza_la-giza-warnings.lo libgiza_la-giza-window.lo \
182 libgiza_la-giza.lo libgiza_la-lex.yy.lo
180 libgiza_la-giza-tick.lo libgiza_la-giza-transforms.lo \
181 libgiza_la-giza-vector.lo libgiza_la-giza-viewport.lo \
182 libgiza_la-giza-version.lo libgiza_la-giza-warnings.lo \
183 libgiza_la-giza-window.lo libgiza_la-giza.lo \
184 libgiza_la-lex.yy.lo
183185 libgiza_la_OBJECTS = $(am_libgiza_la_OBJECTS)
184186 libgiza_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
185187 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
209211 ./$(DEPDIR)/libgiza_la-giza-annotate.Plo \
210212 ./$(DEPDIR)/libgiza_la-giza-arrow-style.Plo \
211213 ./$(DEPDIR)/libgiza_la-giza-arrow.Plo \
214 ./$(DEPDIR)/libgiza_la-giza-axis.Plo \
212215 ./$(DEPDIR)/libgiza_la-giza-band-style.Plo \
213216 ./$(DEPDIR)/libgiza_la-giza-band.Plo \
214217 ./$(DEPDIR)/libgiza_la-giza-box-time.Plo \
266269 ./$(DEPDIR)/libgiza_la-giza-subpanel.Plo \
267270 ./$(DEPDIR)/libgiza_la-giza-text-background.Plo \
268271 ./$(DEPDIR)/libgiza_la-giza-text.Plo \
272 ./$(DEPDIR)/libgiza_la-giza-tick.Plo \
269273 ./$(DEPDIR)/libgiza_la-giza-transforms.Plo \
270274 ./$(DEPDIR)/libgiza_la-giza-vector.Plo \
271275 ./$(DEPDIR)/libgiza_la-giza-version.Plo \
490494 top_srcdir = @top_srcdir@
491495 CLEANFILES = *.mod *.pc
492496 lib_LTLIBRARIES = libgiza.la libcpgplot.la libpgplot.la
493 libgiza_la_SOURCES = giza-annotate.c giza-arrow-style.c giza-arrow.c \
497 libgiza_la_SOURCES = giza-annotate.c giza-arrow-style.c giza-arrow.c giza-axis.c \
494498 giza-band-style.c giza-band.c giza-box-time.c giza-box.c \
495499 giza-buffering.c giza-character-size.c giza-circle.c \
496500 giza-clipping.c giza-colour-bar.c giza-colour-index.c \
507511 giza-paper.c giza-points.c giza-polygon.c giza-print-id.c \
508512 giza-prompting.c giza-ptext.c giza-qtext.c giza-rectangle.c \
509513 giza-render.c giza-save.c giza-set-font.c giza-stroke.c \
510 giza-subpanel.c giza-text-background.c giza-text.c \
514 giza-subpanel.c giza-text-background.c giza-text.c giza-tick.c \
511515 giza-transforms.c giza-vector.c giza-viewport.c giza-version.c \
512516 giza-warnings.c giza-window.c giza.c lex.yy.c \
513517 giza-arrow-style-private.h giza-driver-svg-private.h giza-stroke-private.h \
514518 giza-band-private.h giza-driver-xw-private.h giza-subpanel-private.h \
515519 giza-character-size-private.h giza-drivers-private.h giza-text-background-private.h \
516520 giza-colour-private.h giza-fill-private.h giza-text-private.h \
517 giza-cursor-private.h giza-io-private.h giza-transforms-private.h \
521 giza-cursor-private.h giza-io-private.h giza-tick-private.h giza-transforms-private.h \
518522 giza-driver-eps-private.h giza-line-style-private.h giza-version.h \
519523 giza-driver-null-private.h giza-private.h giza-viewport-private.h \
520524 giza-driver-pdf-private.h giza-render-private.h giza-warnings-private.h \
632636 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-annotate.Plo@am__quote@ # am--include-marker
633637 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-arrow-style.Plo@am__quote@ # am--include-marker
634638 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-arrow.Plo@am__quote@ # am--include-marker
639 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-axis.Plo@am__quote@ # am--include-marker
635640 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-band-style.Plo@am__quote@ # am--include-marker
636641 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-band.Plo@am__quote@ # am--include-marker
637642 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-box-time.Plo@am__quote@ # am--include-marker
689694 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-subpanel.Plo@am__quote@ # am--include-marker
690695 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-text-background.Plo@am__quote@ # am--include-marker
691696 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-text.Plo@am__quote@ # am--include-marker
697 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-tick.Plo@am__quote@ # am--include-marker
692698 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-transforms.Plo@am__quote@ # am--include-marker
693699 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-vector.Plo@am__quote@ # am--include-marker
694700 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-version.Plo@am__quote@ # am--include-marker
765771 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
766772 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgiza_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgiza_la-giza-arrow.lo `test -f 'giza-arrow.c' || echo '$(srcdir)/'`giza-arrow.c
767773
774 libgiza_la-giza-axis.lo: giza-axis.c
775 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgiza_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgiza_la-giza-axis.lo -MD -MP -MF $(DEPDIR)/libgiza_la-giza-axis.Tpo -c -o libgiza_la-giza-axis.lo `test -f 'giza-axis.c' || echo '$(srcdir)/'`giza-axis.c
776 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgiza_la-giza-axis.Tpo $(DEPDIR)/libgiza_la-giza-axis.Plo
777 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='giza-axis.c' object='libgiza_la-giza-axis.lo' libtool=yes @AMDEPBACKSLASH@
778 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
779 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgiza_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgiza_la-giza-axis.lo `test -f 'giza-axis.c' || echo '$(srcdir)/'`giza-axis.c
780
768781 libgiza_la-giza-band-style.lo: giza-band-style.c
769782 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgiza_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgiza_la-giza-band-style.lo -MD -MP -MF $(DEPDIR)/libgiza_la-giza-band-style.Tpo -c -o libgiza_la-giza-band-style.lo `test -f 'giza-band-style.c' || echo '$(srcdir)/'`giza-band-style.c
770783 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgiza_la-giza-band-style.Tpo $(DEPDIR)/libgiza_la-giza-band-style.Plo
11631176 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='giza-text.c' object='libgiza_la-giza-text.lo' libtool=yes @AMDEPBACKSLASH@
11641177 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
11651178 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgiza_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgiza_la-giza-text.lo `test -f 'giza-text.c' || echo '$(srcdir)/'`giza-text.c
1179
1180 libgiza_la-giza-tick.lo: giza-tick.c
1181 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgiza_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgiza_la-giza-tick.lo -MD -MP -MF $(DEPDIR)/libgiza_la-giza-tick.Tpo -c -o libgiza_la-giza-tick.lo `test -f 'giza-tick.c' || echo '$(srcdir)/'`giza-tick.c
1182 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgiza_la-giza-tick.Tpo $(DEPDIR)/libgiza_la-giza-tick.Plo
1183 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='giza-tick.c' object='libgiza_la-giza-tick.lo' libtool=yes @AMDEPBACKSLASH@
1184 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1185 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgiza_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libgiza_la-giza-tick.lo `test -f 'giza-tick.c' || echo '$(srcdir)/'`giza-tick.c
11661186
11671187 libgiza_la-giza-transforms.lo: giza-transforms.c
11681188 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgiza_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libgiza_la-giza-transforms.lo -MD -MP -MF $(DEPDIR)/libgiza_la-giza-transforms.Tpo -c -o libgiza_la-giza-transforms.lo `test -f 'giza-transforms.c' || echo '$(srcdir)/'`giza-transforms.c
14311451 -rm -f ./$(DEPDIR)/libgiza_la-giza-annotate.Plo
14321452 -rm -f ./$(DEPDIR)/libgiza_la-giza-arrow-style.Plo
14331453 -rm -f ./$(DEPDIR)/libgiza_la-giza-arrow.Plo
1454 -rm -f ./$(DEPDIR)/libgiza_la-giza-axis.Plo
14341455 -rm -f ./$(DEPDIR)/libgiza_la-giza-band-style.Plo
14351456 -rm -f ./$(DEPDIR)/libgiza_la-giza-band.Plo
14361457 -rm -f ./$(DEPDIR)/libgiza_la-giza-box-time.Plo
14881509 -rm -f ./$(DEPDIR)/libgiza_la-giza-subpanel.Plo
14891510 -rm -f ./$(DEPDIR)/libgiza_la-giza-text-background.Plo
14901511 -rm -f ./$(DEPDIR)/libgiza_la-giza-text.Plo
1512 -rm -f ./$(DEPDIR)/libgiza_la-giza-tick.Plo
14911513 -rm -f ./$(DEPDIR)/libgiza_la-giza-transforms.Plo
14921514 -rm -f ./$(DEPDIR)/libgiza_la-giza-vector.Plo
14931515 -rm -f ./$(DEPDIR)/libgiza_la-giza-version.Plo
15461568 -rm -f ./$(DEPDIR)/libgiza_la-giza-annotate.Plo
15471569 -rm -f ./$(DEPDIR)/libgiza_la-giza-arrow-style.Plo
15481570 -rm -f ./$(DEPDIR)/libgiza_la-giza-arrow.Plo
1571 -rm -f ./$(DEPDIR)/libgiza_la-giza-axis.Plo
15491572 -rm -f ./$(DEPDIR)/libgiza_la-giza-band-style.Plo
15501573 -rm -f ./$(DEPDIR)/libgiza_la-giza-band.Plo
15511574 -rm -f ./$(DEPDIR)/libgiza_la-giza-box-time.Plo
16031626 -rm -f ./$(DEPDIR)/libgiza_la-giza-subpanel.Plo
16041627 -rm -f ./$(DEPDIR)/libgiza_la-giza-text-background.Plo
16051628 -rm -f ./$(DEPDIR)/libgiza_la-giza-text.Plo
1629 -rm -f ./$(DEPDIR)/libgiza_la-giza-tick.Plo
16061630 -rm -f ./$(DEPDIR)/libgiza_la-giza-transforms.Plo
16071631 -rm -f ./$(DEPDIR)/libgiza_la-giza-vector.Plo
16081632 -rm -f ./$(DEPDIR)/libgiza_la-giza-version.Plo
3636 * by giza_set_arrow_style.
3737 *
3838 * Input:
39 * -x1 :- The world x-coord of the tail of the arrow.
40 * -y1 :- The world y-coord of the tail of the arrow.
41 * -x2 :- The world x-coord of the head of the arrow.
42 * -y2 :- The world y-coord of the head of the arrow.
39 * -x1 :- The world x-coord of the tail of the arrow
40 * -y1 :- The world y-coord of the tail of the arrow
41 * -x2 :- The world x-coord of the head of the arrow
42 * -y2 :- The world y-coord of the head of the arrow
4343 *
44 * See Also: giza_set_arrow_style
44 * See Also: giza_set_arrow_style, giza_arrow_float
4545 */
4646 void
4747 giza_arrow (double x1, double y1, double x2, double y2)
101101 dxPerp = dxPerp / magnitude;
102102 dyPerp = dyPerp / magnitude;
103103 }
104
104
105105 if (magnitude > 0)
106106 {
107107 dx = dx/magnitude;
119119 xpts[0] = x2;
120120 ypts[0] = y2;
121121
122 /* 'above' the unit vector
122 /* 'above' the unit vector
123123 * Note that we want the hypoteneuse of the arrow head
124124 * to always have same length regardless of the angle:
125125 * |\
126126 * b | \ r
127 * | \
127 * | \
128128 * -----| \
129129 * hence we use sin(angle) = b/r, with r=1 to get b.
130130 */
173173 *
174174 * Synopsis: Same functionality as giza_arrow.
175175 *
176 * See Also: giza_arrow_float
176 * See Also: giza_arrow, giza_set_arrow_style
177177 */
178178 void
179179 giza_arrow_float (float x1, float y1, float x2, float y2)
0 /* giza - a scientific plotting library built on cairo
1 *
2 * Copyright (c) 2010 James Wetter and Daniel Price
3 * Copyright (c) 2010-2022 Daniel Price
4 *
5 * This library is free software; and you are welcome to redistribute
6 * it under the terms of the GNU General Public License
7 * (GPL, see LICENSE file for details) and the provision that
8 * this notice remains intact. If you modify this file, please
9 * note section 2a) of the GPLv2 states that:
10 *
11 * a) You must cause the modified files to carry prominent notices
12 * stating that you changed the files and the date of any change.
13 *
14 * This software is distributed "AS IS", with ABSOLUTELY NO WARRANTY.
15 * See the GPL for specific language governing rights and limitations.
16 *
17 * The Original code is the giza plotting library.
18 *
19 * Contributor(s):
20 * James Wetter <wetter.j@gmail.com>
21 * Daniel Price <daniel.price@monash.edu> (main contact)
22 */
23
24 #include "giza-private.h"
25 #include "giza-transforms-private.h"
26 #include "giza-io-private.h"
27 #include "giza-stroke-private.h"
28 #include "giza-window-private.h"
29 #include "giza-viewport-private.h"
30 #include "giza-drivers-private.h"
31 #include "giza-tick-private.h"
32 #include <giza.h>
33 #include <math.h>
34 #include <stdio.h>
35
36 /**
37 * Drawing: giza_axis
38 *
39 * Synopsis: Draw a labelled axis from (x1,y1) to (x2,y2)
40 *
41 * Input:
42 * -opt :- String of options for the axis.
43 * The options may be in any order. See
44 * below for details
45 * -x1 :- starting x position in world coordinates
46 * -y1 :- starting y position in world coordinates
47 * -x2 :- finishing x position in world coordinates
48 * -y2 :- finishing y position in world coordinates
49 * -v1 :- axis value at starting position
50 * -v2 :- axis value at finishing position
51 * -tick :- The distance, in world coordinates,
52 * between major ticks on the axis.
53 * If 0.0 the interval is chosen
54 * automatically.
55 * -nsub :- The number of minor ticks to be placed
56 * between each major tick. If 0 the
57 * number is chosen automatically. Ignored if log axis.
58 * -dmajl :- Length of major tick marks drawn to "left/bottom" of axis
59 * in units of character height
60 * -dmajr :- Length of major tick marks drawn to "right/top" of axis
61 * in units of character height
62 * -fmin :- Length of minor tick marks as fraction of major
63 * -disp :- Displacement of labels from axis
64 * in units of character height
65 * -angle :- Label orientation; angle between text and direction of axis; in degrees
66 *
67 * Options:
68 * -T :- Draw major ticks.
69 * -S :- Draw minor ticks.
70 * -N :- Label the axis
71 * -L :- Label axis logarithmically
72 * -H :- Hide the axis (draw ticks only)
73 * -I :- 'Invert' tick marks, draw them on opposite side
74 * -1 :- Force decimal labelling instead of automatic choice (see giza_format_number)
75 * -2 :- Force exponential labelling instead of automatic choice (see giza_format_number)
76 *
77 * See Also: giza_axis_float, giza_box, giza_tick, giza_box_time
78 *
79 */
80 void
81 giza_axis (const char *opt, double x1, double y1, double x2, double y2,
82 double v1, double v2, double tick, int nsub,
83 double dmajl, double dmajr, double fmin, double disp, double angle)
84 {
85 if (!_giza_check_device_ready ("giza_axis"))
86 return;
87
88 _giza_expand_clipping ();
89
90 int oldBuf;
91 giza_get_buffering(&oldBuf);
92
93 /* Table of log10() values for log axis ticks */
94 double logTab[9];
95 int k;
96 for (k = 0; k < 9; k++)
97 {
98 logTab[k] = log10 (k + 1);
99 }
100
101 /* Begin buffering */
102 giza_begin_buffer ();
103
104 int draw_majticks = 0, draw_minticks = 0, draw_labels = 0,
105 draw_log = 0, draw_invert = -1, draw_axis = 1;
106
107 int number_format = Dev[id].number_format;
108
109 double intervalMaj, intervalMin, val, ratio;
110 int nv, np;
111 int nMinTicks, major;
112 double majTickL_l, subTickL_l, currentTickL_l;
113 double majTickL_r, subTickL_r, currentTickL_r;
114 char tmp[100];
115 int i, i1, i2, j, jmax, jtmp;
116 double x,y,theta,theta_deg,dr;
117
118 /* set x-options */
119 for (i = 0; opt[i]; i++)
120 {
121 switch (opt[i])
122 {
123 case ('h'):
124 case ('H'):
125 draw_axis = 0;
126 break;
127 case ('t'):
128 case ('T'):
129 draw_majticks = 1;
130 break;
131 case ('s'):
132 case ('S'):
133 draw_minticks = 1;
134 break;
135 /* Any of nmNM means labels need to be drawn. mM says to do so unconventionally. */
136 case ('n'):
137 case ('N'):
138 draw_labels = 1;
139 break;
140 case ('l'):
141 case ('L'):
142 draw_log = 1;
143 break;
144 case ('i'):
145 case ('I'):
146 draw_invert = 1;
147 break;
148 case ('1'):
149 number_format = GIZA_NUMBER_FORMAT_DEC;
150 break;
151 case ('2'):
152 number_format = GIZA_NUMBER_FORMAT_EXP;
153 break;
154 default:
155 break;
156 }
157 }
158
159 int oldTrans = _giza_get_trans ();
160 _giza_set_trans (GIZA_TRANS_WORLD);
161
162 /* get the angle to rotate in viewport coordinates */
163 theta = atan2(y2-y1,x2-x1);
164 theta_deg = theta / GIZA_DEG_TO_RAD;
165 dr = sqrt(pow(x2-x1,2) + pow(y2-y1,2));
166
167 cairo_matrix_t mat;
168 cairo_matrix_init_translate(&mat,x1,y1);
169 cairo_matrix_rotate(&mat,theta);
170
171 double xch, ych;
172 giza_get_character_size (GIZA_UNITS_WORLD, &xch, &ych);
173
174 /* draw the line */
175 if (draw_axis)
176 {
177 cairo_move_to (Dev[id].context, x1, y1);
178 cairo_line_to (Dev[id].context, x2, y2);
179 }
180
181 /* set major tick length in pixels */
182 majTickL_l = Dev[id].fontExtents.max_x_advance * dmajl;
183 majTickL_r = Dev[id].fontExtents.max_x_advance * dmajr;
184 subTickL_l = 0.;
185 subTickL_r = 0.;
186
187 /* convert to world coords */
188 cairo_device_to_user_distance (Dev[id].context, &subTickL_l, &majTickL_l);
189 cairo_device_to_user_distance (Dev[id].context, &subTickL_r, &majTickL_r);
190 majTickL_l = -majTickL_l;
191 majTickL_r = -majTickL_r;
192
193 /* set minor tick length as a fraction of the major tick length */
194 subTickL_l = majTickL_l * fmin;
195 subTickL_r = majTickL_r * fmin;
196
197 /* Choose x tick intervals */
198 if (draw_log)
199 {
200 nMinTicks = 1;
201 intervalMaj = 1.;
202 }
203 else if (_giza_equal(tick,0.))
204 {
205 intervalMaj = 7. * Dev[id].fontExtents.max_x_advance /
206 ((Dev[id].VP.xmax - Dev[id].VP.xmin)*Dev[id].width);
207 if (intervalMaj > 0.2)
208 intervalMaj = 0.2;
209 if (intervalMaj < 0.05)
210 intervalMaj = 0.05;
211 intervalMaj = intervalMaj * (v2 - v1);
212 intervalMaj = giza_round (intervalMaj, &nMinTicks);
213 }
214 else
215 {
216 intervalMaj = tick;
217 nMinTicks = nsub;
218 if (nsub < 1 || !draw_minticks) nMinTicks = 1;
219 }
220 intervalMin = intervalMaj / (double) nMinTicks;
221
222 /* Only enter tick drawing if (1) any of the ticks/grid must be drawn AND
223 (2) at least one of top, bottom or axis must be drawn because the ticks
224 can only be drawn on any/all of these lines */
225 if (draw_majticks || draw_minticks)
226 {
227 _giza_tick_intervals (v1, v2, intervalMin, &i1, &i2);
228 jmax = 0;
229 /* If log axis ticks always have 9 minor ticks */
230 if (draw_log) jmax = 8;
231
232 for (i = i1; i <= i2; i++)
233 {
234 for (j = 0; j <= jmax; j++)
235 {
236 /* log axis ticks are major when j = 0 */
237 major = (i % nMinTicks == 0) && draw_majticks && (j == 0);
238 currentTickL_l = subTickL_l;
239 currentTickL_r = subTickL_r;
240 if (major)
241 {
242 currentTickL_l = majTickL_l;
243 currentTickL_r = majTickL_r;
244 }
245 val = (i + logTab[j]) * intervalMin;
246 ratio = (val - v1) / (v2 - v1);
247
248 /* don't draw outside the box */
249 if ((val >= v2) || (val <= v1))
250 continue;
251 /* are we supposed to draw this tick anyway? */
252 if ( !((major && draw_majticks) || draw_minticks) )
253 continue;
254
255 /* draw tick, rotate as necessary */
256 _giza_draw_tick(mat,ratio,dr,currentTickL_l,currentTickL_r);
257
258 }
259 }
260 _giza_stroke ();
261 }
262
263 /* labels */
264 if (draw_labels)
265 {
266 _giza_tick_intervals (v1, v2, intervalMaj, &i1, &i2);
267 np = (int) floor (log10 (fabs (intervalMaj)));
268 nv = _giza_nint (intervalMaj/pow (10., np));
269
270 for (i = i1; i <= i2; i++)
271 {
272 val = i * intervalMaj;
273 ratio = (val - v1) / (v2 - v1);
274 /* don't draw label if outside frame */
275 if (ratio < 0. || ratio > 1.)
276 continue;
277 if (draw_log)
278 {
279 jtmp = _giza_nint(val);
280 if (jtmp == 1) {
281 sprintf (tmp, "10");
282 } else if (jtmp == 0) {
283 sprintf (tmp, "1");
284 } else {
285 sprintf (tmp, "10^{%i}", jtmp);
286 }
287 }
288 else
289 {
290 giza_format_number (i*nv, np, number_format, tmp, sizeof(tmp));
291 }
292
293 /* write the label */
294 x = dr * ratio;
295 y = ych * disp;
296 cairo_matrix_transform_point (&mat,&x,&y);
297 giza_ptext (x, y, theta_deg + angle, 0.5, tmp);
298
299 }
300 _giza_stroke ();
301 }
302
303 /* extra labels for log axis */
304 if (draw_labels && draw_log && (v2 - v1 < 2.))
305 {
306 _giza_tick_intervals (v1, v2, intervalMin, &i1, &i2);
307 for (i = i1 - 1; i <= i2; i++)
308 {
309 for (j = 1; j <= 4; j += 3)
310 {
311 val = (i + logTab[j]) * intervalMin;
312 if (val <= v2 && val >= v1)
313 {
314 ratio = (val - v1) / (v2 - v1);
315 val = pow (10, val);
316 giza_format_number (j+1, _giza_nint (i * intervalMin), number_format, tmp, sizeof(tmp));
317
318 /* write the label */
319 x = dr * ratio;
320 y = ych * disp;
321 cairo_matrix_transform_point (&mat,&x,&y);
322 giza_ptext (x, y, theta_deg + angle, 0.5, tmp);
323 }
324 }
325 }
326 }
327
328 /* stroke all the paths */
329 int lc;
330 giza_get_line_cap (&lc);
331 giza_set_line_cap (CAIRO_LINE_CAP_SQUARE);
332 _giza_stroke ();
333 giza_set_line_cap (lc);
334 _giza_set_trans (oldTrans);
335
336 /* end buffer if it was not on before this function call */
337 if (!oldBuf)
338 {
339 giza_end_buffer ();
340 }
341
342 giza_flush_device ();
343
344 /* Restore clipping */
345 giza_set_viewport (Dev[id].VP.xmin, Dev[id].VP.xmax, Dev[id].VP.ymin, Dev[id].VP.ymax);
346 }
347
348 /**
349 * Drawing: giza_axis_float
350 *
351 * Synopsis: Same functionality as giza_axis but takes floats instead of doubles.
352 *
353 * See Also: giza_axis
354 */
355 void
356 giza_axis_float (const char *opt, float x1, float y1, float x2, float y2,
357 float v1, float v2, float step, int nsub,
358 float dmajl, float dmajr, float fmin, float disp, float angle)
359 {
360 if (!_giza_check_device_ready ("giza_axis"))
361 return;
362
363 giza_axis(opt, (double) x1, (double) y1, (double) x2, (double) y2,
364 (double) v1, (double) v2, (double) step, nsub,
365 (double) dmajl, (double) dmajr, (double) fmin, (double) disp, (double) angle);
366
367 }
4444 * if 0 the cursor is not moved.
4545 * -xanc :- the x-coord of the anchor point.
4646 * -yanc :- the y-coord of the anchor point.
47 * -x :- Gets set the position of the cursor.
48 * -y :- Gets set to the position of the cursor.
47 * -x :- Gets set to the x position of the cursor.
48 * -y :- Gets set to the y position of the cursor.
4949 * -ch :- Gets set to the character pressed by the user.
5050 *
5151 * Return:
139139 int x1 = xanc[nanc-1];
140140 int y1 = yanc[nanc-1];
141141 int i,j;
142
142
143143 switch (mode)
144144 {
145145 case 1: /* Straight line */
148148 if (j==0) {
149149 cairo_set_source_rgba (Band.box,1.,1.,1.,0.2);
150150 } else {
151 cairo_set_source_rgba (Band.box, 0.6, 0.6, 0.6, 1.0);
151 cairo_set_source_rgba (Band.box, 0.6, 0.6, 0.6, 1.0);
152152 }
153153 cairo_move_to (Band.box, xanc[0], yanc[0]);
154154 for (i=1;i<=nanc-1;i++) {
234234 /* remove the last band */
235235 giza_flush_device ();
236236 }
237
3131 #include "giza.h"
3232 #include <math.h>
3333 #include <stdio.h>
34
35 static void _giza_tick_intervals (double xmin, double xmax, double xinterval,
36 int *i1, int *i2);
3734
3835 /**
3936 * Drawing: giza_box
7572 */
7673 void
7774 giza_box (const char *xopt, double xtick, int nxsub,
78 const char *yopt, double ytick, int nysub)
75 const char *yopt, double ytick, int nysub)
7976 {
8077 if (!_giza_check_device_ready ("giza_box"))
8178 return;
150147 case ('S'):
151148 xdraw_minticks = 1;
152149 break;
153 /* Any of nmNM means labels need to be drawn. mM sais to do so unconventionally. */
150 /* Any of nmNM means labels need to be drawn. mM says to do so unconventionally. */
154151 case ('n'):
155152 case ('m'):
156153 case ('N'):
206203 case ('S'):
207204 ydraw_minticks = 1;
208205 break;
209 /* Any of nmNM means labels need to be drawn. mM sais to do so unconventionally. */
206 /* Any of nmNM means labels need to be drawn. mM says to do so unconventionally. */
210207 case ('n'):
211208 case ('m'):
212209 case ('N'):
241238 /* Note: -P :- extend ("Project") major tick marks outside the box (ignored if
242239 option I is specified).
243240 In this code: invert<0 is default so >0 means option was specified */
244 if( xdraw_invert>0 )
245 xdraw_project = 0;
246 if( ydraw_invert>0 )
247 ydraw_project = 0;
241 if ( xdraw_invert>0 )
242 xdraw_project = 0;
243 if ( ydraw_invert>0 )
244 ydraw_project = 0;
248245
249246 int oldTrans = _giza_get_trans ();
250247 _giza_set_trans (GIZA_TRANS_WORLD);
269266 else if (_giza_equal(xtick,0.))
270267 {
271268 xintervalMaj =
272 7. * Dev[id].fontExtents.max_x_advance /
269 7. * Dev[id].fontExtents.max_x_advance /
273270 ((Dev[id].VP.xmax - Dev[id].VP.xmin)*Dev[id].width);
274271 if (xintervalMaj > 0.2)
275272 xintervalMaj = 0.2;
425422 else if (_giza_equal(ytick,0.))
426423 {
427424 yintervalMaj =
428 7. * Dev[id].fontExtents.max_x_advance /
425 7. * Dev[id].fontExtents.max_x_advance /
429426 ((Dev[id].VP.ymax - Dev[id].VP.ymin) * Dev[id].height);
430427 if (yintervalMaj > 0.2) yintervalMaj = 0.2;
431428 if (yintervalMaj < 0.05) yintervalMaj = 0.05;
524521 giza_format_number (i*nv, np, Dev[id].number_format, tmp, sizeof(tmp));
525522 }
526523
527 if (ylabel_unconventional)
524 if (ylabel_unconventional)
528525 {
529526 if (ydraw_vertical)
530527 giza_annotate ("RV", .7, yratio, 0., tmp);
556553 yval = pow (10, yval);
557554 giza_format_number (j+1, _giza_nint (i*yintervalMin), Dev[id].number_format, tmp, sizeof(tmp));
558555
559 if (ylabel_unconventional)
556 if (ylabel_unconventional)
560557 {
561558 if (ydraw_vertical)
562559 giza_annotate ("RV", .7, yratio, 0., tmp);
657654 /**
658655 * Works out which intervals in which to draw ticks.
659656 */
660 static void
657 void
661658 _giza_tick_intervals (double xmin, double xmax, double xinterval, int *i1,
662659 int *i2)
663660 {
3030 * Settings: giza_set_character_height
3131 *
3232 * Synopsis: Sets the font size in units of character height.
33 * A character height of 1.0 corresponds to 1/37th
34 * of the plotting surface height by default
3335 *
3436 * Input:
3537 * -ch :- the new character height
113115 *
114116 * Input:
115117 * -units :- select the units the result will be returned in.
118 *
119 * Output:
116120 * -width :- will be set to the width of a character.
117121 * -height :- will be set to the height of a character.
118122 *
124124 *
125125 * Synopsis: Same functionality as giza_set_colour_table but takes floats
126126 *
127 * See also: giza_set_colour_table
127 * See Also: giza_set_colour_table
128128 */
129129 int
130130 giza_set_colour_table_float (const float *controlPoints, const float *red, const float *green, const float *blue, int n,
163163 * -green :- Gets set to the green component of the colour at pos.
164164 * -blue :- Gets set to the blue component of the colour at pos.
165165 *
166 * See also: giza_set_colour_table
166 * See Also: giza_set_colour_table
167167 */
168168 void
169169 giza_rgb_from_table (double pos, double *red, double *green, double *blue)
107107
108108 /***************************************************************
109109 * cpgaxis -- draw an axis
110 * Status: NOT IMPLEMENTED
110 * Status: IMPLEMENTED
111111 ***************************************************************/
112112 void cpgaxis(const char *opt, float x1, float y1, float x2, float y2, \
113113 float v1, float v2, float step, int nsub, float dmajl, \
114114 float dmajr, float fmin, float disp, float orient)
115115 {
116
116 giza_axis_float(opt,x1,y1,x2,y2,v1,v2,step,nsub,dmajl,dmajr,fmin,disp,orient);
117117 }
118118
119119 /***************************************************************
500500 * Status: IMPLEMENTED
501501 * Update: In order to prevent memory corruption by
502502 * giza_format_number, assume that '*string_length', on
503 * entry, contains the maximum length of the string
503 * entry, contains the maximum length of the string
504504 * buffer allocated by the caller.
505505 * PGPLOT c-binding does this, perl-PGPLOT5 does this
506506 * and giza's F90 wrapper's been changed to do this
764764 snprintf(giza_version_string, sizeof(giza_version_string), "giza-%s", GIZA_VERSION_STRING);
765765 /* Copy at most *value_length-1 characters into value - note: strncpy(3)
766766 may leave value not-NUL terminated if *value_length < length of giza_version_string.
767 Could have used strlcpy(3) but that is famously absent in glibc on Linux (need -lbsd
767 Could have used strlcpy(3) but that is famously absent in glibc on Linux (need -lbsd
768768 to have it) so we tediously do it by hand */
769769 strncpy(value, giza_version_string, last_char);
770770 }
11551155
11561156 /***************************************************************
11571157 * cpgtick -- draw a single tick mark on an axis
1158 * Status: NOT IMPLEMENTED
1158 * Status: IMPLEMENTED
11591159 ***************************************************************/
11601160 void cpgtick(float x1, float y1, float x2, float y2, float v, \
11611161 float tikl, float tikr, float disp, float orient, const char *str)
11621162 {
1163
1163 giza_tick_float(x1,y1,x2,y2,v,tikl,tikr,disp,orient,str);
11641164 }
11651165
11661166 /***************************************************************
2929 void _giza_change_page_xw (void);
3030 void _giza_close_device_xw (void);
3131 void _giza_expand_clipping_xw (void);
32 void _giza_get_key_press_xw (int mode, int moveCurs, int nanc, const double *xanc, const double *yanch,
32 void _giza_reset_clipping_xw (void);
33 void _giza_get_key_press_xw (int mode, int moveCurs, int nanc, const double *xanc, const double *yanch,
3334 double *x, double *y, char *ch);
3435 int _giza_init_band_xw (void);
3536 int _giza_select_xw(int devid);
376376 XSelectInput (XW[id].display, XW[id].window, ExposureMask | KeyPressMask | ButtonPressMask | PointerMotionMask);
377377
378378 _giza_init_band (mode);
379 _giza_expand_clipping_xw();
379380
380381 while(1) {
381382
417418
418419 _giza_destroy_band (mode);
419420 _giza_flush_xw_event_queue(&event);
421 _giza_reset_clipping_xw();
420422 return;
421423 };
422424
425427 case ButtonPress:
426428 {
427429 *x = event.xbutton.x ;/*- GIZA_XW_MARGIN; */
428 *y = event.xbutton.y ;/*- GIZA_XW_MARGIN; */
430 *y = event.xbutton.y ;/*- GIZA_XW_MARGIN; */
429431 switch(event.xbutton.button) {
430432 case Button1:
431433 if (event.xbutton.state==1) {
458460 }
459461 _giza_destroy_band (mode);
460462 _giza_flush_xw_event_queue(&event);
461 return;
463 _giza_reset_clipping_xw();
464 return;
462465 }
463466 case MotionNotify:
464467 {
466469 while(XCheckWindowEvent(XW[id].display, XW[id].window,
467470 (long)(PointerMotionMask), &event) == True);
468471
472 /* if a callback function is set to do things while the cursor is moving, call it */
473 if (Dev[id].motion_callback != NULL) {
474 double xpt = (double) event.xmotion.x;
475 double ypt = (double) event.xmotion.y;
476 /* make sure the transform is to world coords, because arbitrary drawing
477 can happen in the callback routine, which may change the transform */
478 _giza_set_trans (GIZA_TRANS_WORLD);
479 cairo_device_to_user (Dev[id].context, &xpt, &ypt);
480 Dev[id].motion_callback(&xpt, &ypt, &mode);
481 }
482
469483 _giza_refresh_band (mode, nanc, anchorx, anchory, event.xmotion.x, event.xmotion.y);
470484 _giza_flush_xw_event_queue(&event);
471485 }
528542 cairo_reset_clip (Dev[id].context);
529543 cairo_rectangle (Dev[id].context, 0, 0, XW[id].width, XW[id].height);
530544 cairo_clip (Dev[id].context);
545 }
546
547 /**
548 * Restores clipping of the plotting surface
549 */
550 void
551 _giza_reset_clipping_xw (void)
552 {
553 /* Restore clipping */
554 giza_set_viewport (Dev[id].VP.xmin, Dev[id].VP.xmax, Dev[id].VP.ymin, Dev[id].VP.ymax);
555 _giza_set_trans (GIZA_TRANS_WORLD);
556
531557 }
532558
533559 /**
126126 * -GIZA_UNITS_INCHES :- inches
127127 * Other values cause an error message and are treated as GIZA_UNITS_DEVICE
128128 *
129 * See also: giza_open_device
129 * See Also: giza_open_device
130130 */
131131 int
132132 giza_open_device_size (const char *newDeviceName, const char *newPrefix, double width, double height, int units)
256256 * These routines check for Dev[id].deviceOpen so we must set that */
257257 Dev[id].deviceOpen = 1;
258258 Dev[id].defaultBackgroundAlpha = 1.;
259 Dev[id].motion_callback = NULL;
259260
260261 giza_set_text_background (-1);
261262 giza_start_prompting ();
315316 * Output:
316317 * -devid, as returned by giza_open_device
317318 *
318 * See also: giza_open_device, giza_get_device_id
319 * See Also: giza_open_device, giza_get_device_id
319320 */
320321 void
321322 giza_get_device_id (int *devid)
332333 * Input:
333334 * -devid :- device id, as returned by giza_open_device
334335 *
335 * See also: giza_get_device_id, giza_open_device
336 * See Also: giza_get_device_id, giza_open_device
336337 */
337338 void
338339 giza_select_device (int devid)
396397 * the background. If no other actions have been performed since the device was
397398 * opened or the last call to giza_change_page the call is ignored.
398399 *
399 * See also: giza_subpanel, giza_set_panel
400 * See Also: giza_subpanel, giza_set_panel
400401 */
401402 void
402403 giza_change_page (void)
541542
542543
543544 /**
544 * Device: _giza_close_device_unchecked
545 *
546 * Synopsis: In order to be able to share the cleaning-up code between
545 * In order to be able to share the cleaning-up code between
547546 * giza_close_device() and giza_open_device_size() [when something fails
548547 * during the construction of a new device] the actual cleaning up code
549548 * is put in this internal function.
607606 }
608607
609608 /**
610 * Device: _giza_init_device_struct
611 *
612 * Synopsis: resets the contents of a giza_device_t to a known state:
609 * Resets the contents of a giza_device_t to a known state:
613610 * the whole struct is zeroed out and .type is set to GIZA_DEVICE_IV.
614611 *
615612 * Note: this approach was chosen over having a static/const/global
721718 }
722719 returnval[max_chars] = '\0'; /* make sure string is null-terminated */
723720 return ierr;
721 }
722
723 /**
724 * Device: giza_set_motion_callback
725 *
726 * Synopsis: set a callback function to be called
727 * during cursor movement (e.g. to print things).
728 * Function should be of the form
729 * void func(double *x, double *y)
730 *
731 * Input:
732 * -func :- The subroutine to be called
733 *
734 * See Also: giza_end_motion_callback
735 *
736 */
737 int
738 giza_set_motion_callback (void (*func)(double *x, double *y, int *mode))
739 {
740 if (!_giza_check_device_ready ("giza_set_motion_callback"))
741 return 1;
742
743 /* assign the motion pointer callback */
744 Dev[id].motion_callback = func;
745
746 return 0;
747 }
748
749 /**
750 * Device: giza_end_motion_callback
751 *
752 * Synopsis: Free the motion callback pointer
753 *
754 * See Also: giza_set_motion_callback
755 *
756 */
757 int
758 giza_end_motion_callback (void)
759 {
760 if (!_giza_check_device_ready ("giza_end_motion_callback"))
761 return 1;
762
763 if (Dev[id].motion_callback != NULL)
764 {
765 Dev[id].motion_callback = NULL;
766 return 0;
767 }
768 else
769 {
770 return 1; /* return error if already null */
771 }
772
724773 }
725774
726775 /**
3636 giza_set_arrow_style, &
3737 giza_get_arrow_style, &
3838 giza_annotate, &
39 giza_axis, &
3940 giza_band, &
4041 giza_box, &
4142 giza_box_time, &
7273 giza_close_device, &
7374 giza_close, &
7475 giza_get_key_press, &
76 giza_set_motion_callback, &
77 giza_end_motion_callback, &
7578 giza_device_has_cursor, &
7679 giza_draw, &
7780 giza_draw_background, &
131134 giza_subpanel, &
132135 giza_set_panel, &
133136 giza_get_panel, &
137 giza_tick, &
134138 giza_vector, &
135139 giza_set_viewport_default, &
136140 giza_set_viewport, &
218222 import
219223 real(kind=c_double),intent(in),value :: x1,y1,x2,y2
220224 end subroutine giza_arrow
221
225
222226 subroutine giza_arrow_float(x1,y1,x2,y2) bind(C)
223227 import
224228 real(kind=c_float),intent(in),value :: x1,y1,x2,y2
251255 integer(kind=c_int),intent(out) :: fillStyle
252256 real(kind=c_float) ,intent(out) :: angle,cutback
253257 end subroutine giza_get_arrow_style_float
258 end interface
259
260 interface giza_axis
261 module procedure giza_intern_axis_f2c
262 end interface
263
264 interface giza_axis_c
265 subroutine giza_axis_float_c(opt,x1,y1,x2,y2,v1,v2,&
266 tick,nsub,dmajl,dmajr,fmin,disp,angle) bind(C,name="giza_axis_float")
267 import
268 character(kind=c_char),dimension(*), intent(in) :: opt
269 real(kind=c_float), value, intent(in) :: x1,y1,x2,y2,v1,v2
270 real(kind=c_float), value, intent(in) :: tick,dmajl,dmajr,fmin,disp,angle
271 integer(kind=c_int), value, intent(in) :: nsub
272 end subroutine giza_axis_float_c
273
274 subroutine giza_axis_c(opt,x1,y1,x2,y2,v1,v2,&
275 tick,nsub,dmajl,dmajr,fmin,disp,angle) bind(C,name="giza_axis")
276 import
277 character(kind=c_char),dimension(*), intent(in) :: opt
278 real(kind=c_double), value, intent(in) :: x1,y1,x2,y2,v1,v2
279 real(kind=c_double), value, intent(in) :: tick,dmajl,dmajr,fmin,disp,angle
280 integer(kind=c_int), value, intent(in) :: nsub
281 end subroutine giza_axis_c
282 end interface
283
284 interface giza_tick
285 module procedure giza_intern_tick_f2c
286 end interface
287
288 interface giza_tick_c
289 subroutine giza_tick_float_c(x1,y1,x2,y2,v,&
290 tickl,tickr,disp,angle,label) bind(C,name="giza_tick_float")
291 import
292 real(kind=c_float), value, intent(in) :: x1,y1,x2,y2,v
293 real(kind=c_float), value, intent(in) :: tickl,tickr,disp,angle
294 character(kind=c_char),dimension(*), intent(in) :: label
295 end subroutine giza_tick_float_c
296
297 subroutine giza_tick_c(x1,y1,x2,y2,v,&
298 tickl,tickr,disp,angle,label) bind(C,name="giza_tick")
299 import
300 real(kind=c_double), value, intent(in) :: x1,y1,x2,y2,v
301 real(kind=c_double), value, intent(in) :: tickl,tickr,disp,angle
302 character(kind=c_char),dimension(*), intent(in) :: label
303 end subroutine giza_tick_c
254304 end interface
255305
256306 interface giza_band
276326 interface giza_annotate
277327 module procedure giza_intern_annotate_f2c
278328 end interface
279
329
280330 interface giza_annotate_c
281331 subroutine giza_annotate_c (side,displacement,coord,justification,text) bind(C,name="giza_annotate")
282332 import
283333 character(kind=c_char),dimension(*),intent(in) :: side,text
284334 real(kind=c_double),intent(in),value ::displacement,coord,justification
285335 end subroutine giza_annotate_c
286
336
287337 subroutine giza_annotate_float_c (side,displacement,coord,justification,text) bind(C,name="giza_annotate_float")
288338 import
289339 character(kind=c_char),dimension(*),intent(in) :: side,text
290340 real(kind=c_float),intent(in),value ::displacement,coord,justification
291341 end subroutine giza_annotate_float_c
292342 end interface
293
343
294344 interface giza_box
295345 module procedure giza_intern_box_f2c
296346 end interface
298348 interface giza_box_time
299349 module procedure giza_intern_box_time_f2c
300350 end interface
301
351
302352 interface giza_box_c
303353 subroutine giza_box_float_c(xopt,xtick,nxsub,yopt,ytick,nysub) bind(C,name="giza_box_float")
304354 import
306356 real(kind=c_float), value, intent(in) :: xtick,ytick
307357 integer(kind=c_int), value, intent(in) :: nxsub,nysub
308358 end subroutine giza_box_float_c
309
359
310360 subroutine giza_box_c(xopt,xtick,nxsub,yopt,ytick,nysub) bind(C,name="giza_box")
311361 import
312362 character(kind=c_char),dimension(*), intent(in) :: xopt,yopt
322372 real(kind=c_float), value, intent(in) :: xtick,ytick
323373 integer(kind=c_int), value, intent(in) :: nxsub,nysub
324374 end subroutine giza_box_time_float_c
325
375
326376 subroutine giza_box_time_c(xopt,xtick,nxsub,yopt,ytick,nysub) bind(C,name="giza_box_time")
327377 import
328378 character(kind=c_char),dimension(*), intent(in) :: xopt,yopt
358408 end subroutine giza_circle_float
359409 end interface
360410
361 interface giza_set_character_height
411 interface giza_set_character_height
362412 subroutine giza_set_character_height(ch) bind(C)
363413 import
364414 real(kind=c_double),intent(in),value :: ch
365415 end subroutine giza_set_character_height
366
416
367417 subroutine giza_set_character_height_float(ch) bind(C)
368418 import
369419 real(kind=c_float),intent(in),value :: ch
370420 end subroutine giza_set_character_height_float
371421 end interface
372
422
373423 interface giza_get_character_height
374424 subroutine giza_get_character_height(ch) bind(C)
375425 import
376426 real(kind=c_double),intent(out) :: ch
377427 end subroutine giza_get_character_height
378
428
379429 subroutine giza_get_character_height_float(ch) bind(C)
380430 import
381431 real(kind=c_float),intent(out) :: ch
388438 integer(kind=c_int),intent(in),value :: units
389439 real(kind=c_double),intent(out) :: xch,ych
390440 end subroutine giza_get_character_size
391
441
392442 subroutine giza_get_character_size_float(units,xch,ych) bind(C)
393443 import
394444 integer(kind=c_int),intent(in),value :: units
469519 integer(kind=c_int), value, intent(in) :: ci
470520 real(kind=c_float), value, intent(in) :: red,green,blue
471521 end subroutine giza_set_colour_representation_float
472
522
473523 subroutine giza_set_colour_representation(ci,red,green,blue) bind(C)
474524 import
475525 integer(kind=c_int), value, intent(in) :: ci
481531 integer(kind=c_int), value, intent(in) :: ci
482532 real(kind=c_float), value, intent(in) :: red,green,blue,alpha
483533 end subroutine giza_set_colour_representation_alpha_float
484
534
485535 subroutine giza_set_colour_representation_alpha(ci,red,green,blue,alpha) bind(C)
486536 import
487537 integer(kind=c_int), value, intent(in) :: ci
495545 integer(kind=c_int),intent(in),value :: ci
496546 real(kind=c_double),intent(out) :: red,green,blue
497547 end subroutine giza_get_colour_representation
498
548
499549 subroutine giza_get_colour_representation_float(ci,red,green,blue) bind(C)
500550 import
501551 integer(kind=c_int),intent(in),value :: ci
507557 integer(kind=c_int),intent(in),value :: ci
508558 real(kind=c_double),intent(out) :: red,green,blue,alpha
509559 end subroutine giza_get_colour_representation_alpha
510
560
511561 subroutine giza_get_colour_representation_alpha_float(ci,red,green,blue,alpha) bind(C)
512562 import
513563 integer(kind=c_int),intent(in),value :: ci
536586 real(kind=c_double),intent(in),dimension(n) :: controlPoints,red,green,blue
537587 real(kind=c_double),intent(in),value :: cont,bright
538588 end subroutine giza_set_colour_table
539
589
540590 subroutine giza_set_colour_table_float(controlPoints,red,green,blue,n,cont,bright) bind(C)
541591 import
542592 integer(kind=c_int),intent(in),value :: n
553603 real(kind=c_double),intent(in) :: cont(ncont)
554604 real(kind=c_double),intent(in) :: affine(6)
555605 end subroutine giza_contour
556
606
557607 subroutine giza_contour_float(sizex,sizey,data,i1,i2,j1,j2,ncont,cont,affine) bind(C)
558608 import
559609 integer(kind=c_int),intent(in),value :: sizex,sizey,i1,i2,j1,j2,ncont
568618 import
569619 real(kind=c_double),intent(out) :: xpt,ypt
570620 end subroutine giza_get_current_point
571
621
572622 subroutine giza_get_current_point_float(xpt,ypt) bind(C)
573623 import
574624 real(kind=c_float),intent(out) :: xpt,ypt
627677 integer(kind=c_int),intent(in),value :: units
628678 end function giza_open_device_size_float_c
629679 end interface
630
680
631681 ! device_has_cursor is logical in Fortran but int in c
632682 ! (cannot do a generic interface for int/logical), can call c version directly with _int version
633683 interface giza_device_has_cursor
687737 end function giza_get_key_press_float
688738 end interface
689739
740 interface giza_set_motion_callback
741 function giza_set_motion_callback(func) bind(C)
742 import
743 integer(kind=c_int) :: giza_set_motion_callback
744 abstract interface
745 subroutine func(x,y,mode) bind(c)
746 import
747 real(c_double), intent(in) :: x,y
748 integer(c_int), intent(in) :: mode
749 end subroutine
750 end interface
751 end function giza_set_motion_callback
752 end interface
753
754 interface giza_end_motion_callback
755 function giza_end_motion_callback() bind(C)
756 import
757 integer(kind=c_int) :: giza_end_motion_callback
758 end function giza_end_motion_callback
759 end interface
760
690761 interface giza_draw
691762 subroutine giza_draw(x,y) bind(C)
692763 import
701772
702773 interface giza_draw_background
703774 subroutine giza_draw_background() bind(C)
704 end subroutine
775 end subroutine giza_draw_background
705776 end interface
706777
707778 interface giza_set_environment
772843 integer(kind=c_int),intent(in),value :: fs
773844 end subroutine giza_set_fill
774845 end interface
775
846
776847 interface giza_get_fill
777848 subroutine giza_get_fill(fs) bind(C)
778849 import
886957 real(kind=c_double),intent(out) :: x1,x2,y1,y2
887958 end subroutine giza_get_surface_size
888959 end interface
889
960
890961 interface giza_set_hatching_style
891962 subroutine giza_set_hatching_style(angle,spacing,phase) bind(C)
892963 import
9441015 interface giza_label
9451016 module procedure giza_intern_label_f2c
9461017 end interface
947
1018
9481019 interface giza_label_c
9491020 subroutine giza_label_c (labelx,labely,title) bind(C,name="giza_label")
9501021 import
9651036 real(kind=c_double),intent(in),dimension(n) :: xpts,ypts
9661037 end subroutine giza_line
9671038 end interface
968
1039
9691040 interface giza_set_line_width
9701041 subroutine giza_set_line_width(lw) bind(C)
9711042 import
9721043 real(kind=c_double),intent(in), value :: lw
9731044 end subroutine giza_set_line_width
974
1045
9751046 subroutine giza_set_line_width_float(lw) bind(C)
9761047 import
9771048 real(kind=c_float),intent(in), value :: lw
9781049 end subroutine giza_set_line_width_float
979
1050
9801051 module procedure giza_intern_set_line_width_int
9811052 end interface
982
1053
9831054 interface giza_get_line_width
9841055 subroutine giza_get_line_width(lw) bind(C)
9851056 import
9861057 real(kind=c_double),intent(out) :: lw
9871058 end subroutine giza_get_line_width
988
1059
9891060 subroutine giza_get_line_width_float(lw) bind(C)
9901061 import
9911062 real(kind=c_float),intent(out) :: lw
9921063 end subroutine giza_get_line_width_float
993
1064
9941065 module procedure giza_intern_get_line_width_int
9951066 end interface
9961067
10211092 integer(c_int),intent(out) :: ls
10221093 end subroutine giza_get_line_style
10231094 end interface
1024
1095
10251096 interface giza_mark_line
10261097 subroutine giza_mark_line(maxpts,npts,xpts,ypts) bind(C)
10271098 import
10301101 real(kind=c_double), dimension(*), intent(inout) :: xpts
10311102 real(kind=c_double), dimension(*), intent(inout) :: ypts
10321103 end subroutine giza_mark_line
1033
1104
10341105 subroutine giza_mark_line_float(maxpts,npts,xpts,ypts) bind(C)
10351106 import
10361107 integer(kind=c_int),intent(in),value :: maxpts
10471118 real(kind=c_double), dimension(*), intent(inout) :: ypts
10481119 character(kind=c_char),intent(out) :: ch
10491120 end subroutine giza_mark_line_char
1050
1121
10511122 subroutine giza_mark_line_char_float(maxpts,npts,xpts,ypts,ch) bind(C)
10521123 import
10531124 integer(kind=c_int),intent(in),value :: maxpts
10661137 real(kind=c_double), dimension(*), intent(inout) :: xpts
10671138 real(kind=c_double), dimension(*), intent(inout) :: ypts
10681139 end subroutine giza_mark_line_ordered
1069
1140
10701141 subroutine giza_mark_line_ordered_float(maxpts,npts,xpts,ypts) bind(C)
10711142 import
10721143 integer(kind=c_int),intent(in),value :: maxpts
10851156 real(kind=c_double), dimension(*), intent(inout) :: ypts
10861157 integer(kind=c_int),intent(in),value :: symbol
10871158 end subroutine giza_mark_points
1088
1159
10891160 subroutine giza_mark_points_float(maxpts,npts,xpts,ypts,symbol) bind(C)
10901161 import
10911162 integer(kind=c_int),intent(in),value :: maxpts
11051176 real(kind=c_double), dimension(*), intent(inout) :: ypts
11061177 integer(kind=c_int),intent(in),value :: symbol
11071178 end subroutine giza_mark_points_ordered
1108
1179
11091180 subroutine giza_mark_points_ordered_float(maxpts,npts,xpts,ypts,symbol) bind(C)
11101181 import
11111182 integer(kind=c_int),intent(in),value :: maxpts
11151186 integer(kind=c_int),intent(in),value :: symbol
11161187 end subroutine giza_mark_points_ordered_float
11171188 end interface
1118
1189
11191190 interface giza_move
11201191 subroutine giza_move(x,y) bind(C)
11211192 import
12141285 end interface
12151286
12161287 interface giza_text
1217 module procedure giza_intern_text_f2c
1288 module procedure giza_intern_text_f2c
12181289 module procedure giza_intern_text_float_f2c
12191290 end interface
12201291
12511322 end interface giza_open
12521323
12531324 interface giza_ptext
1254 module procedure giza_intern_ptext_f2c
1325 module procedure giza_intern_ptext_f2c
12551326 module procedure giza_intern_ptext_float_f2c
12561327 end interface
12571328
12701341 end interface
12711342
12721343 interface giza_qtext
1273 module procedure giza_intern_qtext_f2c
1344 module procedure giza_intern_qtext_f2c
12741345 module procedure giza_intern_qtext_float_f2c
12751346 end interface
12761347
12911362 end interface
12921363
12931364 interface giza_qtextlen
1294 module procedure giza_intern_qtextlen_f2c
1365 module procedure giza_intern_qtextlen_f2c
12951366 module procedure giza_intern_qtextlen_float_f2c
12961367 end interface
12971368
13191390 real(kind=c_double),intent(in),value :: valMin,valMax
13201391 real(kind=c_double),intent(in) :: affine(6)
13211392 end subroutine giza_render
1322
1393
13231394 subroutine giza_render_float(sizex,sizey,data,i1,i2,j1,j2,valMin,valMax,extend,affine) bind(C)
13241395 import
13251396 integer(kind=c_int),intent(in),value :: sizex,sizey,i1,i2,j1,j2,extend
13351406 real(kind=c_double),intent(in),value :: valMin,valMax
13361407 real(kind=c_double),intent(in) :: affine(6)
13371408 end subroutine giza_render_alpha
1338
1409
13391410 subroutine giza_render_alpha_float(sizex,sizey,data,alpha,i1,i2,j1,j2,valMin,valMax,extend,affine) bind(C)
13401411 import
13411412 integer(kind=c_int),intent(in),value :: sizex,sizey,i1,i2,j1,j2,extend
13531424 real(kind=c_double),intent(in),value :: valMin,valMax
13541425 real(kind=c_double),intent(in) :: affine(6)
13551426 end subroutine giza_render_transparent
1356
1427
13571428 subroutine giza_render_transparent_float(sizex,sizey,data,i1,i2,j1,j2,valMin,valMax,extend,affine) bind(C)
13581429 import
13591430 integer(kind=c_int),intent(in),value :: sizex,sizey,i1,i2,j1,j2,extend
13711442 real(kind=c_double),intent(in),value :: valMin,valMax
13721443 real(kind=c_double),intent(in) :: affine(6)
13731444 end subroutine giza_render_gray
1374
1445
13751446 subroutine giza_render_gray_float(sizex,sizey,data,i1,i2,j1,j2,valMin,valMax,extend,affine) bind(C)
13761447 import
13771448 integer(kind=c_int),intent(in),value :: sizex,sizey,i1,i2,j1,j2,extend
13881459 integer(kind=c_int),intent(in) :: idata(sizex,sizey)
13891460 real(kind=c_double),intent(in),value :: xmin,xmax,ymin,ymax
13901461 end subroutine giza_draw_pixels
1391
1462
13921463 subroutine giza_draw_pixels_float(sizex,sizey,idata,i1,i2,j1,j2,xmin,xmax,ymin,ymax,extend) bind(C)
13931464 import
13941465 integer(kind=c_int),intent(in),value :: sizex,sizey,i1,i2,j1,j2,extend
14391510 real(kind=c_float) :: giza_round_float
14401511 end function giza_round_float
14411512 end interface giza_round
1442
1513
14431514 interface giza_save
14441515 subroutine giza_save() bind(C)
14451516 end subroutine giza_save
14921563 integer(kind=c_int), intent(in),value :: nx,ny
14931564 end subroutine giza_subpanel
14941565 end interface
1495
1566
14961567 interface giza_set_panel
14971568 subroutine giza_set_panel(ix,iy) bind(C)
14981569 import
15151586 real(kind=c_double),intent(in),value :: scale,blank
15161587 real(kind=c_double),intent(in) :: affine(6)
15171588 end subroutine giza_vector
1518
1589
15191590 subroutine giza_vector_float(sizex,sizey,horizontal,vertical,i1,i2,j1,j2,scale,position,affine,blank) bind(C)
15201591 import
15211592 integer(kind=c_int),intent(in),value :: sizex,sizey,i1,i2,j1,j2,position
15491620 integer(kind=c_int), value, intent(in) :: units
15501621 real(kind=c_double), intent(out) :: x1,x2,y1,y2
15511622 end subroutine giza_get_viewport
1552
1623
15531624 subroutine giza_get_viewport_float(units,x1,x2,y1,y2) bind(C)
15541625 import
15551626 integer(kind=c_int),value, intent(in) :: units
15681639 real(kind=c_double), value, intent(in) :: xleft,xright,ybot,ytop
15691640 end subroutine giza_set_viewport_inches
15701641 end interface
1571
1642
15721643 interface giza_version
15731644 subroutine giza_version(major,minor,micro) bind(C)
15741645 import
16531724
16541725 !-------------------------------------------------------
16551726 ! these are subroutines whose arguments need conversion
1656 ! before passing to c (mainly strings)
1727 ! before passing to c (mainly strings)
16571728 !-------------------------------------------------------
16581729
16591730 subroutine giza_intern_annotate_f2c(side,displacement,coord,justification,text)
16681739
16691740 call giza_annotate_c(cstring(side),displacement_c,coord_c,justification_c,cstring(text))
16701741 end subroutine giza_intern_annotate_f2c
1742
1743 subroutine giza_intern_axis_f2c(opt,x1,y1,x2,y2,v1,v2,&
1744 tick,nsub,dmajl,dmajr,fmin,disp,angle)
1745 implicit none
1746 character(len=*),intent(in) :: opt
1747 real, intent(in) :: x1,y1,x2,y2,v1,v2
1748 real, intent(in) :: tick,dmajl,dmajr,fmin,disp,angle
1749 integer,intent(in) :: nsub
1750 real(kind=c_double) :: x1_c,y1_c,x2_c,y2_c,v1_c,v2_c
1751 real(kind=c_double) :: tick_c,dmajl_c,dmajr_c,fmin_c,disp_c,angle_c
1752 integer(kind=c_int) :: nsub_c
1753
1754 x1_c = x1; y1_c = y1; x2_c = x2; y2_c = y2; v1_c = v1; v2_c = v2
1755 tick_c = tick; dmajl_c = dmajl; dmajr_c = dmajr; fmin_c = fmin
1756 disp_c = disp; angle_c = angle
1757 nsub_c = nsub
1758
1759 call giza_axis_c(cstring(opt),x1_c,y1_c,x2_c,y2_c,v1_c,v2_c,&
1760 tick_c,nsub_c,dmajl_c,dmajr_c,fmin_c,disp_c,angle_c)
1761
1762 end subroutine giza_intern_axis_f2c
1763
1764 subroutine giza_intern_tick_f2c(x1,y1,x2,y2,v,&
1765 tickl,tickr,disp,angle,label)
1766 implicit none
1767 real, intent(in) :: x1,y1,x2,y2,v
1768 real, intent(in) :: tickl,tickr,disp,angle
1769 character(len=*),intent(in) :: label
1770 real(kind=c_double) :: x1_c,y1_c,x2_c,y2_c,v_c
1771 real(kind=c_double) :: tickl_c,tickr_c,disp_c,angle_c
1772
1773 x1_c = x1; y1_c = y1; x2_c = x2; y2_c = y2; v_c = v
1774 tickl_c = tickl; tickr_c = tickr; disp_c = disp; angle_c = angle
1775
1776 call giza_tick_c(x1_c,y1_c,x2_c,y2_c,v_c,&
1777 tickl_c,tickr_c,disp_c,angle_c,cstring(label))
1778
1779 end subroutine giza_intern_tick_f2c
16711780
16721781 subroutine giza_intern_box_f2c(xopt,xtick,nxsub,yopt,ytick,nysub)
16731782 implicit none
17021811 character(len=*), intent(in) :: side,label
17031812 real, intent(in) :: disp,width,valmin,valmax
17041813 real(kind=c_double) :: disp_c,width_c,valmin_c,valmax_c
1705
1814
17061815 disp_c = disp
17071816 width_c = width
17081817 valmin_c = valmin
17091818 valmax_c = valmax
1710
1819
17111820 call giza_colour_bar_c(cstring(side),disp_c,width_c,valmin_c,valmax_c,cstring(label))
1712
1821
17131822 end subroutine giza_intern_colour_bar_f2c
17141823
17151824 integer function giza_intern_open_device(dev,prefix)
17161825 implicit none
17171826 character(len=*),intent(in) :: dev,prefix
1718
1827
17191828 giza_intern_open_device = giza_open_device_c(cstring(dev),cstring(prefix))
17201829 end function giza_intern_open_device
17211830
17271836 integer, intent(in), optional :: units
17281837 integer, intent(out), optional :: error
17291838 integer :: giza_open
1730
1839
17311840 character(len=40) :: fdev
17321841 if (present(dev)) then
17331842 fdev = dev
17341843 else
17351844 fdev = '?'
17361845 endif
1737
1738 if (present(units) .and. present(width) .and. present(height)) then
1846
1847 if (present(units) .and. present(width) .and. present(height)) then
17391848 if (present(prefix)) then
17401849 giza_open = giza_open_device_size_c(cstring(fdev),cstring(prefix),width,height,units)
17411850 else
17511860 if (present(error)) then
17521861 error = giza_open
17531862 endif
1754
1863
17551864 end subroutine giza_open_sub
1756
1865
17571866 subroutine giza_close
17581867 call giza_close_device()
17591868 end subroutine giza_close
17641873 character(len=*),intent(in) :: dev,prefix
17651874 real,intent(in) :: width,height
17661875 integer, intent(in) :: units
1767
1876
17681877 giza_intern_open_device_size = giza_open_device_size_c(cstring(dev),cstring(prefix),width,height,units)
1769
1878
17701879 end function giza_intern_open_device_size
17711880
1772 ! So cursor functionality can be queried as logical
1881 ! So cursor functionality can be queried as logical
17731882 logical function giza_intern_device_has_cursor()
17741883 implicit none
17751884
17801889 subroutine giza_intern_label_f2c(labelx,labely,title)
17811890 implicit none
17821891 character(len=*),intent(in) :: labelx,labely,title
1783
1892
17841893 call giza_label_c(cstring(labelx),cstring(labely),cstring(title))
17851894
17861895 end subroutine giza_intern_label_f2c
17891898 implicit none
17901899 integer(kind=c_int),value,intent(in) :: lw
17911900 real(kind=c_double) :: reallw
1792
1901
17931902 !--cairo line widths are best as .5, 1.5 etc
17941903 reallw = dble(lw) + 0.5d0
17951904 call giza_set_line_width(reallw)
18161925 implicit none
18171926 real(kind=c_float),intent(in) :: x,y
18181927 character(len=*),intent(in) :: text
1819
1928
18201929 call giza_text_float_c(x,y,cstring(text))
18211930 end subroutine giza_intern_text_float_f2c
18221931
18321941 implicit none
18331942 real(kind=c_float),intent(in) :: x,y,angle,just
18341943 character(len=*),intent(in) :: text
1835
1944
18361945 call giza_ptext_float_c(x,y,angle,just,cstring(text))
18371946 end subroutine giza_intern_ptext_float_f2c
18381947
18501959 real(kind=c_float),intent(in) :: x,y,angle,just
18511960 real(kind=c_float),intent(out):: xbox(4),ybox(4)
18521961 character(len=*),intent(in) :: text
1853
1962
18541963 call giza_qtext_float_c(x,y,angle,just,cstring(text),xbox,ybox)
18551964 end subroutine giza_intern_qtext_float_f2c
18561965
18751984 subroutine giza_intern_set_font_f2c(font)
18761985 implicit none
18771986 character(len=*),intent(in) :: font
1878
1987
18791988 call giza_set_font_c(cstring(font))
18801989
18811990 end subroutine giza_intern_set_font_f2c
18831992 subroutine giza_intern_set_font_bold_f2c(font)
18841993 implicit none
18851994 character(len=*),intent(in) :: font
1886
1995
18871996 call giza_set_font_bold_c(cstring(font))
18881997
18891998 end subroutine giza_intern_set_font_bold_f2c
18912000 subroutine giza_intern_set_font_italic_f2c(font)
18922001 implicit none
18932002 character(len=*),intent(in) :: font
1894
2003
18952004 call giza_set_font_italic_c(cstring(font))
18962005
18972006 end subroutine giza_intern_set_font_italic_f2c
18992008 subroutine giza_intern_set_font_bold_italic_f2c(font)
19002009 implicit none
19012010 character(len=*),intent(in) :: font
1902
2011
19032012 call giza_set_font_bold_italic_c(cstring(font))
19042013
19052014 end subroutine giza_intern_set_font_bold_italic_f2c
19102019 character(len=*), intent(out) :: string
19112020 character(kind=c_char), dimension(len(string)+1) :: stringc
19122021 integer(kind=c_int) :: cstring_length
1913 cstring_length = len(string)+1
2022 cstring_length = len(string)+1
19142023 call giza_format_number_c(mantissa,power,iform,stringc,cstring_length)
19152024 string = fstring(stringc)
19162025
19232032 integer(kind=c_int) :: rval
19242033 integer(kind=c_int) :: ierr
19252034 character(kind=c_char), dimension(len(string)+1) :: stringc
1926 rval = len(string)+1
2035 rval = len(string)+1
19272036 ierr = giza_query_device_c(cstring(qtype),stringc,rval)
19282037 string = fstring(stringc)
1929
2038
19302039 end subroutine giza_query_device_f2c
19312040
19322041 !---------------------------------------------------------------------------
19412050 character(kind=c_char), dimension(len(string)+1) :: array
19422051 integer :: i, ilen
19432052
1944 ilen = len_trim(string) ! use the trimmed string length
1945 do i=1, ilen
1946 array(i)=string(i:i)
2053 ilen = len(string) ! use the trimmed string length
2054 do i=1,ilen
2055 array(i)=string(i:i)
19472056 end do
19482057 array(ilen+1)=achar(0)
19492058
20012110 character(len=20) :: devi
20022111 character(len=40) :: xlabeli,ylabeli,titlei
20032112 real(kind=c_double), dimension(:), allocatable :: arrtmp
2004
2113
20052114 real(kind=c_double) :: lw_c, ch_c
20062115 integer(kind=c_int) :: n, nx_c, ny_c
20072116 integer(kind=c_int) :: symbol_c, iextend
20272136 endif
20282137 else
20292138 if (present(prefix)) then
2030 call giza_open(dev=devi,prefix=prefix)
2139 call giza_open(dev=devi,prefix=prefix)
20312140 else
20322141 call giza_open(dev=devi)
20332142 endif
20452154 xmini = 0.
20462155 endif
20472156 endif
2048 if (present(xmax)) then
2157 if (present(xmax)) then
20492158 xmaxi = xmax
20502159 else
20512160 if (present(x)) then
21412250 if (present(ci)) then
21422251 call giza_set_colour_index(ci)
21432252 endif
2144
2253
21452254 if (present(x) .and. present(y)) then
21462255 n = min(size(x),size(y))
21472256 if (present(symbol)) then
21482257 symbol_c = symbol
2149 call giza_points(n,real(x,kind=c_double),real(y,kind=c_double),symbol_c)
2258 call giza_points(n,real(x,kind=c_double),real(y,kind=c_double),symbol_c)
21502259 else
21512260 call giza_line(n,real(x,kind=c_double),real(y,kind=c_double))
21522261 endif
21772286 endif
21782287 deallocate(arrtmp)
21792288 endif
2180
2289
21812290 if (present(img)) then
21822291 nx = size(img(:,1))
21832292 ny = size(img(1,:))
22072316 call giza_render(nx_c,ny_c,real(img,kind=c_double),int(1,kind=c_int),&
22082317 nx_c,int(1,kind=c_int),ny_c,valmin,valmax,iextend,affinei)
22092318 endif
2210
2319
22112320 call giza_close()
2212
2321
22132322 end subroutine giza_plot
22142323
22152324 end module giza
3939 * -nbin :- number of bins
4040 * -flag :- flag to indicate page changes, see below
4141 *
42 * See also: giza_histogram_binned, giza_histogram_float
42 * See Also: giza_histogram_binned, giza_histogram_float
4343 *
4444 * Flag:
4545 * -0 :- giza_histogram calls giza_environment to set up new plotting page
6565 {
6666 ninbin[ibin] = 0;
6767 }
68
69 for (i=0;i<n;i++)
68
69 for (i=0;i<n;i++)
7070 {
7171 ibin = (int) ((dat[i] - min)/bin_width);
7272 if (ibin >= 0 && ibin < nbin)
8181 ymax = nmax;
8282 ymax = giza_round(1.01*ymax, &nval);
8383 giza_get_fill(&oldFill);
84
84
8585 if (flag % 2 == 0) giza_set_environment(min,max,0.,(double) ymax,0,0);
86
86
8787 /* set up plotting environment and options */
88 switch (flag)
88 switch (flag)
8989 {
9090 case 5:
9191 default:
100100 _giza_set_trans (GIZA_TRANS_WORLD);
101101
102102 /* plot the bars of the histogram */
103 for (ibin=0;ibin<nbin;ibin++)
103 for (ibin=0;ibin<nbin;ibin++)
104104 {
105105 xmin = min + ibin*bin_width;
106106 xmax = xmin + bin_width;
107107 ymin = 0.;
108108 ymax = (double) ninbin[ibin];
109
109
110110 /* plot only 3 sides of the rectangle for all except the last */
111111 cairo_move_to (Dev[id].context, xmin, ymin);
112112 cairo_line_to (Dev[id].context, xmin, ymax);
117117 }
118118
119119 /* restore previous fill style */
120 giza_set_fill(oldFill);
120 giza_set_fill(oldFill);
121121 _giza_set_trans (oldTrans);
122122 }
123123
126126 *
127127 * Synopsis: Same as giza_histogram but takes floats
128128 *
129 * See also: giza_histogram, giza_histogram_binned_float
129 * See Also: giza_histogram, giza_histogram_binned_float
130130 *
131131 */
132132 void
141141 ddat[i] = (double) dat[i];
142142 }
143143 giza_histogram(n, ddat, (double) min, (double) max, nbin, flag);
144
144
145145 }
146146
147147 /**
155155 * -dat :- data values for each bin
156156 * -center :- if true (1) x values correspond to centre of each bin
157157 *
158 * See also: giza_histogram, giza_histogram_binned_float
158 * See Also: giza_histogram, giza_histogram_binned_float
159159 *
160160 */
161161 void
172172 double dx;
173173
174174 /* plot the bars of the histogram */
175 for (i=0;i<n;i++)
175 for (i=0;i<n;i++)
176176 {
177177 if (i==n-1) {
178178 dx = x[i] - x[i-1];
194194 *
195195 * Synopsis: Same as giza_histogram_binned but takes floats
196196 *
197 * See also: giza_histogram, giza_histogram_binned_float
197 * See Also: giza_histogram, giza_histogram_binned_float
198198 *
199199 */
200200 void
120120
121121 !------------------------------------------------------------------------
122122 ! Module: PGAXIS -- draw an axis
123 ! Status: NOT IMPLEMENTED
123 ! Status: IMPLEMENTED
124124 !------------------------------------------------------------------------
125125 subroutine PGAXIS (OPT, X1, Y1, X2, Y2, V1, V2, STEP, NSUB, DMAJL, DMAJR, FMIN, DISP, ORIENT)
126 use giza, only:giza_axis
126127 implicit none
127128 character*(*), intent(in) :: OPT
128129 real, intent(in) :: X1, Y1, X2, Y2, V1, V2, STEP, DMAJL, DMAJR, FMIN, DISP
129130 real, intent(in) :: ORIENT
130131 integer, intent(in) :: NSUB
132
133 call giza_axis(OPT, X1, Y1, X2, Y2, V1, V2, STEP, NSUB, DMAJL, DMAJR, FMIN, DISP, ORIENT)
131134
132135 end subroutine PGAXIS
133136
16711674
16721675 !------------------------------------------------------------------------
16731676 ! Module: PGTICK -- draw a single tick mark on an axis
1674 ! Status: NOT IMPLEMENTED
1677 ! Status: IMPLEMENTED
16751678 !------------------------------------------------------------------------
16761679 subroutine PGTICK (X1, Y1, X2, Y2, V, TIKL, TIKR, DISP, ORIENT, STR)
1680 use giza, only:giza_tick
16771681 implicit none
16781682 real, intent(in) :: X1, Y1, X2, Y2, V, TIKL, TIKR, DISP, ORIENT
16791683 character*(*), intent(in) :: STR
1684
1685 call giza_tick(X1, Y1, X2, Y2, V, TIKL, TIKR, DISP, ORIENT, STR)
16801686
16811687 end subroutine PGTICK
16821688
7676 cairo_font_face_t* font;
7777 } giza_font_t;
7878
79 /* type definition for the motion callback function */
80 typedef void (*giza_callback_t)(double *x, double *y, int *mode);
81
7982 /* Store variables relating to the current device */
8083 typedef struct
8184 {
124127 cairo_font_extents_t fontExtents;
125128 double fontAngle;
126129 int number_format;
130 giza_callback_t motion_callback;
127131 } giza_device_t;
128132
129133 extern giza_device_t Dev[GIZA_MAX_DEVICES];
5555 giza_get_character_height (&ch);
5656
5757 cairo_save (Dev[id].context);
58
58
5959 /* save the font (can be changed by \rm \fn \fc during text write) */
6060 int len = GIZA_FONT_LEN;
6161 char giza_font[len];
7272 /* Draw the bounding box */
7373 if (Dev[id].text_background >= 0)
7474 {
75 int oldCi;
75 int oldCi,oldfill;
7676 giza_get_colour_index (&oldCi);
7777 giza_set_colour_index (Dev[id].text_background);
78 giza_get_fill (&oldfill);
79 giza_set_fill(GIZA_FILL_SOLID);
7880 giza_polygon (4, xbox, ybox);
7981 giza_set_colour_index (oldCi);
82 giza_set_fill (oldfill);
8083 }
8184
8285 /* change the current trans to world coords */
3737 * Input:
3838 * -sizex :- The dimensions of data in the x-direction
3939 * -sizey :- The dimensions of data in the y-direction
40 * -data :- The data to be render
40 * -data :- The data to be rendered
4141 * -i1 :- The inclusive range of data to render in the x dimension.
4242 * -i2 :- The inclusive range of data to render in the x dimension.
4343 * -j1 :- The inclusive range of data to render in the y direction
5959 */
6060 void
6161 giza_render (int sizex, int sizey, const double* data, int i1, int i2,
62 int j1, int j2, double valMin, double valMax, int extend, const double *affine)
62 int j1, int j2, double valMin, double valMax, int extend, const double *affine)
6363 {
6464 _giza_render (sizex, sizey, data,i1,i2,j1,j2,valMin,valMax,affine,0,extend,data);
6565 }
8585 */
8686 void
8787 giza_render_alpha (int sizex, int sizey, const double* data, const double* alpha, int i1, int i2,
88 int j1, int j2, double valMin, double valMax, int extend, const double *affine)
88 int j1, int j2, double valMin, double valMax, int extend, const double *affine)
8989 {
9090 _giza_render (sizex, sizey, data,i1,i2,j1,j2,valMin,valMax,affine,2,extend,alpha);
9191 }
9696 */
9797 void
9898 _giza_render (int sizex, int sizey, const double* data, int i1, int i2,
99 int j1, int j2, double valMin, double valMax, const double *affine,
100 int transparent, int extend, const double* datalpha)
99 int j1, int j2, double valMin, double valMax, const double *affine,
100 int transparent, int extend, const double* datalpha)
101101 {
102102 if (!_giza_check_device_ready ("giza_render"))
103103 return;
506506 cairo_surface_t *pixmap;
507507 cairo_matrix_t mat;
508508 int stride, pixnum, width = i2 - i1 + 1, height = j2 - j1 + 1;
509
509
510510 cairo_extend_t cairoextendtype;
511511 _giza_get_extend(extend,&cairoextendtype);
512512
00 /* giza - a scientific plotting library built on cairo
11 *
22 * Copyright (c) 2010 James Wetter and Daniel Price
3 * Copyright (c) 2010-2012 Daniel Price
3 * Copyright (c) 2010-2022 Daniel Price
44 *
55 * This library is free software; and you are welcome to redistribute
66 * it under the terms of the GNU General Public License
2222 */
2323
2424 void _giza_stroke (void);
25 void _giza_tick_intervals (double xmin, double xmax, double xinterval,
26 int *i1, int *i2);
3939 * down-then-across instead of the default
4040 * across-then-down
4141 *
42 * See also: giza_select_panel, giza_get_panel
42 * See Also: giza_select_panel, giza_get_panel
4343 *
4444 */
4545 void
8383 * -ix :- panel index in x direction
8484 * -iy :- panel index in y direction
8585 *
86 * See also: giza_subpanel, giza_get_panel
86 * See Also: giza_subpanel, giza_get_panel
8787 *
8888 */
8989 void
116116 * -ix :- panel index in x direction
117117 * -iy :- panel index in y direction
118118 *
119 * See also: giza_subpanel, giza_set_panel
119 * See Also: giza_subpanel, giza_set_panel
120120 *
121121 */
122122 void
0 /* giza - a scientific plotting library built on cairo
1 *
2 * Copyright (c) 2010 James Wetter and Daniel Price
3 * Copyright (c) 2010-2022 Daniel Price
4 *
5 * This library is free software; and you are welcome to redistribute
6 * it under the terms of the GNU General Public License
7 * (GPL, see LICENSE file for details) and the provision that
8 * this notice remains intact. If you modify this file, please
9 * note section 2a) of the GPLv2 states that:
10 *
11 * a) You must cause the modified files to carry prominent notices
12 * stating that you changed the files and the date of any change.
13 *
14 * This software is distributed "AS IS", with ABSOLUTELY NO WARRANTY.
15 * See the GPL for specific language governing rights and limitations.
16 *
17 * The Original code is the giza plotting library.
18 *
19 * Contributor(s):
20 * James Wetter <wetter.j@gmail.com>
21 * Daniel Price <daniel.price@monash.edu> (main contact)
22 */
23 void
24 _giza_draw_tick(cairo_matrix_t mat, double ratio, double dr,
25 double currentTickL_l, double currentTickL_r);
0 /* giza - a scientific plotting library built on cairo
1 *
2 * Copyright (c) 2010 James Wetter and Daniel Price
3 * Copyright (c) 2010-2022 Daniel Price
4 *
5 * This library is free software; and you are welcome to redistribute
6 * it under the terms of the GNU General Public License
7 * (GPL, see LICENSE file for details) and the provision that
8 * this notice remains intact. If you modify this file, please
9 * note section 2a) of the GPLv2 states that:
10 *
11 * a) You must cause the modified files to carry prominent notices
12 * stating that you changed the files and the date of any change.
13 *
14 * This software is distributed "AS IS", with ABSOLUTELY NO WARRANTY.
15 * See the GPL for specific language governing rights and limitations.
16 *
17 * The Original code is the giza plotting library.
18 *
19 * Contributor(s):
20 * James Wetter <wetter.j@gmail.com>
21 * Daniel Price <daniel.price@monash.edu> (main contact)
22 */
23
24 #include "giza-private.h"
25 #include "giza-transforms-private.h"
26 #include "giza-stroke-private.h"
27 #include "giza-window-private.h"
28 #include "giza-viewport-private.h"
29 #include "giza-drivers-private.h"
30 #include "giza-tick-private.h"
31 #include <giza.h>
32 #include <math.h>
33
34 /**
35 * Drawing: giza_tick
36 *
37 * Synopsis: Draw a single tick along an axis. The axis extends from
38 * (x1,y1) to (x2,y2) and the tick is drawn perpendicular to the axis
39 * which is not drawn by this routine. Optional text label drawn
40 * parallel to the axis if the orientation angle is zero
41 *
42 * Input:
43 * -x1 :- starting x position in world coordinates
44 * -y1 :- starting y position in world coordinates
45 * -x2 :- finishing x position in world coordinates
46 * -y2 :- finishing y position in world coordinates
47 * -v :- axis value at tick location
48 * -tickl :- Length of tick mark drawn to "left/bottom" of axis
49 * in units of character height
50 * -tickr :- Length of tick mark drawn to "right/top" of axis
51 * in units of character height
52 * -disp :- Displacement of labels from axis
53 * in units of character height
54 * -angle :- Label orientation; angle between text and direction of axis; in degrees
55 * -label :- Text string used for label (can be blank)
56 *
57 */
58 void
59 giza_tick (double x1, double y1, double x2, double y2, double v,
60 double tickl, double tickr, double disp, double angle, const char *label)
61 {
62 if (!_giza_check_device_ready ("giza_tick"))
63 return;
64
65 _giza_expand_clipping ();
66
67 double currentTickL_l;
68 double currentTickL_r;
69 double x,y,theta,theta_deg,dr;
70
71 theta = atan2(y2-y1,x2-x1);
72 theta_deg = theta / GIZA_DEG_TO_RAD;
73 dr = sqrt(pow(x2-x1,2) + pow(y2-y1,2));
74
75 cairo_matrix_t mat;
76 cairo_matrix_init_translate(&mat,x1,y1);
77 cairo_matrix_rotate(&mat,theta);
78
79 int oldTrans = _giza_get_trans ();
80 _giza_set_trans (GIZA_TRANS_WORLD);
81
82 double xch, ych;
83 giza_get_character_size (GIZA_UNITS_WORLD, &xch, &ych);
84
85 /* set major tick length in pixels */
86 currentTickL_l = Dev[id].fontExtents.max_x_advance * tickl;
87 currentTickL_r = Dev[id].fontExtents.max_x_advance * tickr;
88 double TickL_l_tmp = 0.;
89 double TickL_r_tmp = 0.;
90
91 /* convert to world coords */
92 cairo_device_to_user_distance (Dev[id].context, &TickL_l_tmp, &currentTickL_l);
93 cairo_device_to_user_distance (Dev[id].context, &TickL_r_tmp, &currentTickL_r);
94 currentTickL_l = -currentTickL_l;
95 currentTickL_r = -currentTickL_r;
96
97 _giza_draw_tick(mat,v,dr,currentTickL_l,currentTickL_r);
98
99 /* write the label */
100 x = dr * v;
101 y = ych * disp;
102 cairo_matrix_transform_point (&mat,&x,&y);
103 giza_ptext (x, y, theta_deg + angle, 0.5, label);
104
105 /*_giza_stroke ();*/
106
107 /* stroke all the paths */
108 int lc;
109 giza_get_line_cap (&lc);
110 giza_set_line_cap (CAIRO_LINE_CAP_SQUARE);
111 _giza_stroke ();
112 giza_set_line_cap (lc);
113 _giza_set_trans (oldTrans);
114
115 giza_flush_device ();
116
117 /* Restore clipping */
118 giza_set_viewport (Dev[id].VP.xmin, Dev[id].VP.xmax, Dev[id].VP.ymin, Dev[id].VP.ymax);
119 }
120
121 /**
122 * Drawing: giza_tick_float
123 *
124 * Synopsis: Same functionality as giza_tick but takes floats instead of doubles.
125 *
126 * See Also: giza_tick
127 */
128 void
129 giza_tick_float (float x1, float y1, float x2, float y2, float v,
130 float tickl, float tickr, float disp, float angle, const char *label)
131 {
132 if (!_giza_check_device_ready ("giza_tick"))
133 return;
134
135 giza_tick((double) x1, (double) y1, (double) x2, (double) y2, (double) v,
136 (double) tickl, (double) tickr, (double) disp, (double) angle, label);
137
138 }
139
140 /**
141 * Internal functionality for giza_tick, also used by giza_axis
142 */
143 void
144 _giza_draw_tick(cairo_matrix_t mat, double ratio, double dr,
145 double currentTickL_l, double currentTickL_r)
146 {
147 double x,y,xpt,ypt;
148
149 /* set location of tick start and end in non-rotated coords */
150 x = dr * ratio;
151 xpt = x;
152 y = -currentTickL_l;
153 ypt = currentTickL_r;
154
155 /* rotate and translate */
156 cairo_matrix_transform_point (&mat,&x,&y);
157 cairo_matrix_transform_point (&mat,&xpt,&ypt);
158
159 /* draw the tick(s) along the axis */
160 cairo_move_to (Dev[id].context, x, y);
161 cairo_line_to (Dev[id].context, xpt, ypt);
162
163 }
7171 /* Scaling */
7272 double dxWin = (Win.xmax - Win.xmin);
7373 double dyWin = (Win.ymax - Win.ymin);
74
74
7575 double x0,y0,xfac,yfac;
7676 if (Dev[id].ix > 0 && Dev[id].iy > 0) { /* sanity check */
7777 x0 = (Dev[id].ix - 1)*Dev[id].panelwidth/Dev[id].width;
00 /* giza - a scientific plotting library built on cairo
11 *
22 * Copyright (c) 2010 James Wetter and Daniel Price
3 * Copyright (c) 2010-2012 Daniel Price
3 * Copyright (c) 2010-2022 Daniel Price
44 *
55 * This library is free software; and you are welcome to redistribute
66 * it under the terms of the GNU General Public License
3939 float justification, const char *string);
4040 void giza_begin_autolog(void);
4141 void giza_end_autolog(void);
42
43 void giza_axis (const char *opt, double x1, double y1, double x2, double y2,
44 double v1, double v2, double step, int nsub,
45 double dmajl, double dmajr, double fmin, double disp, double angle);
46 void giza_axis_float (const char *opt, float x1, float y1, float x2, float y2,
47 float v1, float v2, float step, int nsub,
48 float dmajl, float dmajr, float fmin, float disp, float angle);
49
4250 int giza_band (int mode, int moveCursm, double xanc, double yanc, double *x,
4351 double *y, char *ch);
4452 int giza_band_float (int mode, int moveCurs, float xanc, float yanc, float *x,
7482 void giza_set_clipping (int clip);
7583 void giza_get_clipping (int *clip);
7684
77 void giza_colour_bar (const char *side, double disp, double width,
85 void giza_colour_bar (const char *side, double disp, double width,
7886 double valMin, double valMax, const char *label);
79 void giza_colour_bar_float (const char *side, float disp, float width,
87 void giza_colour_bar_float (const char *side, float disp, float width,
8088 float valMin, float valMax, const char *label);
8189
8290 void giza_set_colour_index (int ci);
151159 int giza_device_has_cursor (void);
152160 int giza_get_key_press (double *x, double *y, char *ch);
153161 int giza_get_key_press_float (float *x, float *y, char *ch);
162 int giza_set_motion_callback (void (*func)(double *x, double *y, int *mode));
163 int giza_end_motion_callback (void);
154164
155165 void giza_draw (double xpt, double ypt);
156166 void giza_draw_float (float xpt, float ypt);
326336 void giza_set_text_background (int colourIndex);
327337 void giza_get_text_background (int *colourIndex);
328338
339 void giza_tick_float (float x1, float y1, float x2, float y2, float v,
340 float tickl, float tickr, float disp, float angle, const char *label);
341 void giza_tick (double x1, double y1, double x2, double y2, double v,
342 double tickl, double tickr, double disp, double angle, const char *label);
343
329344 void
330345 giza_vector (int n, int m, const double* horizontal, const double* vertical,
331346 int i1, int i2, int j1, int j2, double scale, int position,
1616 fmin = 0.5
1717 disp = 0.
1818 orient = 90.
19 call pgaxis("N",x1,y1,x2,y2,v1,v2,step,nsub,dmajl,dmajr,fmin,disp,orient)
19 call pgaxis("NST",x1,y1,x2,y2,v1,v2,step,nsub,dmajl,dmajr,fmin,disp,orient)
2020 call pgend
2121
2222 end program test_pgaxis