Update upstream source from tag 'upstream/1.3.1'
Update to upstream version '1.3.1'
with Debian dir c7082ee22d5842c3da9064feb94eaa52feb46ed1
Ole Streicher
2 years ago
3 | 3 | report: |
4 | 4 | runs-on: ubuntu-latest |
5 | 5 | 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 | |
8 | 10 | 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 | ||
14 | 14 | - 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' |
89 | 89 | HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.BREW_TOKEN }} |
90 | 90 | version: ${{ steps.get_version.outputs.version }} |
91 | 91 | 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 | |
93 | 93 | run: | |
94 | 94 | git config --global user.email "daniel.price@monash.edu" |
95 | 95 | 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 | ||
0 | 232 | 2021-01-22 Daniel Price <daniel.price@monash.edu> |
1 | 233 | |
2 | 234 | * doc/api.pl: fix comment about api not being stable (not true, it |
63 | 295 | |
64 | 296 | * : Merge pull request #26 from haavee/issue-21 Issue 21 |
65 | 297 | |
66 | 2019-01-17 haavee <hverkouter@gmail.com> | |
298 | 2019-01-17 Harro Verkouter <hverkouter@gmail.com> | |
67 | 299 | |
68 | 300 | * src/giza-box-time.c: Fix unused expression result warning A no-op statement was still left in the code; it is now removed |
69 | 301 | |
70 | 2019-01-17 haavee <hverkouter@gmail.com> | |
302 | 2019-01-17 Harro Verkouter <hverkouter@gmail.com> | |
71 | 303 | |
72 | 304 | * src/giza-box-time.c: Remove C99 for-loop initial declarations There were still two C99-only idioms left which are now rewritten to |
73 | 305 | use a single, not-quite-as-transient-as-hoped, variable char* to |
114 | 346 | |
115 | 347 | * : Merge pull request #24 from haavee/issue-21 This should fix issue #21 "missing braces" |
116 | 348 | |
117 | 2018-11-27 haavee <hverkouter@gmail.com> | |
349 | 2018-11-27 Harro Verkouter <hverkouter@gmail.com> | |
118 | 350 | |
119 | 351 | * src/giza-driver-xw.c, src/giza-drivers.c: Synchronize XW device id |
120 | 352 | with giza_device_t The global variable 'id' is now also used to address the instance of |
125 | 357 | closed. If the entry happened to be an XWindow, the corresponding |
126 | 358 | XW[id] struct will now also be properly closed. |
127 | 359 | |
128 | 2018-11-27 haavee <hverkouter@gmail.com> | |
360 | 2018-11-27 Harro Verkouter <hverkouter@gmail.com> | |
129 | 361 | |
130 | 362 | * src/giza-driver-null.c, src/giza-driver-pdf.c, |
131 | 363 | src/giza-driver-png.c, src/giza-driver-ps.c, src/giza-driver-svg.c, |
143 | 375 | for the XWindow driver to use that assigned slot as well. A separate commit implementing that will follow, which makes that |
144 | 376 | change opt-in. |
145 | 377 | |
146 | 2018-11-26 haavee <hverkouter@gmail.com> | |
378 | 2018-11-26 Harro Verkouter <hverkouter@gmail.com> | |
147 | 379 | |
148 | 380 | * src/giza-drivers.c, src/giza-private.h, |
149 | 381 | src/giza-set-font-private.h, src/giza-set-font.c, src/giza.h: Font |
158 | 390 | library initialization code made more robust and handling error(s) |
159 | 391 | and releasing allocated memory in such a case was improved. Extra code to ensure cache unloading at program end was added. |
160 | 392 | |
161 | 2018-11-23 haavee <hverkouter@gmail.com> | |
393 | 2018-11-23 Harro Verkouter <hverkouter@gmail.com> | |
162 | 394 | |
163 | 395 | * src/giza-box.c, src/giza-cpgplot.c, src/giza-format-number.c, |
164 | 396 | src/giza-fortran.F90, src/giza.h: `giza_format_number()` string |
179 | 411 | do the same. The Python-PGPLOT binding (ppgplot) does not expose cpgnumb() so at this point that's not an |
180 | 412 | issue. |
181 | 413 | |
182 | 2018-11-23 haavee <hverkouter@gmail.com> | |
414 | 2018-11-23 Harro Verkouter <hverkouter@gmail.com> | |
183 | 415 | |
184 | 416 | * src/giza-cpgplot.c, src/giza-drivers.c, src/giza.h: Fix multi dev |
185 | 417 | handling (SIGSEGV, libc corruption) The giza library, specifically in `giza_open_device_size()` and |
209 | 441 | |
210 | 442 | 2018-11-17 Daniel Price <daniel.price@monash.edu> |
211 | 443 | |
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> | |
216 | 449 | |
217 | 450 | * src/giza-drivers.c: Remove _giza_change_size() because it's not used anywhere anymore. |
218 | 451 | |
220 | 453 | |
221 | 454 | * : Merge pull request #20 from haavee/issue-19 This fixes #19 build failure macports PPC |
222 | 455 | |
223 | 2018-11-14 haavee <hverkouter@gmail.com> | |
456 | 2018-11-14 Harro Verkouter <hverkouter@gmail.com> | |
224 | 457 | |
225 | 458 | * src/giza-cpgplot.c: Revert "Args swapped between API and giza |
226 | 459 | implementation" This reverts commit c323737e7d49dd998d068b2964ffe76c86f648c5. |
227 | 460 | Should be on a completely different branch! |
228 | 461 | |
229 | 2018-11-14 haavee <hverkouter@gmail.com> | |
462 | 2018-11-14 Harro Verkouter <hverkouter@gmail.com> | |
230 | 463 | |
231 | 464 | * src/giza-driver-xw-private.h, src/giza-driver-xw.c, |
232 | 465 | src/giza-drivers.c, src/giza-paper.c, src/giza-private.h: Attempt to |
235 | 468 | takes effect * PGPAGE() skips asking for confirmation the first time * XWindow specific "_giza_change_size_xw()" removed - now handled |
236 | 469 | better in giza_set_paper_size(). The resize flag is detected in _giza_change_page_xw() and handled correctly there. |
237 | 470 | |
238 | 2018-11-12 haavee <hverkouter@gmail.com> | |
471 | 2018-11-12 Harro Verkouter <hverkouter@gmail.com> | |
239 | 472 | |
240 | 473 | * src/giza-driver-xw.c, src/giza-environment.c: Savegame issue #18 |
241 | 474 | |
242 | 2018-11-12 haavee <hverkouter@gmail.com> | |
475 | 2018-11-12 Harro Verkouter <hverkouter@gmail.com> | |
243 | 476 | |
244 | 477 | * src/giza-cpgplot.c: Args swapped between API and giza |
245 | 478 | 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 |
246 | 479 | order as 'valMin', 'valMax' i.e. fg, bg are reversed |
247 | 480 | |
248 | 2018-11-09 haavee <hverkouter@gmail.com> | |
481 | 2018-11-09 Harro Verkouter <hverkouter@gmail.com> | |
249 | 482 | |
250 | 483 | * src/giza-box-time.c: This fixes #19 build failure macports PPC I erroneously used scoped for loop variables in a non-100% portable |
251 | 484 | way. |
254 | 487 | |
255 | 488 | * : Merge pull request #16 from haavee/symbol-issues Fixes #5 Symbol issues |
256 | 489 | |
257 | 2018-11-08 haavee <hverkouter@gmail.com> | |
490 | 2018-11-08 Harro Verkouter <hverkouter@gmail.com> | |
258 | 491 | |
259 | 492 | * src/giza-points.c: Scale up symbols #-3..-8 They came out (noticeably) smaller in giza than in PGPLOT as far as |
260 | 493 | I could tell. |
261 | 494 | |
262 | 2018-11-08 haavee <hverkouter@gmail.com> | |
495 | 2018-11-08 Harro Verkouter <hverkouter@gmail.com> | |
263 | 496 | |
264 | 497 | * src/giza-points.c: Scaled up the arrows (#28-31) a bit The arrows looked markedly smaller in giza than on the PGPLOT |
265 | 498 | original. Scaled them up a bit. |
266 | 499 | |
267 | 2018-11-08 haavee <hverkouter@gmail.com> | |
500 | 2018-11-08 Harro Verkouter <hverkouter@gmail.com> | |
268 | 501 | |
269 | 502 | * src/giza-points.c: Fix #19, update #0, 6 Symbol #19 was not a hexagon with a cross but a larger open square |
270 | 503 | than #6. The squares are also drawn with a slightly thinner line. |
271 | 504 | |
272 | 2018-11-08 haavee <hverkouter@gmail.com> | |
505 | 2018-11-08 Harro Verkouter <hverkouter@gmail.com> | |
273 | 506 | |
274 | 507 | * src/giza-points.c: Fix symbols #20 - 27 (inclusive) The open circles are now exponentially scaled and drawn with a |
275 | 508 | slightly thinner line than before |
276 | 509 | |
277 | 2018-11-08 haavee <hverkouter@gmail.com> | |
510 | 2018-11-08 Harro Verkouter <hverkouter@gmail.com> | |
278 | 511 | |
279 | 512 | * 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 |
280 | 513 | 20 was entered as seven-point star but it should be a small open |
282 | 515 | symbols 20-27 are a bit off anyway, so that's going to be fixed in a |
283 | 516 | different commit. |
284 | 517 | |
285 | 2018-11-08 haavee <hverkouter@gmail.com> | |
518 | 2018-11-08 Harro Verkouter <hverkouter@gmail.com> | |
286 | 519 | |
287 | 520 | * src/giza-points.c: New line widths only used if you actually |
288 | 521 | stroke |
289 | 522 | |
290 | 2018-11-08 haavee <hverkouter@gmail.com> | |
523 | 2018-11-08 Harro Verkouter <hverkouter@gmail.com> | |
291 | 524 | |
292 | 525 | * src/giza-points.c: Fix symbol 14 (open plus sign) |
293 | 526 | |
294 | 2018-11-08 haavee <hverkouter@gmail.com> | |
527 | 2018-11-08 Harro Verkouter <hverkouter@gmail.com> | |
295 | 528 | |
296 | 529 | * src/giza-points.c: Fix symbol #10 (concave rect) |
297 | 530 | |
298 | 2018-11-07 haavee <hverkouter@gmail.com> | |
531 | 2018-11-07 Harro Verkouter <hverkouter@gmail.com> | |
299 | 532 | |
300 | 533 | * src/giza-points.c: Fix symbols 7,13,15 The triangles 7, 13 were pointing the wrong way and symbol 15 is the |
301 | 534 | star of David formed by overplotting two open triangles offset a |
302 | 535 | little bit |
303 | 536 | |
304 | 2018-11-07 haavee <hverkouter@gmail.com> | |
537 | 2018-11-07 Harro Verkouter <hverkouter@gmail.com> | |
305 | 538 | |
306 | 539 | * : Merge remote-tracking branch 'upstream/master' |
307 | 540 | |
310 | 543 | * : Merge pull request #3 from haavee/master giza_parse_string() fix, add cpgqinf() support, fix critical bug |
311 | 544 | found doing this |
312 | 545 | |
313 | 2018-09-06 haavee <hverkouter@gmail.com> | |
546 | 2018-09-06 Harro Verkouter <hverkouter@gmail.com> | |
314 | 547 | |
315 | 548 | * src/giza-cpgplot.c, src/giza-drivers-private.h, |
316 | 549 | src/giza-drivers.c, src/giza-fortran.F90, src/giza.h: Support |
338 | 571 | wrapper needed adapting to the new signature and pass in the extra |
339 | 572 | variable accordingly. |
340 | 573 | |
341 | 2018-09-06 haavee <hverkouter@gmail.com> | |
574 | 2018-09-06 Harro Verkouter <hverkouter@gmail.com> | |
342 | 575 | |
343 | 576 | * src/giza-scanner.l, src/lex.yy.c: Fix backspace handling ... The meaning of the nGlyph index used in giza_parse_string changed |
344 | 577 | subtly during development and the handling of backspace was not |
385 | 618 | |
386 | 619 | * : Merge https://github.com/haavee/giza into haavee-master |
387 | 620 | |
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> | |
394 | 628 | |
395 | 629 | * src/giza-set-font.c, src/giza.h: giza_set_font_*(...) take const |
396 | 630 | char* Sometimes compile time static strings are fed into |
398 | 632 | mutable strings. None of the functions actually modify their argument so it probably |
399 | 633 | is better to make this explicit in their prototypes. |
400 | 634 | |
401 | 2018-09-04 haavee <hverkouter@gmail.com> | |
635 | 2018-09-04 Harro Verkouter <hverkouter@gmail.com> | |
402 | 636 | |
403 | 637 | * src/giza-driver-xw.c, src/giza-drivers.c: Better XWindow resizing |
404 | 638 | implementation It turned out that the XWindow resizing wasn't handled correctly in |
417 | 651 | window size has been achieved. Now it works reliably and windows can |
418 | 652 | be resized between plotting. |
419 | 653 | |
420 | 2018-08-30 haavee <hverkouter@gmail.com> | |
654 | 2018-08-30 Harro Verkouter <hverkouter@gmail.com> | |
421 | 655 | |
422 | 656 | * src/giza-io-private.h, src/giza-io.c: Enable formatted |
423 | 657 | warning/error messages (compat) By changing _giza_warning() and _giza_error() prototype (and |
428 | 662 | #%d '%s'", token, yytext); Existing _giza_warning()/_giza_error() calls are completely |
429 | 663 | unaffected by this. |
430 | 664 | |
431 | 2018-08-30 haavee <hverkouter@gmail.com> | |
665 | 2018-08-30 Harro Verkouter <hverkouter@gmail.com> | |
432 | 666 | |
433 | 667 | * src/giza-driver-xw.c: no XWindow resize waiting for keypress Whilst the system is waiting for a keypress, do not honour window |
434 | 668 | resizing requests. PGPLOT also does not do this. |
435 | 669 | |
436 | 2018-08-30 haavee <hverkouter@gmail.com> | |
670 | 2018-08-30 Harro Verkouter <hverkouter@gmail.com> | |
437 | 671 | |
438 | 672 | * src/giza-box.c: Fixed earlier broken 'repair' Sometimes the PGPLOT doc is somewhat ambiguous but not for 'N' and |
439 | 673 | 'M' options: both imply labels have to be drawn, only 'M' sais to do |
441 | 675 | 'M' ("write labels")? Or is 'L' only honoured if either 'N' or 'M' |
442 | 676 | is specified (which is how the code currently works). |
443 | 677 | |
444 | 2018-08-30 haavee <hverkouter@gmail.com> | |
678 | 2018-08-30 Harro Verkouter <hverkouter@gmail.com> | |
445 | 679 | |
446 | 680 | * 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 |
447 | 681 | viewport) The 'M' option was not implemented by giza so I added it. Whilst at |
449 | 683 | high-level check and sometimes continue'ing from a loop if the rest |
450 | 684 | of the loop body is precluded from being executed anyway. |
451 | 685 | |
452 | 2018-08-30 haavee <hverkouter@gmail.com> | |
686 | 2018-08-30 Harro Verkouter <hverkouter@gmail.com> | |
453 | 687 | |
454 | 688 | * src/giza-box-time.c: Fixed minor bugs (logic, off-by-one, missing |
455 | 689 | /) 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 |
458 | 692 | formats I had forgotten to escape the backslash with a backslash in |
459 | 693 | the strings. |
460 | 694 | |
461 | 2018-08-30 haavee <hverkouter@gmail.com> | |
695 | 2018-08-30 Harro Verkouter <hverkouter@gmail.com> | |
462 | 696 | |
463 | 697 | * 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 |
464 | 698 | ticks were drawn on the right hand side they'd be drawn the same |
465 | 699 | direction as the ones on the left-hand side. Fixed. |
466 | 700 | |
467 | 2018-08-30 haavee <hverkouter@gmail.com> | |
701 | 2018-08-30 Harro Verkouter <hverkouter@gmail.com> | |
468 | 702 | |
469 | 703 | * 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 |
470 | 704 | 'P': -I: Invert tick marks - write them outside the viewport in |
475 | 709 | existing code drew the top tick marks outside the viewport because |
476 | 710 | it would draw them 'up' as well. |
477 | 711 | |
478 | 2018-08-30 haavee <hverkouter@gmail.com> | |
712 | 2018-08-30 Harro Verkouter <hverkouter@gmail.com> | |
479 | 713 | |
480 | 714 | * 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 |
481 | 715 | all! This was traced to be when the window set through pgswin() was |
482 | 716 | such that Dev[id].Win.[xy]max < Dev[id].Win.[xy]min, i.e. the axis |
483 | 717 | is reversed: the values decrease towards the right (X) or top (Y) |
484 | 718 | |
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> | |
491 | 726 | |
492 | 727 | * src/giza-cursor-routines.c: fix pgdemo5 misbehaving of |
493 | 728 | pgolin/pglcur pgdemo5 with giza master branch draws all subsequent polygons in |
494 | 729 | black whereas PGPLOT draws subsequenct polygons in different colours |
495 | 730 | by incrementing colour index at each new polygon. |
496 | 731 | |
497 | 2018-08-16 haavee <hverkouter@gmail.com> | |
732 | 2018-08-16 Harro Verkouter <hverkouter@gmail.com> | |
498 | 733 | |
499 | 734 | * src/giza-viewport.c: Revert "fix PGPLOT incompatibility" This reverts commit e9644f6b098e54fb2cd246434d8d1c58fc6e1ba1. |
500 | 735 | Breaks pgdemo2 (pgvsiz() function). It was not specifically a bug or |
501 | 736 | fix and it doesn't hurt keeping the original code but it hurts not |
502 | 737 | keeping the original version ... ;-) |
503 | 738 | |
504 | 2018-08-16 haavee <hverkouter@gmail.com> | |
739 | 2018-08-16 Harro Verkouter <hverkouter@gmail.com> | |
505 | 740 | |
506 | 741 | * src/giza-driver-xw.c, src/giza-drivers.c: revert to drawing to |
507 | 742 | pixamp, XCopyArea to window Turns out there's code relying on drawing onto the pixmap and in |
520 | 755 | is the format string itself ... (*) |
521 | 756 | https://en.wikipedia.org/wiki/Printf_format_string#Parameter_field |
522 | 757 | |
523 | 2018-08-14 Harro Verkouter <verkouter@jive.eu> | |
758 | 2018-08-14 Harro Verkouter <hverkouter@gmail.com> | |
524 | 759 | |
525 | 760 | * src/giza-print-id.c: Fix compiler warning prototype for sprintf() missing |
526 | 761 | |
527 | 2018-08-14 Harro Verkouter <verkouter@jive.eu> | |
762 | 2018-08-14 Harro Verkouter <hverkouter@gmail.com> | |
528 | 763 | |
529 | 764 | * src/giza-cpgplot.c: fix off-by-one between external/internal |
530 | 765 | device id When using multiple open devices simultaneously, the returned device |
531 | 766 | id from cpgoen should be usable to later select that open device. |
532 | 767 | There was an extra +/- 1 mismatch between cpgopen and cpgslct. |
533 | 768 | |
534 | 2018-08-14 Harro Verkouter <verkouter@jive.eu> | |
769 | 2018-08-14 Harro Verkouter <hverkouter@gmail.com> | |
535 | 770 | |
536 | 771 | * src/giza-drivers-private.h, src/giza-drivers.c, src/giza-io.c: fix |
537 | 772 | compiler warning casting const away When splitting the device string sometimes 'const char*' was |
538 | 773 | assigned to 'char *' - which the compiler doesn't like. Fixed by changing prototype and destination data type of the split |
539 | 774 | string. |
540 | 775 | |
541 | 2018-08-14 Harro Verkouter <verkouter@jive.eu> | |
776 | 2018-08-14 Harro Verkouter <hverkouter@gmail.com> | |
542 | 777 | |
543 | 778 | * src/giza-io.c: fix warning about unused return value fgets() returns an error code and the caller is expected to check |
544 | 779 | that return valuer; compiler verifies this. |
545 | 780 | |
546 | 2018-08-14 Harro Verkouter <verkouter@jive.eu> | |
781 | 2018-08-14 Harro Verkouter <hverkouter@gmail.com> | |
547 | 782 | |
548 | 783 | * 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 |
549 | 784 | highly desirable property. The existing PGTBOX() from the PGPLOT source code was ported into an |
550 | 785 | initial working version, behaving identically, modulo porting bugs. |
551 | 786 | |
552 | 2018-08-14 Harro Verkouter <verkouter@jive.eu> | |
787 | 2018-08-14 Harro Verkouter <hverkouter@gmail.com> | |
553 | 788 | |
554 | 789 | * src/giza-scanner.l, src/lex.yy.c: Support for backspace (\b) in |
555 | 790 | printing strings For time labelling to look good it is 'necessary' to make the |
559 | 794 | the current version backing up to a previous character's position |
560 | 795 | was impossible. |
561 | 796 | |
562 | 2018-08-14 Harro Verkouter <verkouter@jive.eu> | |
797 | 2018-08-14 Harro Verkouter <hverkouter@gmail.com> | |
563 | 798 | |
564 | 799 | * src/giza-viewport.c: fix PGPLOT incompatibility When setting a viewport (pgsvp) the window should not be |
565 | 800 | automatically set (pgswin), cf. "pgsvp.f" source code |
566 | 801 | |
567 | 2018-08-14 Harro Verkouter <verkouter@jive.eu> | |
802 | 2018-08-14 Harro Verkouter <hverkouter@gmail.com> | |
568 | 803 | |
569 | 804 | * src/giza-io.c: fix warning about unused return value fgets() returns an error code and the caller is expected to check |
570 | 805 | that return valuer; compiler verifies this. |
571 | 806 | |
572 | 2018-08-14 Harro Verkouter <verkouter@jive.eu> | |
807 | 2018-08-14 Harro Verkouter <hverkouter@gmail.com> | |
573 | 808 | |
574 | 809 | * src/giza-drivers-private.h, src/giza-drivers.c, src/giza-io.c: fix |
575 | 810 | compiler warning casting const away When splitting the device string sometimes 'const char*' was |
576 | 811 | assigned to 'char *' - which the compiler doesn't like. Fixed by changing prototype and destination data type of the split |
577 | 812 | string. |
578 | 813 | |
579 | 2018-08-14 Harro Verkouter <verkouter@jive.eu> | |
814 | 2018-08-14 Harro Verkouter <hverkouter@gmail.com> | |
580 | 815 | |
581 | 816 | * src/giza-print-id.c: Fix compiler warning prototype for sprintf() missing |
582 | 817 | |
583 | 2018-08-14 Harro Verkouter <verkouter@jive.eu> | |
818 | 2018-08-14 Harro Verkouter <hverkouter@gmail.com> | |
584 | 819 | |
585 | 820 | * src/giza-driver-xw.c, src/giza-drivers.c: fix external XWindow |
586 | 821 | resize If plotting to an XWindow and the window was resized by the user |
591 | 826 | never updated. Thus even if the XWindow was made smaller/larger, |
592 | 827 | the amount of pixels actually drawn was never changed. |
593 | 828 | |
594 | 2018-08-14 Harro Verkouter <verkouter@jive.eu> | |
829 | 2018-08-14 Harro Verkouter <hverkouter@gmail.com> | |
595 | 830 | |
596 | 831 | * src/giza-cpgplot.c: fix off-by-one between external/internal |
597 | 832 | 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 |
0 | 0 | #! /bin/sh |
1 | 1 | # 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. | |
3 | 3 | # |
4 | 4 | # Report bugs to <daniel.price@monash.edu>. |
5 | 5 | # |
589 | 589 | # Identity of this package. |
590 | 590 | PACKAGE_NAME='giza' |
591 | 591 | 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' | |
594 | 594 | PACKAGE_BUGREPORT='daniel.price@monash.edu' |
595 | 595 | PACKAGE_URL='http://danieljprice.github.io/giza' |
596 | 596 | |
1348 | 1348 | # Omit some internal or obsolete options to make the list less imposing. |
1349 | 1349 | # This message is too long to be a string in the A/UX 3.1 sh. |
1350 | 1350 | 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. | |
1352 | 1352 | |
1353 | 1353 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1354 | 1354 | |
1418 | 1418 | |
1419 | 1419 | if test -n "$ac_init_help"; then |
1420 | 1420 | 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:";; | |
1422 | 1422 | esac |
1423 | 1423 | cat <<\_ACEOF |
1424 | 1424 | |
1548 | 1548 | test -n "$ac_init_help" && exit $ac_status |
1549 | 1549 | if $ac_init_version; then |
1550 | 1550 | cat <<\_ACEOF |
1551 | giza configure 1.2.0 | |
1551 | giza configure 1.3.1 | |
1552 | 1552 | generated by GNU Autoconf 2.69 |
1553 | 1553 | |
1554 | 1554 | Copyright (C) 2012 Free Software Foundation, Inc. |
1910 | 1910 | This file contains any messages produced by compilers while |
1911 | 1911 | running configure, to aid debugging if configure makes a mistake. |
1912 | 1912 | |
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 | |
1914 | 1914 | generated by GNU Autoconf 2.69. Invocation command line was |
1915 | 1915 | |
1916 | 1916 | $ $0 $@ |
2768 | 2768 | |
2769 | 2769 | # Define the identity of the package. |
2770 | 2770 | PACKAGE='giza' |
2771 | VERSION='1.2.0' | |
2771 | VERSION='1.3.1' | |
2772 | 2772 | |
2773 | 2773 | |
2774 | 2774 | cat >>confdefs.h <<_ACEOF |
4178 | 4178 | |
4179 | 4179 | GIZA_VERSION_MAJOR=1 |
4180 | 4180 | |
4181 | GIZA_VERSION_MINOR=2 | |
4182 | ||
4183 | GIZA_VERSION_MICRO=0 | |
4181 | GIZA_VERSION_MINOR=3 | |
4182 | ||
4183 | GIZA_VERSION_MICRO=1 | |
4184 | 4184 | |
4185 | 4185 | # |
4186 | 4186 | # The following specify the interface version numbers for giza. |
4196 | 4196 | # |
4197 | 4197 | LT_CURRENT=1 |
4198 | 4198 | |
4199 | LT_REVISION=0 | |
4199 | LT_REVISION=1 | |
4200 | 4200 | |
4201 | 4201 | LT_AGE=1 |
4202 | 4202 | |
16356 | 16356 | # report actual input values of CONFIG_FILES etc. instead of their |
16357 | 16357 | # values after options handling. |
16358 | 16358 | 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 | |
16360 | 16360 | generated by GNU Autoconf 2.69. Invocation command line was |
16361 | 16361 | |
16362 | 16362 | CONFIG_FILES = $CONFIG_FILES |
16423 | 16423 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
16424 | 16424 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
16425 | 16425 | ac_cs_version="\\ |
16426 | giza config.status 1.2.0 | |
16426 | giza config.status 1.3.1 | |
16427 | 16427 | configured by $0, generated by GNU Autoconf 2.69, |
16428 | 16428 | with options \\"\$ac_cs_config\\" |
16429 | 16429 |
0 | 0 | AC_PREREQ(2.61) |
1 | 1 | m4_define(giza_version_major,1) |
2 | m4_define(giza_version_minor,2) | |
2 | m4_define(giza_version_minor,3) | |
3 | 3 | m4_define(giza_version_micro,1) |
4 | 4 | AC_INIT([giza], |
5 | 5 | [giza_version_major.giza_version_minor.giza_version_micro], |
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 | #!/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"; |
38 | 38 | <dd><a href="#_giza_close_device_unchecked">_giza_close_device_unchecked</a></dd> |
39 | 39 | <dd><a href="#_giza_init_device_struct">_giza_init_device_struct</a></dd> |
40 | 40 | <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> | |
41 | 43 | <dd><a href="#giza_get_surface_size">giza_get_surface_size</a></dd> |
42 | 44 | <dd><a href="#giza_get_surface_size_float">giza_get_surface_size_float</a></dd> |
43 | 45 | <dd><a href="#giza_histogram">giza_histogram</a></dd> |
52 | 54 | <dt><a href="#Drawing">Drawing</a></dt> |
53 | 55 | <dd><a href="#giza_arrow">giza_arrow</a></dd> |
54 | 56 | <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> | |
55 | 59 | <dd><a href="#giza_box_time">giza_box_time</a></dd> |
56 | 60 | <dd><a href="#giza_box_time_float">giza_box_time_float</a></dd> |
57 | 61 | <dd><a href="#giza_box">giza_box</a></dd> |
99 | 103 | <dd><a href="#giza_render_gray_float">giza_render_gray_float</a></dd> |
100 | 104 | <dd><a href="#giza_draw_pixels">giza_draw_pixels</a></dd> |
101 | 105 | <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> | |
102 | 108 | <dd><a href="#giza_vector">giza_vector</a></dd> |
103 | 109 | <dd><a href="#giza_vector_float">giza_vector_float</a></dd> |
104 | 110 | <dt><a href="#Text">Text</a></dt> |
277 | 283 | <td>GIZA_UNITS_MM :</td><td>mm</td> |
278 | 284 | </tr><tr> |
279 | 285 | <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> | |
282 | 287 | <table class="proto"> |
283 | 288 | <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> |
284 | 289 | <h3><a name="giza_get_device_id">giza_get_device_id</a><hr></h3> |
285 | 290 | <table class="proto"> |
286 | 291 | <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> |
287 | 292 | <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> | |
290 | 294 | <table class="proto"> |
291 | 295 | <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> |
292 | 296 | <h4>Input:</h4> |
293 | 297 | <table class="api"><tr> |
294 | 298 | <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> | |
297 | 300 | <table class="proto"> |
298 | 301 | <tr><td width=10%>void</td><td width=20%>giza_flush_device</td><td> (void) ;</tr></table><p>Flushes the currently open device.</p> |
299 | 302 | <h3><a name="giza_change_page">giza_change_page</a><hr></h3> |
300 | 303 | <table class="proto"> |
301 | 304 | <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> | |
304 | 306 | <table class="proto"> |
305 | 307 | <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> |
306 | 308 | <h3><a name="giza_close_device">giza_close_device</a><hr></h3> |
318 | 320 | <table class="api"></table><h4>See https:</h4> |
319 | 321 | <table class="api"></table><h4>Input:</h4> |
320 | 322 | <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> | |
322 | 324 | </tr></table><h3><a name="giza_query_device">giza_query_device</a><hr></h3> |
323 | 325 | <table class="proto"> |
324 | 326 | <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> |
339 | 341 | <table class="api"></table><h4>"user" :</h4> |
340 | 342 | <table class="api"></table><h4>"cursor" :</h4> |
341 | 343 | <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> | |
343 | 354 | <table class="proto"> |
344 | 355 | <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> |
345 | 356 | <h4>Input:</h4> |
370 | 381 | <td>nbin :</td><td>number of bins</td> |
371 | 382 | </tr><tr> |
372 | 383 | <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> | |
375 | 385 | <table class="api"><tr> |
376 | 386 | <td>0 :</td><td>giza_histogram calls giza_environment to set up new plotting page</td> |
377 | 387 | </tr><tr> |
384 | 394 | <td>4 :</td><td>bins drawn as simple outlines, as in giza_histogram_binned, calls giza_environment</td> |
385 | 395 | </tr><tr> |
386 | 396 | <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> | |
388 | 398 | <table class="proto"> |
389 | 399 | <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> | |
392 | 401 | <table class="proto"> |
393 | 402 | <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> |
394 | 403 | <h4>Input:</h4> |
400 | 409 | <td>dat :</td><td>data values for each bin</td> |
401 | 410 | </tr><tr> |
402 | 411 | <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> | |
405 | 413 | <table class="proto"> |
406 | 414 | <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> | |
409 | 416 | <table class="proto"> |
410 | 417 | <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> |
411 | 418 | <h4>Input:</h4> |
413 | 420 | <td>nx :</td><td>number of sub-panels in x direction</td> |
414 | 421 | </tr><tr> |
415 | 422 | <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> | |
418 | 424 | <table class="proto"> |
419 | 425 | <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> |
420 | 426 | <h4>Input:</h4> |
422 | 428 | <td>ix :</td><td>panel index in x direction</td> |
423 | 429 | </tr><tr> |
424 | 430 | <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> | |
427 | 432 | <table class="proto"> |
428 | 433 | <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> |
429 | 434 | <h4>Input:</h4> |
431 | 436 | <td>ix :</td><td>panel index in x direction</td> |
432 | 437 | </tr><tr> |
433 | 438 | <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> | |
436 | 440 | <table class="proto"> |
437 | 441 | <tr><td width=10%>void</td><td width=20%>_giza_init_subpanel</td><td> () ;</tr></table><p>initialises subpanel settings for device</p> |
438 | 442 | <h3><a name="giza_advance_panel">giza_advance_panel</a><hr></h3> |
444 | 448 | <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> |
445 | 449 | <h4>Input:</h4> |
446 | 450 | <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> | |
455 | 459 | <table class="proto"> |
456 | 460 | <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> | |
458 | 514 | <table class="proto"> |
459 | 515 | <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> |
460 | 516 | <h4>Input:</h4> |
810 | 866 | </tr><tr> |
811 | 867 | <td>sizey :</td><td>The dimensions of data in the y-direction</td> |
812 | 868 | </tr><tr> |
813 | <td>data :</td><td>The data to be render</td> | |
869 | <td>data :</td><td>The data to be rendered</td> | |
814 | 870 | </tr><tr> |
815 | 871 | <td>i1 :</td><td>The inclusive range of data to render in the x dimension.</td> |
816 | 872 | </tr><tr> |
888 | 944 | </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> |
889 | 945 | <table class="proto"> |
890 | 946 | <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> | |
892 | 975 | <table class="proto"> |
893 | 976 | <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> |
894 | 977 | <h4>Input:</h4> |
1069 | 1152 | <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> |
1070 | 1153 | <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> |
1071 | 1154 | <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> | |
1073 | 1156 | <h4>Input:</h4> |
1074 | 1157 | <table class="api"><tr> |
1075 | 1158 | <td>ch :</td><td>the new character height</td> |
1091 | 1174 | <h4>Input:</h4> |
1092 | 1175 | <table class="api"><tr> |
1093 | 1176 | <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> | |
1095 | 1179 | <td>width :</td><td>will be set to the width of a character.</td> |
1096 | 1180 | </tr><tr> |
1097 | 1181 | <td>height :</td><td>will be set to the height of a character.</td> |
1247 | 1331 | <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> |
1248 | 1332 | <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> |
1249 | 1333 | <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> | |
1251 | 1335 | <h4>Note:</h4> |
1252 | 1336 | <table class="api"></table><h4>Input:</h4> |
1253 | 1337 | <table class="api"><tr> |
1291 | 1375 | </tr></table><h3><a name="giza_set_colour_table_float">giza_set_colour_table_float</a><hr></h3> |
1292 | 1376 | <table class="proto"> |
1293 | 1377 | <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> | |
1296 | 1379 | <table class="proto"> |
1297 | 1380 | <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> |
1298 | 1381 | <h4>Input:</h4> |
1304 | 1387 | <td>green :</td><td>Gets set to the green component of the colour at pos.</td> |
1305 | 1388 | </tr><tr> |
1306 | 1389 | <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> | |
1309 | 1391 | <table class="proto"> |
1310 | 1392 | <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> |
1311 | 1393 | <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> |
1651 | 1733 | </tr><tr> |
1652 | 1734 | <td>yanc :</td><td>the y-coord of the anchor point.</td> |
1653 | 1735 | </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> | |
1657 | 1739 | </tr><tr> |
1658 | 1740 | <td>ch :</td><td>Gets set to the character pressed by the user.</td> |
1659 | 1741 | </tr></table><h4>Return:</h4> |
0 | 0 | <table> |
1 | 1 | <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> |
2 | 2 | <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> | |
4 | 4 | <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> |
5 | 5 | <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> |
6 | 6 | <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> |
101 | 101 | <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> |
102 | 102 | <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> |
103 | 103 | <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> | |
105 | 105 | <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> |
106 | 106 | <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> |
107 | 107 | <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> |
109 | 109 | <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> |
110 | 110 | <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> |
111 | 111 | <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> |
23 | 23 | <p>This tutorial will show you the basics of using giza to create scientific plots |
24 | 24 | with a simple example. We will generate the following graph;</p> |
25 | 25 | <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> | |
27 | 27 | </table> |
28 | 28 | <br> |
29 | 29 | <p>Click <a href="gettingstarted.c">here</a> to get the source file, or read on for |
31 | 31 | <h2>PGPLOT interface</h2> |
32 | 32 | <p>Included with giza is a PGPLOT interface that allows code written using |
33 | 33 | 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> | |
35 | 35 | </div> |
36 | 36 | |
37 | 37 | </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 |
0 | 0 | <table> |
1 | 1 | <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> |
2 | 2 | <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> | |
4 | 4 | <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> |
5 | 5 | <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> |
6 | 6 | <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> |
105 | 105 | <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> |
106 | 106 | <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> |
107 | 107 | <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> | |
109 | 109 | <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> |
110 | 110 | <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> |
111 | 111 | <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> |
126 | 126 | <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> |
127 | 127 | <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> |
128 | 128 | </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 | <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> |
29 | 29 | PostScript, eps, png and svg.</p> |
30 | 30 | |
31 | 31 | <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> | |
33 | 33 | |
34 | 34 | <p> |
35 | 35 | Written by James Wetter and Daniel Price, initially as a backend for the |
20 | 20 | |
21 | 21 | <div id="content"> |
22 | 22 | <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> | |
27 | 30 | <p>2015.12.23: <a href="https://sourceforge.net/projects/giza/files/">0.9.4</a> released.</p> |
28 | 31 | <p>2015.04.28: <a href="https://sourceforge.net/projects/giza/files/">0.9.3</a> released.</p> |
29 | 32 | <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"; |
3 | 3 | |
4 | 4 | lib_LTLIBRARIES = libgiza.la libcpgplot.la libpgplot.la |
5 | 5 | |
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 \ | |
7 | 7 | giza-band-style.c giza-band.c giza-box-time.c giza-box.c \ |
8 | 8 | giza-buffering.c giza-character-size.c giza-circle.c \ |
9 | 9 | giza-clipping.c giza-colour-bar.c giza-colour-index.c \ |
20 | 20 | giza-paper.c giza-points.c giza-polygon.c giza-print-id.c \ |
21 | 21 | giza-prompting.c giza-ptext.c giza-qtext.c giza-rectangle.c \ |
22 | 22 | 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 \ | |
24 | 24 | giza-transforms.c giza-vector.c giza-viewport.c giza-version.c \ |
25 | 25 | giza-warnings.c giza-window.c giza.c lex.yy.c \ |
26 | 26 | giza-arrow-style-private.h giza-driver-svg-private.h giza-stroke-private.h \ |
27 | 27 | giza-band-private.h giza-driver-xw-private.h giza-subpanel-private.h \ |
28 | 28 | giza-character-size-private.h giza-drivers-private.h giza-text-background-private.h \ |
29 | 29 | 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 \ | |
31 | 31 | giza-driver-eps-private.h giza-line-style-private.h giza-version.h \ |
32 | 32 | giza-driver-null-private.h giza-private.h giza-viewport-private.h \ |
33 | 33 | giza-driver-pdf-private.h giza-render-private.h giza-warnings-private.h \ |
146 | 146 | libgiza_la_LIBADD = |
147 | 147 | am_libgiza_la_OBJECTS = libgiza_la-giza-annotate.lo \ |
148 | 148 | 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 \ | |
154 | 155 | libgiza_la-giza-colour-palette.lo \ |
155 | 156 | libgiza_la-giza-colour-table.lo libgiza_la-giza-contour.lo \ |
156 | 157 | libgiza_la-giza-cursor-routines.lo \ |
176 | 177 | libgiza_la-giza-save.lo libgiza_la-giza-set-font.lo \ |
177 | 178 | libgiza_la-giza-stroke.lo libgiza_la-giza-subpanel.lo \ |
178 | 179 | 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 | |
183 | 185 | libgiza_la_OBJECTS = $(am_libgiza_la_OBJECTS) |
184 | 186 | libgiza_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ |
185 | 187 | $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ |
209 | 211 | ./$(DEPDIR)/libgiza_la-giza-annotate.Plo \ |
210 | 212 | ./$(DEPDIR)/libgiza_la-giza-arrow-style.Plo \ |
211 | 213 | ./$(DEPDIR)/libgiza_la-giza-arrow.Plo \ |
214 | ./$(DEPDIR)/libgiza_la-giza-axis.Plo \ | |
212 | 215 | ./$(DEPDIR)/libgiza_la-giza-band-style.Plo \ |
213 | 216 | ./$(DEPDIR)/libgiza_la-giza-band.Plo \ |
214 | 217 | ./$(DEPDIR)/libgiza_la-giza-box-time.Plo \ |
266 | 269 | ./$(DEPDIR)/libgiza_la-giza-subpanel.Plo \ |
267 | 270 | ./$(DEPDIR)/libgiza_la-giza-text-background.Plo \ |
268 | 271 | ./$(DEPDIR)/libgiza_la-giza-text.Plo \ |
272 | ./$(DEPDIR)/libgiza_la-giza-tick.Plo \ | |
269 | 273 | ./$(DEPDIR)/libgiza_la-giza-transforms.Plo \ |
270 | 274 | ./$(DEPDIR)/libgiza_la-giza-vector.Plo \ |
271 | 275 | ./$(DEPDIR)/libgiza_la-giza-version.Plo \ |
490 | 494 | top_srcdir = @top_srcdir@ |
491 | 495 | CLEANFILES = *.mod *.pc |
492 | 496 | 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 \ | |
494 | 498 | giza-band-style.c giza-band.c giza-box-time.c giza-box.c \ |
495 | 499 | giza-buffering.c giza-character-size.c giza-circle.c \ |
496 | 500 | giza-clipping.c giza-colour-bar.c giza-colour-index.c \ |
507 | 511 | giza-paper.c giza-points.c giza-polygon.c giza-print-id.c \ |
508 | 512 | giza-prompting.c giza-ptext.c giza-qtext.c giza-rectangle.c \ |
509 | 513 | 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 \ | |
511 | 515 | giza-transforms.c giza-vector.c giza-viewport.c giza-version.c \ |
512 | 516 | giza-warnings.c giza-window.c giza.c lex.yy.c \ |
513 | 517 | giza-arrow-style-private.h giza-driver-svg-private.h giza-stroke-private.h \ |
514 | 518 | giza-band-private.h giza-driver-xw-private.h giza-subpanel-private.h \ |
515 | 519 | giza-character-size-private.h giza-drivers-private.h giza-text-background-private.h \ |
516 | 520 | 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 \ | |
518 | 522 | giza-driver-eps-private.h giza-line-style-private.h giza-version.h \ |
519 | 523 | giza-driver-null-private.h giza-private.h giza-viewport-private.h \ |
520 | 524 | giza-driver-pdf-private.h giza-render-private.h giza-warnings-private.h \ |
632 | 636 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-annotate.Plo@am__quote@ # am--include-marker |
633 | 637 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-arrow-style.Plo@am__quote@ # am--include-marker |
634 | 638 | @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 | |
635 | 640 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-band-style.Plo@am__quote@ # am--include-marker |
636 | 641 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-band.Plo@am__quote@ # am--include-marker |
637 | 642 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-box-time.Plo@am__quote@ # am--include-marker |
689 | 694 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-subpanel.Plo@am__quote@ # am--include-marker |
690 | 695 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-text-background.Plo@am__quote@ # am--include-marker |
691 | 696 | @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 | |
692 | 698 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-transforms.Plo@am__quote@ # am--include-marker |
693 | 699 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-vector.Plo@am__quote@ # am--include-marker |
694 | 700 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgiza_la-giza-version.Plo@am__quote@ # am--include-marker |
765 | 771 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
766 | 772 | @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 |
767 | 773 | |
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 | ||
768 | 781 | libgiza_la-giza-band-style.lo: giza-band-style.c |
769 | 782 | @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 |
770 | 783 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgiza_la-giza-band-style.Tpo $(DEPDIR)/libgiza_la-giza-band-style.Plo |
1163 | 1176 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='giza-text.c' object='libgiza_la-giza-text.lo' libtool=yes @AMDEPBACKSLASH@ |
1164 | 1177 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
1165 | 1178 | @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 | |
1166 | 1186 | |
1167 | 1187 | libgiza_la-giza-transforms.lo: giza-transforms.c |
1168 | 1188 | @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 |
1431 | 1451 | -rm -f ./$(DEPDIR)/libgiza_la-giza-annotate.Plo |
1432 | 1452 | -rm -f ./$(DEPDIR)/libgiza_la-giza-arrow-style.Plo |
1433 | 1453 | -rm -f ./$(DEPDIR)/libgiza_la-giza-arrow.Plo |
1454 | -rm -f ./$(DEPDIR)/libgiza_la-giza-axis.Plo | |
1434 | 1455 | -rm -f ./$(DEPDIR)/libgiza_la-giza-band-style.Plo |
1435 | 1456 | -rm -f ./$(DEPDIR)/libgiza_la-giza-band.Plo |
1436 | 1457 | -rm -f ./$(DEPDIR)/libgiza_la-giza-box-time.Plo |
1488 | 1509 | -rm -f ./$(DEPDIR)/libgiza_la-giza-subpanel.Plo |
1489 | 1510 | -rm -f ./$(DEPDIR)/libgiza_la-giza-text-background.Plo |
1490 | 1511 | -rm -f ./$(DEPDIR)/libgiza_la-giza-text.Plo |
1512 | -rm -f ./$(DEPDIR)/libgiza_la-giza-tick.Plo | |
1491 | 1513 | -rm -f ./$(DEPDIR)/libgiza_la-giza-transforms.Plo |
1492 | 1514 | -rm -f ./$(DEPDIR)/libgiza_la-giza-vector.Plo |
1493 | 1515 | -rm -f ./$(DEPDIR)/libgiza_la-giza-version.Plo |
1546 | 1568 | -rm -f ./$(DEPDIR)/libgiza_la-giza-annotate.Plo |
1547 | 1569 | -rm -f ./$(DEPDIR)/libgiza_la-giza-arrow-style.Plo |
1548 | 1570 | -rm -f ./$(DEPDIR)/libgiza_la-giza-arrow.Plo |
1571 | -rm -f ./$(DEPDIR)/libgiza_la-giza-axis.Plo | |
1549 | 1572 | -rm -f ./$(DEPDIR)/libgiza_la-giza-band-style.Plo |
1550 | 1573 | -rm -f ./$(DEPDIR)/libgiza_la-giza-band.Plo |
1551 | 1574 | -rm -f ./$(DEPDIR)/libgiza_la-giza-box-time.Plo |
1603 | 1626 | -rm -f ./$(DEPDIR)/libgiza_la-giza-subpanel.Plo |
1604 | 1627 | -rm -f ./$(DEPDIR)/libgiza_la-giza-text-background.Plo |
1605 | 1628 | -rm -f ./$(DEPDIR)/libgiza_la-giza-text.Plo |
1629 | -rm -f ./$(DEPDIR)/libgiza_la-giza-tick.Plo | |
1606 | 1630 | -rm -f ./$(DEPDIR)/libgiza_la-giza-transforms.Plo |
1607 | 1631 | -rm -f ./$(DEPDIR)/libgiza_la-giza-vector.Plo |
1608 | 1632 | -rm -f ./$(DEPDIR)/libgiza_la-giza-version.Plo |
36 | 36 | * by giza_set_arrow_style. |
37 | 37 | * |
38 | 38 | * 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 | |
43 | 43 | * |
44 | * See Also: giza_set_arrow_style | |
44 | * See Also: giza_set_arrow_style, giza_arrow_float | |
45 | 45 | */ |
46 | 46 | void |
47 | 47 | giza_arrow (double x1, double y1, double x2, double y2) |
101 | 101 | dxPerp = dxPerp / magnitude; |
102 | 102 | dyPerp = dyPerp / magnitude; |
103 | 103 | } |
104 | ||
104 | ||
105 | 105 | if (magnitude > 0) |
106 | 106 | { |
107 | 107 | dx = dx/magnitude; |
119 | 119 | xpts[0] = x2; |
120 | 120 | ypts[0] = y2; |
121 | 121 | |
122 | /* 'above' the unit vector | |
122 | /* 'above' the unit vector | |
123 | 123 | * Note that we want the hypoteneuse of the arrow head |
124 | 124 | * to always have same length regardless of the angle: |
125 | 125 | * |\ |
126 | 126 | * b | \ r |
127 | * | \ | |
127 | * | \ | |
128 | 128 | * -----| \ |
129 | 129 | * hence we use sin(angle) = b/r, with r=1 to get b. |
130 | 130 | */ |
173 | 173 | * |
174 | 174 | * Synopsis: Same functionality as giza_arrow. |
175 | 175 | * |
176 | * See Also: giza_arrow_float | |
176 | * See Also: giza_arrow, giza_set_arrow_style | |
177 | 177 | */ |
178 | 178 | void |
179 | 179 | 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 | } |
44 | 44 | * if 0 the cursor is not moved. |
45 | 45 | * -xanc :- the x-coord of the anchor point. |
46 | 46 | * -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. | |
49 | 49 | * -ch :- Gets set to the character pressed by the user. |
50 | 50 | * |
51 | 51 | * Return: |
139 | 139 | int x1 = xanc[nanc-1]; |
140 | 140 | int y1 = yanc[nanc-1]; |
141 | 141 | int i,j; |
142 | ||
142 | ||
143 | 143 | switch (mode) |
144 | 144 | { |
145 | 145 | case 1: /* Straight line */ |
148 | 148 | if (j==0) { |
149 | 149 | cairo_set_source_rgba (Band.box,1.,1.,1.,0.2); |
150 | 150 | } 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); | |
152 | 152 | } |
153 | 153 | cairo_move_to (Band.box, xanc[0], yanc[0]); |
154 | 154 | for (i=1;i<=nanc-1;i++) { |
234 | 234 | /* remove the last band */ |
235 | 235 | giza_flush_device (); |
236 | 236 | } |
237 |
31 | 31 | #include "giza.h" |
32 | 32 | #include <math.h> |
33 | 33 | #include <stdio.h> |
34 | ||
35 | static void _giza_tick_intervals (double xmin, double xmax, double xinterval, | |
36 | int *i1, int *i2); | |
37 | 34 | |
38 | 35 | /** |
39 | 36 | * Drawing: giza_box |
75 | 72 | */ |
76 | 73 | void |
77 | 74 | 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) | |
79 | 76 | { |
80 | 77 | if (!_giza_check_device_ready ("giza_box")) |
81 | 78 | return; |
150 | 147 | case ('S'): |
151 | 148 | xdraw_minticks = 1; |
152 | 149 | 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. */ | |
154 | 151 | case ('n'): |
155 | 152 | case ('m'): |
156 | 153 | case ('N'): |
206 | 203 | case ('S'): |
207 | 204 | ydraw_minticks = 1; |
208 | 205 | 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. */ | |
210 | 207 | case ('n'): |
211 | 208 | case ('m'): |
212 | 209 | case ('N'): |
241 | 238 | /* Note: -P :- extend ("Project") major tick marks outside the box (ignored if |
242 | 239 | option I is specified). |
243 | 240 | 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; | |
248 | 245 | |
249 | 246 | int oldTrans = _giza_get_trans (); |
250 | 247 | _giza_set_trans (GIZA_TRANS_WORLD); |
269 | 266 | else if (_giza_equal(xtick,0.)) |
270 | 267 | { |
271 | 268 | xintervalMaj = |
272 | 7. * Dev[id].fontExtents.max_x_advance / | |
269 | 7. * Dev[id].fontExtents.max_x_advance / | |
273 | 270 | ((Dev[id].VP.xmax - Dev[id].VP.xmin)*Dev[id].width); |
274 | 271 | if (xintervalMaj > 0.2) |
275 | 272 | xintervalMaj = 0.2; |
425 | 422 | else if (_giza_equal(ytick,0.)) |
426 | 423 | { |
427 | 424 | yintervalMaj = |
428 | 7. * Dev[id].fontExtents.max_x_advance / | |
425 | 7. * Dev[id].fontExtents.max_x_advance / | |
429 | 426 | ((Dev[id].VP.ymax - Dev[id].VP.ymin) * Dev[id].height); |
430 | 427 | if (yintervalMaj > 0.2) yintervalMaj = 0.2; |
431 | 428 | if (yintervalMaj < 0.05) yintervalMaj = 0.05; |
524 | 521 | giza_format_number (i*nv, np, Dev[id].number_format, tmp, sizeof(tmp)); |
525 | 522 | } |
526 | 523 | |
527 | if (ylabel_unconventional) | |
524 | if (ylabel_unconventional) | |
528 | 525 | { |
529 | 526 | if (ydraw_vertical) |
530 | 527 | giza_annotate ("RV", .7, yratio, 0., tmp); |
556 | 553 | yval = pow (10, yval); |
557 | 554 | giza_format_number (j+1, _giza_nint (i*yintervalMin), Dev[id].number_format, tmp, sizeof(tmp)); |
558 | 555 | |
559 | if (ylabel_unconventional) | |
556 | if (ylabel_unconventional) | |
560 | 557 | { |
561 | 558 | if (ydraw_vertical) |
562 | 559 | giza_annotate ("RV", .7, yratio, 0., tmp); |
657 | 654 | /** |
658 | 655 | * Works out which intervals in which to draw ticks. |
659 | 656 | */ |
660 | static void | |
657 | void | |
661 | 658 | _giza_tick_intervals (double xmin, double xmax, double xinterval, int *i1, |
662 | 659 | int *i2) |
663 | 660 | { |
30 | 30 | * Settings: giza_set_character_height |
31 | 31 | * |
32 | 32 | * 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 | |
33 | 35 | * |
34 | 36 | * Input: |
35 | 37 | * -ch :- the new character height |
113 | 115 | * |
114 | 116 | * Input: |
115 | 117 | * -units :- select the units the result will be returned in. |
118 | * | |
119 | * Output: | |
116 | 120 | * -width :- will be set to the width of a character. |
117 | 121 | * -height :- will be set to the height of a character. |
118 | 122 | * |
124 | 124 | * |
125 | 125 | * Synopsis: Same functionality as giza_set_colour_table but takes floats |
126 | 126 | * |
127 | * See also: giza_set_colour_table | |
127 | * See Also: giza_set_colour_table | |
128 | 128 | */ |
129 | 129 | int |
130 | 130 | giza_set_colour_table_float (const float *controlPoints, const float *red, const float *green, const float *blue, int n, |
163 | 163 | * -green :- Gets set to the green component of the colour at pos. |
164 | 164 | * -blue :- Gets set to the blue component of the colour at pos. |
165 | 165 | * |
166 | * See also: giza_set_colour_table | |
166 | * See Also: giza_set_colour_table | |
167 | 167 | */ |
168 | 168 | void |
169 | 169 | giza_rgb_from_table (double pos, double *red, double *green, double *blue) |
107 | 107 | |
108 | 108 | /*************************************************************** |
109 | 109 | * cpgaxis -- draw an axis |
110 | * Status: NOT IMPLEMENTED | |
110 | * Status: IMPLEMENTED | |
111 | 111 | ***************************************************************/ |
112 | 112 | void cpgaxis(const char *opt, float x1, float y1, float x2, float y2, \ |
113 | 113 | float v1, float v2, float step, int nsub, float dmajl, \ |
114 | 114 | float dmajr, float fmin, float disp, float orient) |
115 | 115 | { |
116 | ||
116 | giza_axis_float(opt,x1,y1,x2,y2,v1,v2,step,nsub,dmajl,dmajr,fmin,disp,orient); | |
117 | 117 | } |
118 | 118 | |
119 | 119 | /*************************************************************** |
500 | 500 | * Status: IMPLEMENTED |
501 | 501 | * Update: In order to prevent memory corruption by |
502 | 502 | * 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 | |
504 | 504 | * buffer allocated by the caller. |
505 | 505 | * PGPLOT c-binding does this, perl-PGPLOT5 does this |
506 | 506 | * and giza's F90 wrapper's been changed to do this |
764 | 764 | snprintf(giza_version_string, sizeof(giza_version_string), "giza-%s", GIZA_VERSION_STRING); |
765 | 765 | /* Copy at most *value_length-1 characters into value - note: strncpy(3) |
766 | 766 | 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 | |
768 | 768 | to have it) so we tediously do it by hand */ |
769 | 769 | strncpy(value, giza_version_string, last_char); |
770 | 770 | } |
1155 | 1155 | |
1156 | 1156 | /*************************************************************** |
1157 | 1157 | * cpgtick -- draw a single tick mark on an axis |
1158 | * Status: NOT IMPLEMENTED | |
1158 | * Status: IMPLEMENTED | |
1159 | 1159 | ***************************************************************/ |
1160 | 1160 | void cpgtick(float x1, float y1, float x2, float y2, float v, \ |
1161 | 1161 | float tikl, float tikr, float disp, float orient, const char *str) |
1162 | 1162 | { |
1163 | ||
1163 | giza_tick_float(x1,y1,x2,y2,v,tikl,tikr,disp,orient,str); | |
1164 | 1164 | } |
1165 | 1165 | |
1166 | 1166 | /*************************************************************** |
29 | 29 | void _giza_change_page_xw (void); |
30 | 30 | void _giza_close_device_xw (void); |
31 | 31 | 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, | |
33 | 34 | double *x, double *y, char *ch); |
34 | 35 | int _giza_init_band_xw (void); |
35 | 36 | int _giza_select_xw(int devid); |
376 | 376 | XSelectInput (XW[id].display, XW[id].window, ExposureMask | KeyPressMask | ButtonPressMask | PointerMotionMask); |
377 | 377 | |
378 | 378 | _giza_init_band (mode); |
379 | _giza_expand_clipping_xw(); | |
379 | 380 | |
380 | 381 | while(1) { |
381 | 382 | |
417 | 418 | |
418 | 419 | _giza_destroy_band (mode); |
419 | 420 | _giza_flush_xw_event_queue(&event); |
421 | _giza_reset_clipping_xw(); | |
420 | 422 | return; |
421 | 423 | }; |
422 | 424 | |
425 | 427 | case ButtonPress: |
426 | 428 | { |
427 | 429 | *x = event.xbutton.x ;/*- GIZA_XW_MARGIN; */ |
428 | *y = event.xbutton.y ;/*- GIZA_XW_MARGIN; */ | |
430 | *y = event.xbutton.y ;/*- GIZA_XW_MARGIN; */ | |
429 | 431 | switch(event.xbutton.button) { |
430 | 432 | case Button1: |
431 | 433 | if (event.xbutton.state==1) { |
458 | 460 | } |
459 | 461 | _giza_destroy_band (mode); |
460 | 462 | _giza_flush_xw_event_queue(&event); |
461 | return; | |
463 | _giza_reset_clipping_xw(); | |
464 | return; | |
462 | 465 | } |
463 | 466 | case MotionNotify: |
464 | 467 | { |
466 | 469 | while(XCheckWindowEvent(XW[id].display, XW[id].window, |
467 | 470 | (long)(PointerMotionMask), &event) == True); |
468 | 471 | |
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 | ||
469 | 483 | _giza_refresh_band (mode, nanc, anchorx, anchory, event.xmotion.x, event.xmotion.y); |
470 | 484 | _giza_flush_xw_event_queue(&event); |
471 | 485 | } |
528 | 542 | cairo_reset_clip (Dev[id].context); |
529 | 543 | cairo_rectangle (Dev[id].context, 0, 0, XW[id].width, XW[id].height); |
530 | 544 | 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 | ||
531 | 557 | } |
532 | 558 | |
533 | 559 | /** |
126 | 126 | * -GIZA_UNITS_INCHES :- inches |
127 | 127 | * Other values cause an error message and are treated as GIZA_UNITS_DEVICE |
128 | 128 | * |
129 | * See also: giza_open_device | |
129 | * See Also: giza_open_device | |
130 | 130 | */ |
131 | 131 | int |
132 | 132 | giza_open_device_size (const char *newDeviceName, const char *newPrefix, double width, double height, int units) |
256 | 256 | * These routines check for Dev[id].deviceOpen so we must set that */ |
257 | 257 | Dev[id].deviceOpen = 1; |
258 | 258 | Dev[id].defaultBackgroundAlpha = 1.; |
259 | Dev[id].motion_callback = NULL; | |
259 | 260 | |
260 | 261 | giza_set_text_background (-1); |
261 | 262 | giza_start_prompting (); |
315 | 316 | * Output: |
316 | 317 | * -devid, as returned by giza_open_device |
317 | 318 | * |
318 | * See also: giza_open_device, giza_get_device_id | |
319 | * See Also: giza_open_device, giza_get_device_id | |
319 | 320 | */ |
320 | 321 | void |
321 | 322 | giza_get_device_id (int *devid) |
332 | 333 | * Input: |
333 | 334 | * -devid :- device id, as returned by giza_open_device |
334 | 335 | * |
335 | * See also: giza_get_device_id, giza_open_device | |
336 | * See Also: giza_get_device_id, giza_open_device | |
336 | 337 | */ |
337 | 338 | void |
338 | 339 | giza_select_device (int devid) |
396 | 397 | * the background. If no other actions have been performed since the device was |
397 | 398 | * opened or the last call to giza_change_page the call is ignored. |
398 | 399 | * |
399 | * See also: giza_subpanel, giza_set_panel | |
400 | * See Also: giza_subpanel, giza_set_panel | |
400 | 401 | */ |
401 | 402 | void |
402 | 403 | giza_change_page (void) |
541 | 542 | |
542 | 543 | |
543 | 544 | /** |
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 | |
547 | 546 | * giza_close_device() and giza_open_device_size() [when something fails |
548 | 547 | * during the construction of a new device] the actual cleaning up code |
549 | 548 | * is put in this internal function. |
607 | 606 | } |
608 | 607 | |
609 | 608 | /** |
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: | |
613 | 610 | * the whole struct is zeroed out and .type is set to GIZA_DEVICE_IV. |
614 | 611 | * |
615 | 612 | * Note: this approach was chosen over having a static/const/global |
721 | 718 | } |
722 | 719 | returnval[max_chars] = '\0'; /* make sure string is null-terminated */ |
723 | 720 | 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 | ||
724 | 773 | } |
725 | 774 | |
726 | 775 | /** |
36 | 36 | giza_set_arrow_style, & |
37 | 37 | giza_get_arrow_style, & |
38 | 38 | giza_annotate, & |
39 | giza_axis, & | |
39 | 40 | giza_band, & |
40 | 41 | giza_box, & |
41 | 42 | giza_box_time, & |
72 | 73 | giza_close_device, & |
73 | 74 | giza_close, & |
74 | 75 | giza_get_key_press, & |
76 | giza_set_motion_callback, & | |
77 | giza_end_motion_callback, & | |
75 | 78 | giza_device_has_cursor, & |
76 | 79 | giza_draw, & |
77 | 80 | giza_draw_background, & |
131 | 134 | giza_subpanel, & |
132 | 135 | giza_set_panel, & |
133 | 136 | giza_get_panel, & |
137 | giza_tick, & | |
134 | 138 | giza_vector, & |
135 | 139 | giza_set_viewport_default, & |
136 | 140 | giza_set_viewport, & |
218 | 222 | import |
219 | 223 | real(kind=c_double),intent(in),value :: x1,y1,x2,y2 |
220 | 224 | end subroutine giza_arrow |
221 | ||
225 | ||
222 | 226 | subroutine giza_arrow_float(x1,y1,x2,y2) bind(C) |
223 | 227 | import |
224 | 228 | real(kind=c_float),intent(in),value :: x1,y1,x2,y2 |
251 | 255 | integer(kind=c_int),intent(out) :: fillStyle |
252 | 256 | real(kind=c_float) ,intent(out) :: angle,cutback |
253 | 257 | 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 | |
254 | 304 | end interface |
255 | 305 | |
256 | 306 | interface giza_band |
276 | 326 | interface giza_annotate |
277 | 327 | module procedure giza_intern_annotate_f2c |
278 | 328 | end interface |
279 | ||
329 | ||
280 | 330 | interface giza_annotate_c |
281 | 331 | subroutine giza_annotate_c (side,displacement,coord,justification,text) bind(C,name="giza_annotate") |
282 | 332 | import |
283 | 333 | character(kind=c_char),dimension(*),intent(in) :: side,text |
284 | 334 | real(kind=c_double),intent(in),value ::displacement,coord,justification |
285 | 335 | end subroutine giza_annotate_c |
286 | ||
336 | ||
287 | 337 | subroutine giza_annotate_float_c (side,displacement,coord,justification,text) bind(C,name="giza_annotate_float") |
288 | 338 | import |
289 | 339 | character(kind=c_char),dimension(*),intent(in) :: side,text |
290 | 340 | real(kind=c_float),intent(in),value ::displacement,coord,justification |
291 | 341 | end subroutine giza_annotate_float_c |
292 | 342 | end interface |
293 | ||
343 | ||
294 | 344 | interface giza_box |
295 | 345 | module procedure giza_intern_box_f2c |
296 | 346 | end interface |
298 | 348 | interface giza_box_time |
299 | 349 | module procedure giza_intern_box_time_f2c |
300 | 350 | end interface |
301 | ||
351 | ||
302 | 352 | interface giza_box_c |
303 | 353 | subroutine giza_box_float_c(xopt,xtick,nxsub,yopt,ytick,nysub) bind(C,name="giza_box_float") |
304 | 354 | import |
306 | 356 | real(kind=c_float), value, intent(in) :: xtick,ytick |
307 | 357 | integer(kind=c_int), value, intent(in) :: nxsub,nysub |
308 | 358 | end subroutine giza_box_float_c |
309 | ||
359 | ||
310 | 360 | subroutine giza_box_c(xopt,xtick,nxsub,yopt,ytick,nysub) bind(C,name="giza_box") |
311 | 361 | import |
312 | 362 | character(kind=c_char),dimension(*), intent(in) :: xopt,yopt |
322 | 372 | real(kind=c_float), value, intent(in) :: xtick,ytick |
323 | 373 | integer(kind=c_int), value, intent(in) :: nxsub,nysub |
324 | 374 | end subroutine giza_box_time_float_c |
325 | ||
375 | ||
326 | 376 | subroutine giza_box_time_c(xopt,xtick,nxsub,yopt,ytick,nysub) bind(C,name="giza_box_time") |
327 | 377 | import |
328 | 378 | character(kind=c_char),dimension(*), intent(in) :: xopt,yopt |
358 | 408 | end subroutine giza_circle_float |
359 | 409 | end interface |
360 | 410 | |
361 | interface giza_set_character_height | |
411 | interface giza_set_character_height | |
362 | 412 | subroutine giza_set_character_height(ch) bind(C) |
363 | 413 | import |
364 | 414 | real(kind=c_double),intent(in),value :: ch |
365 | 415 | end subroutine giza_set_character_height |
366 | ||
416 | ||
367 | 417 | subroutine giza_set_character_height_float(ch) bind(C) |
368 | 418 | import |
369 | 419 | real(kind=c_float),intent(in),value :: ch |
370 | 420 | end subroutine giza_set_character_height_float |
371 | 421 | end interface |
372 | ||
422 | ||
373 | 423 | interface giza_get_character_height |
374 | 424 | subroutine giza_get_character_height(ch) bind(C) |
375 | 425 | import |
376 | 426 | real(kind=c_double),intent(out) :: ch |
377 | 427 | end subroutine giza_get_character_height |
378 | ||
428 | ||
379 | 429 | subroutine giza_get_character_height_float(ch) bind(C) |
380 | 430 | import |
381 | 431 | real(kind=c_float),intent(out) :: ch |
388 | 438 | integer(kind=c_int),intent(in),value :: units |
389 | 439 | real(kind=c_double),intent(out) :: xch,ych |
390 | 440 | end subroutine giza_get_character_size |
391 | ||
441 | ||
392 | 442 | subroutine giza_get_character_size_float(units,xch,ych) bind(C) |
393 | 443 | import |
394 | 444 | integer(kind=c_int),intent(in),value :: units |
469 | 519 | integer(kind=c_int), value, intent(in) :: ci |
470 | 520 | real(kind=c_float), value, intent(in) :: red,green,blue |
471 | 521 | end subroutine giza_set_colour_representation_float |
472 | ||
522 | ||
473 | 523 | subroutine giza_set_colour_representation(ci,red,green,blue) bind(C) |
474 | 524 | import |
475 | 525 | integer(kind=c_int), value, intent(in) :: ci |
481 | 531 | integer(kind=c_int), value, intent(in) :: ci |
482 | 532 | real(kind=c_float), value, intent(in) :: red,green,blue,alpha |
483 | 533 | end subroutine giza_set_colour_representation_alpha_float |
484 | ||
534 | ||
485 | 535 | subroutine giza_set_colour_representation_alpha(ci,red,green,blue,alpha) bind(C) |
486 | 536 | import |
487 | 537 | integer(kind=c_int), value, intent(in) :: ci |
495 | 545 | integer(kind=c_int),intent(in),value :: ci |
496 | 546 | real(kind=c_double),intent(out) :: red,green,blue |
497 | 547 | end subroutine giza_get_colour_representation |
498 | ||
548 | ||
499 | 549 | subroutine giza_get_colour_representation_float(ci,red,green,blue) bind(C) |
500 | 550 | import |
501 | 551 | integer(kind=c_int),intent(in),value :: ci |
507 | 557 | integer(kind=c_int),intent(in),value :: ci |
508 | 558 | real(kind=c_double),intent(out) :: red,green,blue,alpha |
509 | 559 | end subroutine giza_get_colour_representation_alpha |
510 | ||
560 | ||
511 | 561 | subroutine giza_get_colour_representation_alpha_float(ci,red,green,blue,alpha) bind(C) |
512 | 562 | import |
513 | 563 | integer(kind=c_int),intent(in),value :: ci |
536 | 586 | real(kind=c_double),intent(in),dimension(n) :: controlPoints,red,green,blue |
537 | 587 | real(kind=c_double),intent(in),value :: cont,bright |
538 | 588 | end subroutine giza_set_colour_table |
539 | ||
589 | ||
540 | 590 | subroutine giza_set_colour_table_float(controlPoints,red,green,blue,n,cont,bright) bind(C) |
541 | 591 | import |
542 | 592 | integer(kind=c_int),intent(in),value :: n |
553 | 603 | real(kind=c_double),intent(in) :: cont(ncont) |
554 | 604 | real(kind=c_double),intent(in) :: affine(6) |
555 | 605 | end subroutine giza_contour |
556 | ||
606 | ||
557 | 607 | subroutine giza_contour_float(sizex,sizey,data,i1,i2,j1,j2,ncont,cont,affine) bind(C) |
558 | 608 | import |
559 | 609 | integer(kind=c_int),intent(in),value :: sizex,sizey,i1,i2,j1,j2,ncont |
568 | 618 | import |
569 | 619 | real(kind=c_double),intent(out) :: xpt,ypt |
570 | 620 | end subroutine giza_get_current_point |
571 | ||
621 | ||
572 | 622 | subroutine giza_get_current_point_float(xpt,ypt) bind(C) |
573 | 623 | import |
574 | 624 | real(kind=c_float),intent(out) :: xpt,ypt |
627 | 677 | integer(kind=c_int),intent(in),value :: units |
628 | 678 | end function giza_open_device_size_float_c |
629 | 679 | end interface |
630 | ||
680 | ||
631 | 681 | ! device_has_cursor is logical in Fortran but int in c |
632 | 682 | ! (cannot do a generic interface for int/logical), can call c version directly with _int version |
633 | 683 | interface giza_device_has_cursor |
687 | 737 | end function giza_get_key_press_float |
688 | 738 | end interface |
689 | 739 | |
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 | ||
690 | 761 | interface giza_draw |
691 | 762 | subroutine giza_draw(x,y) bind(C) |
692 | 763 | import |
701 | 772 | |
702 | 773 | interface giza_draw_background |
703 | 774 | subroutine giza_draw_background() bind(C) |
704 | end subroutine | |
775 | end subroutine giza_draw_background | |
705 | 776 | end interface |
706 | 777 | |
707 | 778 | interface giza_set_environment |
772 | 843 | integer(kind=c_int),intent(in),value :: fs |
773 | 844 | end subroutine giza_set_fill |
774 | 845 | end interface |
775 | ||
846 | ||
776 | 847 | interface giza_get_fill |
777 | 848 | subroutine giza_get_fill(fs) bind(C) |
778 | 849 | import |
886 | 957 | real(kind=c_double),intent(out) :: x1,x2,y1,y2 |
887 | 958 | end subroutine giza_get_surface_size |
888 | 959 | end interface |
889 | ||
960 | ||
890 | 961 | interface giza_set_hatching_style |
891 | 962 | subroutine giza_set_hatching_style(angle,spacing,phase) bind(C) |
892 | 963 | import |
944 | 1015 | interface giza_label |
945 | 1016 | module procedure giza_intern_label_f2c |
946 | 1017 | end interface |
947 | ||
1018 | ||
948 | 1019 | interface giza_label_c |
949 | 1020 | subroutine giza_label_c (labelx,labely,title) bind(C,name="giza_label") |
950 | 1021 | import |
965 | 1036 | real(kind=c_double),intent(in),dimension(n) :: xpts,ypts |
966 | 1037 | end subroutine giza_line |
967 | 1038 | end interface |
968 | ||
1039 | ||
969 | 1040 | interface giza_set_line_width |
970 | 1041 | subroutine giza_set_line_width(lw) bind(C) |
971 | 1042 | import |
972 | 1043 | real(kind=c_double),intent(in), value :: lw |
973 | 1044 | end subroutine giza_set_line_width |
974 | ||
1045 | ||
975 | 1046 | subroutine giza_set_line_width_float(lw) bind(C) |
976 | 1047 | import |
977 | 1048 | real(kind=c_float),intent(in), value :: lw |
978 | 1049 | end subroutine giza_set_line_width_float |
979 | ||
1050 | ||
980 | 1051 | module procedure giza_intern_set_line_width_int |
981 | 1052 | end interface |
982 | ||
1053 | ||
983 | 1054 | interface giza_get_line_width |
984 | 1055 | subroutine giza_get_line_width(lw) bind(C) |
985 | 1056 | import |
986 | 1057 | real(kind=c_double),intent(out) :: lw |
987 | 1058 | end subroutine giza_get_line_width |
988 | ||
1059 | ||
989 | 1060 | subroutine giza_get_line_width_float(lw) bind(C) |
990 | 1061 | import |
991 | 1062 | real(kind=c_float),intent(out) :: lw |
992 | 1063 | end subroutine giza_get_line_width_float |
993 | ||
1064 | ||
994 | 1065 | module procedure giza_intern_get_line_width_int |
995 | 1066 | end interface |
996 | 1067 | |
1021 | 1092 | integer(c_int),intent(out) :: ls |
1022 | 1093 | end subroutine giza_get_line_style |
1023 | 1094 | end interface |
1024 | ||
1095 | ||
1025 | 1096 | interface giza_mark_line |
1026 | 1097 | subroutine giza_mark_line(maxpts,npts,xpts,ypts) bind(C) |
1027 | 1098 | import |
1030 | 1101 | real(kind=c_double), dimension(*), intent(inout) :: xpts |
1031 | 1102 | real(kind=c_double), dimension(*), intent(inout) :: ypts |
1032 | 1103 | end subroutine giza_mark_line |
1033 | ||
1104 | ||
1034 | 1105 | subroutine giza_mark_line_float(maxpts,npts,xpts,ypts) bind(C) |
1035 | 1106 | import |
1036 | 1107 | integer(kind=c_int),intent(in),value :: maxpts |
1047 | 1118 | real(kind=c_double), dimension(*), intent(inout) :: ypts |
1048 | 1119 | character(kind=c_char),intent(out) :: ch |
1049 | 1120 | end subroutine giza_mark_line_char |
1050 | ||
1121 | ||
1051 | 1122 | subroutine giza_mark_line_char_float(maxpts,npts,xpts,ypts,ch) bind(C) |
1052 | 1123 | import |
1053 | 1124 | integer(kind=c_int),intent(in),value :: maxpts |
1066 | 1137 | real(kind=c_double), dimension(*), intent(inout) :: xpts |
1067 | 1138 | real(kind=c_double), dimension(*), intent(inout) :: ypts |
1068 | 1139 | end subroutine giza_mark_line_ordered |
1069 | ||
1140 | ||
1070 | 1141 | subroutine giza_mark_line_ordered_float(maxpts,npts,xpts,ypts) bind(C) |
1071 | 1142 | import |
1072 | 1143 | integer(kind=c_int),intent(in),value :: maxpts |
1085 | 1156 | real(kind=c_double), dimension(*), intent(inout) :: ypts |
1086 | 1157 | integer(kind=c_int),intent(in),value :: symbol |
1087 | 1158 | end subroutine giza_mark_points |
1088 | ||
1159 | ||
1089 | 1160 | subroutine giza_mark_points_float(maxpts,npts,xpts,ypts,symbol) bind(C) |
1090 | 1161 | import |
1091 | 1162 | integer(kind=c_int),intent(in),value :: maxpts |
1105 | 1176 | real(kind=c_double), dimension(*), intent(inout) :: ypts |
1106 | 1177 | integer(kind=c_int),intent(in),value :: symbol |
1107 | 1178 | end subroutine giza_mark_points_ordered |
1108 | ||
1179 | ||
1109 | 1180 | subroutine giza_mark_points_ordered_float(maxpts,npts,xpts,ypts,symbol) bind(C) |
1110 | 1181 | import |
1111 | 1182 | integer(kind=c_int),intent(in),value :: maxpts |
1115 | 1186 | integer(kind=c_int),intent(in),value :: symbol |
1116 | 1187 | end subroutine giza_mark_points_ordered_float |
1117 | 1188 | end interface |
1118 | ||
1189 | ||
1119 | 1190 | interface giza_move |
1120 | 1191 | subroutine giza_move(x,y) bind(C) |
1121 | 1192 | import |
1214 | 1285 | end interface |
1215 | 1286 | |
1216 | 1287 | interface giza_text |
1217 | module procedure giza_intern_text_f2c | |
1288 | module procedure giza_intern_text_f2c | |
1218 | 1289 | module procedure giza_intern_text_float_f2c |
1219 | 1290 | end interface |
1220 | 1291 | |
1251 | 1322 | end interface giza_open |
1252 | 1323 | |
1253 | 1324 | interface giza_ptext |
1254 | module procedure giza_intern_ptext_f2c | |
1325 | module procedure giza_intern_ptext_f2c | |
1255 | 1326 | module procedure giza_intern_ptext_float_f2c |
1256 | 1327 | end interface |
1257 | 1328 | |
1270 | 1341 | end interface |
1271 | 1342 | |
1272 | 1343 | interface giza_qtext |
1273 | module procedure giza_intern_qtext_f2c | |
1344 | module procedure giza_intern_qtext_f2c | |
1274 | 1345 | module procedure giza_intern_qtext_float_f2c |
1275 | 1346 | end interface |
1276 | 1347 | |
1291 | 1362 | end interface |
1292 | 1363 | |
1293 | 1364 | interface giza_qtextlen |
1294 | module procedure giza_intern_qtextlen_f2c | |
1365 | module procedure giza_intern_qtextlen_f2c | |
1295 | 1366 | module procedure giza_intern_qtextlen_float_f2c |
1296 | 1367 | end interface |
1297 | 1368 | |
1319 | 1390 | real(kind=c_double),intent(in),value :: valMin,valMax |
1320 | 1391 | real(kind=c_double),intent(in) :: affine(6) |
1321 | 1392 | end subroutine giza_render |
1322 | ||
1393 | ||
1323 | 1394 | subroutine giza_render_float(sizex,sizey,data,i1,i2,j1,j2,valMin,valMax,extend,affine) bind(C) |
1324 | 1395 | import |
1325 | 1396 | integer(kind=c_int),intent(in),value :: sizex,sizey,i1,i2,j1,j2,extend |
1335 | 1406 | real(kind=c_double),intent(in),value :: valMin,valMax |
1336 | 1407 | real(kind=c_double),intent(in) :: affine(6) |
1337 | 1408 | end subroutine giza_render_alpha |
1338 | ||
1409 | ||
1339 | 1410 | subroutine giza_render_alpha_float(sizex,sizey,data,alpha,i1,i2,j1,j2,valMin,valMax,extend,affine) bind(C) |
1340 | 1411 | import |
1341 | 1412 | integer(kind=c_int),intent(in),value :: sizex,sizey,i1,i2,j1,j2,extend |
1353 | 1424 | real(kind=c_double),intent(in),value :: valMin,valMax |
1354 | 1425 | real(kind=c_double),intent(in) :: affine(6) |
1355 | 1426 | end subroutine giza_render_transparent |
1356 | ||
1427 | ||
1357 | 1428 | subroutine giza_render_transparent_float(sizex,sizey,data,i1,i2,j1,j2,valMin,valMax,extend,affine) bind(C) |
1358 | 1429 | import |
1359 | 1430 | integer(kind=c_int),intent(in),value :: sizex,sizey,i1,i2,j1,j2,extend |
1371 | 1442 | real(kind=c_double),intent(in),value :: valMin,valMax |
1372 | 1443 | real(kind=c_double),intent(in) :: affine(6) |
1373 | 1444 | end subroutine giza_render_gray |
1374 | ||
1445 | ||
1375 | 1446 | subroutine giza_render_gray_float(sizex,sizey,data,i1,i2,j1,j2,valMin,valMax,extend,affine) bind(C) |
1376 | 1447 | import |
1377 | 1448 | integer(kind=c_int),intent(in),value :: sizex,sizey,i1,i2,j1,j2,extend |
1388 | 1459 | integer(kind=c_int),intent(in) :: idata(sizex,sizey) |
1389 | 1460 | real(kind=c_double),intent(in),value :: xmin,xmax,ymin,ymax |
1390 | 1461 | end subroutine giza_draw_pixels |
1391 | ||
1462 | ||
1392 | 1463 | subroutine giza_draw_pixels_float(sizex,sizey,idata,i1,i2,j1,j2,xmin,xmax,ymin,ymax,extend) bind(C) |
1393 | 1464 | import |
1394 | 1465 | integer(kind=c_int),intent(in),value :: sizex,sizey,i1,i2,j1,j2,extend |
1439 | 1510 | real(kind=c_float) :: giza_round_float |
1440 | 1511 | end function giza_round_float |
1441 | 1512 | end interface giza_round |
1442 | ||
1513 | ||
1443 | 1514 | interface giza_save |
1444 | 1515 | subroutine giza_save() bind(C) |
1445 | 1516 | end subroutine giza_save |
1492 | 1563 | integer(kind=c_int), intent(in),value :: nx,ny |
1493 | 1564 | end subroutine giza_subpanel |
1494 | 1565 | end interface |
1495 | ||
1566 | ||
1496 | 1567 | interface giza_set_panel |
1497 | 1568 | subroutine giza_set_panel(ix,iy) bind(C) |
1498 | 1569 | import |
1515 | 1586 | real(kind=c_double),intent(in),value :: scale,blank |
1516 | 1587 | real(kind=c_double),intent(in) :: affine(6) |
1517 | 1588 | end subroutine giza_vector |
1518 | ||
1589 | ||
1519 | 1590 | subroutine giza_vector_float(sizex,sizey,horizontal,vertical,i1,i2,j1,j2,scale,position,affine,blank) bind(C) |
1520 | 1591 | import |
1521 | 1592 | integer(kind=c_int),intent(in),value :: sizex,sizey,i1,i2,j1,j2,position |
1549 | 1620 | integer(kind=c_int), value, intent(in) :: units |
1550 | 1621 | real(kind=c_double), intent(out) :: x1,x2,y1,y2 |
1551 | 1622 | end subroutine giza_get_viewport |
1552 | ||
1623 | ||
1553 | 1624 | subroutine giza_get_viewport_float(units,x1,x2,y1,y2) bind(C) |
1554 | 1625 | import |
1555 | 1626 | integer(kind=c_int),value, intent(in) :: units |
1568 | 1639 | real(kind=c_double), value, intent(in) :: xleft,xright,ybot,ytop |
1569 | 1640 | end subroutine giza_set_viewport_inches |
1570 | 1641 | end interface |
1571 | ||
1642 | ||
1572 | 1643 | interface giza_version |
1573 | 1644 | subroutine giza_version(major,minor,micro) bind(C) |
1574 | 1645 | import |
1653 | 1724 | |
1654 | 1725 | !------------------------------------------------------- |
1655 | 1726 | ! these are subroutines whose arguments need conversion |
1656 | ! before passing to c (mainly strings) | |
1727 | ! before passing to c (mainly strings) | |
1657 | 1728 | !------------------------------------------------------- |
1658 | 1729 | |
1659 | 1730 | subroutine giza_intern_annotate_f2c(side,displacement,coord,justification,text) |
1668 | 1739 | |
1669 | 1740 | call giza_annotate_c(cstring(side),displacement_c,coord_c,justification_c,cstring(text)) |
1670 | 1741 | 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 | |
1671 | 1780 | |
1672 | 1781 | subroutine giza_intern_box_f2c(xopt,xtick,nxsub,yopt,ytick,nysub) |
1673 | 1782 | implicit none |
1702 | 1811 | character(len=*), intent(in) :: side,label |
1703 | 1812 | real, intent(in) :: disp,width,valmin,valmax |
1704 | 1813 | real(kind=c_double) :: disp_c,width_c,valmin_c,valmax_c |
1705 | ||
1814 | ||
1706 | 1815 | disp_c = disp |
1707 | 1816 | width_c = width |
1708 | 1817 | valmin_c = valmin |
1709 | 1818 | valmax_c = valmax |
1710 | ||
1819 | ||
1711 | 1820 | call giza_colour_bar_c(cstring(side),disp_c,width_c,valmin_c,valmax_c,cstring(label)) |
1712 | ||
1821 | ||
1713 | 1822 | end subroutine giza_intern_colour_bar_f2c |
1714 | 1823 | |
1715 | 1824 | integer function giza_intern_open_device(dev,prefix) |
1716 | 1825 | implicit none |
1717 | 1826 | character(len=*),intent(in) :: dev,prefix |
1718 | ||
1827 | ||
1719 | 1828 | giza_intern_open_device = giza_open_device_c(cstring(dev),cstring(prefix)) |
1720 | 1829 | end function giza_intern_open_device |
1721 | 1830 | |
1727 | 1836 | integer, intent(in), optional :: units |
1728 | 1837 | integer, intent(out), optional :: error |
1729 | 1838 | integer :: giza_open |
1730 | ||
1839 | ||
1731 | 1840 | character(len=40) :: fdev |
1732 | 1841 | if (present(dev)) then |
1733 | 1842 | fdev = dev |
1734 | 1843 | else |
1735 | 1844 | fdev = '?' |
1736 | 1845 | 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 | |
1739 | 1848 | if (present(prefix)) then |
1740 | 1849 | giza_open = giza_open_device_size_c(cstring(fdev),cstring(prefix),width,height,units) |
1741 | 1850 | else |
1751 | 1860 | if (present(error)) then |
1752 | 1861 | error = giza_open |
1753 | 1862 | endif |
1754 | ||
1863 | ||
1755 | 1864 | end subroutine giza_open_sub |
1756 | ||
1865 | ||
1757 | 1866 | subroutine giza_close |
1758 | 1867 | call giza_close_device() |
1759 | 1868 | end subroutine giza_close |
1764 | 1873 | character(len=*),intent(in) :: dev,prefix |
1765 | 1874 | real,intent(in) :: width,height |
1766 | 1875 | integer, intent(in) :: units |
1767 | ||
1876 | ||
1768 | 1877 | giza_intern_open_device_size = giza_open_device_size_c(cstring(dev),cstring(prefix),width,height,units) |
1769 | ||
1878 | ||
1770 | 1879 | end function giza_intern_open_device_size |
1771 | 1880 | |
1772 | ! So cursor functionality can be queried as logical | |
1881 | ! So cursor functionality can be queried as logical | |
1773 | 1882 | logical function giza_intern_device_has_cursor() |
1774 | 1883 | implicit none |
1775 | 1884 | |
1780 | 1889 | subroutine giza_intern_label_f2c(labelx,labely,title) |
1781 | 1890 | implicit none |
1782 | 1891 | character(len=*),intent(in) :: labelx,labely,title |
1783 | ||
1892 | ||
1784 | 1893 | call giza_label_c(cstring(labelx),cstring(labely),cstring(title)) |
1785 | 1894 | |
1786 | 1895 | end subroutine giza_intern_label_f2c |
1789 | 1898 | implicit none |
1790 | 1899 | integer(kind=c_int),value,intent(in) :: lw |
1791 | 1900 | real(kind=c_double) :: reallw |
1792 | ||
1901 | ||
1793 | 1902 | !--cairo line widths are best as .5, 1.5 etc |
1794 | 1903 | reallw = dble(lw) + 0.5d0 |
1795 | 1904 | call giza_set_line_width(reallw) |
1816 | 1925 | implicit none |
1817 | 1926 | real(kind=c_float),intent(in) :: x,y |
1818 | 1927 | character(len=*),intent(in) :: text |
1819 | ||
1928 | ||
1820 | 1929 | call giza_text_float_c(x,y,cstring(text)) |
1821 | 1930 | end subroutine giza_intern_text_float_f2c |
1822 | 1931 | |
1832 | 1941 | implicit none |
1833 | 1942 | real(kind=c_float),intent(in) :: x,y,angle,just |
1834 | 1943 | character(len=*),intent(in) :: text |
1835 | ||
1944 | ||
1836 | 1945 | call giza_ptext_float_c(x,y,angle,just,cstring(text)) |
1837 | 1946 | end subroutine giza_intern_ptext_float_f2c |
1838 | 1947 | |
1850 | 1959 | real(kind=c_float),intent(in) :: x,y,angle,just |
1851 | 1960 | real(kind=c_float),intent(out):: xbox(4),ybox(4) |
1852 | 1961 | character(len=*),intent(in) :: text |
1853 | ||
1962 | ||
1854 | 1963 | call giza_qtext_float_c(x,y,angle,just,cstring(text),xbox,ybox) |
1855 | 1964 | end subroutine giza_intern_qtext_float_f2c |
1856 | 1965 | |
1875 | 1984 | subroutine giza_intern_set_font_f2c(font) |
1876 | 1985 | implicit none |
1877 | 1986 | character(len=*),intent(in) :: font |
1878 | ||
1987 | ||
1879 | 1988 | call giza_set_font_c(cstring(font)) |
1880 | 1989 | |
1881 | 1990 | end subroutine giza_intern_set_font_f2c |
1883 | 1992 | subroutine giza_intern_set_font_bold_f2c(font) |
1884 | 1993 | implicit none |
1885 | 1994 | character(len=*),intent(in) :: font |
1886 | ||
1995 | ||
1887 | 1996 | call giza_set_font_bold_c(cstring(font)) |
1888 | 1997 | |
1889 | 1998 | end subroutine giza_intern_set_font_bold_f2c |
1891 | 2000 | subroutine giza_intern_set_font_italic_f2c(font) |
1892 | 2001 | implicit none |
1893 | 2002 | character(len=*),intent(in) :: font |
1894 | ||
2003 | ||
1895 | 2004 | call giza_set_font_italic_c(cstring(font)) |
1896 | 2005 | |
1897 | 2006 | end subroutine giza_intern_set_font_italic_f2c |
1899 | 2008 | subroutine giza_intern_set_font_bold_italic_f2c(font) |
1900 | 2009 | implicit none |
1901 | 2010 | character(len=*),intent(in) :: font |
1902 | ||
2011 | ||
1903 | 2012 | call giza_set_font_bold_italic_c(cstring(font)) |
1904 | 2013 | |
1905 | 2014 | end subroutine giza_intern_set_font_bold_italic_f2c |
1910 | 2019 | character(len=*), intent(out) :: string |
1911 | 2020 | character(kind=c_char), dimension(len(string)+1) :: stringc |
1912 | 2021 | integer(kind=c_int) :: cstring_length |
1913 | cstring_length = len(string)+1 | |
2022 | cstring_length = len(string)+1 | |
1914 | 2023 | call giza_format_number_c(mantissa,power,iform,stringc,cstring_length) |
1915 | 2024 | string = fstring(stringc) |
1916 | 2025 | |
1923 | 2032 | integer(kind=c_int) :: rval |
1924 | 2033 | integer(kind=c_int) :: ierr |
1925 | 2034 | character(kind=c_char), dimension(len(string)+1) :: stringc |
1926 | rval = len(string)+1 | |
2035 | rval = len(string)+1 | |
1927 | 2036 | ierr = giza_query_device_c(cstring(qtype),stringc,rval) |
1928 | 2037 | string = fstring(stringc) |
1929 | ||
2038 | ||
1930 | 2039 | end subroutine giza_query_device_f2c |
1931 | 2040 | |
1932 | 2041 | !--------------------------------------------------------------------------- |
1941 | 2050 | character(kind=c_char), dimension(len(string)+1) :: array |
1942 | 2051 | integer :: i, ilen |
1943 | 2052 | |
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) | |
1947 | 2056 | end do |
1948 | 2057 | array(ilen+1)=achar(0) |
1949 | 2058 | |
2001 | 2110 | character(len=20) :: devi |
2002 | 2111 | character(len=40) :: xlabeli,ylabeli,titlei |
2003 | 2112 | real(kind=c_double), dimension(:), allocatable :: arrtmp |
2004 | ||
2113 | ||
2005 | 2114 | real(kind=c_double) :: lw_c, ch_c |
2006 | 2115 | integer(kind=c_int) :: n, nx_c, ny_c |
2007 | 2116 | integer(kind=c_int) :: symbol_c, iextend |
2027 | 2136 | endif |
2028 | 2137 | else |
2029 | 2138 | if (present(prefix)) then |
2030 | call giza_open(dev=devi,prefix=prefix) | |
2139 | call giza_open(dev=devi,prefix=prefix) | |
2031 | 2140 | else |
2032 | 2141 | call giza_open(dev=devi) |
2033 | 2142 | endif |
2045 | 2154 | xmini = 0. |
2046 | 2155 | endif |
2047 | 2156 | endif |
2048 | if (present(xmax)) then | |
2157 | if (present(xmax)) then | |
2049 | 2158 | xmaxi = xmax |
2050 | 2159 | else |
2051 | 2160 | if (present(x)) then |
2141 | 2250 | if (present(ci)) then |
2142 | 2251 | call giza_set_colour_index(ci) |
2143 | 2252 | endif |
2144 | ||
2253 | ||
2145 | 2254 | if (present(x) .and. present(y)) then |
2146 | 2255 | n = min(size(x),size(y)) |
2147 | 2256 | if (present(symbol)) then |
2148 | 2257 | 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) | |
2150 | 2259 | else |
2151 | 2260 | call giza_line(n,real(x,kind=c_double),real(y,kind=c_double)) |
2152 | 2261 | endif |
2177 | 2286 | endif |
2178 | 2287 | deallocate(arrtmp) |
2179 | 2288 | endif |
2180 | ||
2289 | ||
2181 | 2290 | if (present(img)) then |
2182 | 2291 | nx = size(img(:,1)) |
2183 | 2292 | ny = size(img(1,:)) |
2207 | 2316 | call giza_render(nx_c,ny_c,real(img,kind=c_double),int(1,kind=c_int),& |
2208 | 2317 | nx_c,int(1,kind=c_int),ny_c,valmin,valmax,iextend,affinei) |
2209 | 2318 | endif |
2210 | ||
2319 | ||
2211 | 2320 | call giza_close() |
2212 | ||
2321 | ||
2213 | 2322 | end subroutine giza_plot |
2214 | 2323 | |
2215 | 2324 | end module giza |
39 | 39 | * -nbin :- number of bins |
40 | 40 | * -flag :- flag to indicate page changes, see below |
41 | 41 | * |
42 | * See also: giza_histogram_binned, giza_histogram_float | |
42 | * See Also: giza_histogram_binned, giza_histogram_float | |
43 | 43 | * |
44 | 44 | * Flag: |
45 | 45 | * -0 :- giza_histogram calls giza_environment to set up new plotting page |
65 | 65 | { |
66 | 66 | ninbin[ibin] = 0; |
67 | 67 | } |
68 | ||
69 | for (i=0;i<n;i++) | |
68 | ||
69 | for (i=0;i<n;i++) | |
70 | 70 | { |
71 | 71 | ibin = (int) ((dat[i] - min)/bin_width); |
72 | 72 | if (ibin >= 0 && ibin < nbin) |
81 | 81 | ymax = nmax; |
82 | 82 | ymax = giza_round(1.01*ymax, &nval); |
83 | 83 | giza_get_fill(&oldFill); |
84 | ||
84 | ||
85 | 85 | if (flag % 2 == 0) giza_set_environment(min,max,0.,(double) ymax,0,0); |
86 | ||
86 | ||
87 | 87 | /* set up plotting environment and options */ |
88 | switch (flag) | |
88 | switch (flag) | |
89 | 89 | { |
90 | 90 | case 5: |
91 | 91 | default: |
100 | 100 | _giza_set_trans (GIZA_TRANS_WORLD); |
101 | 101 | |
102 | 102 | /* plot the bars of the histogram */ |
103 | for (ibin=0;ibin<nbin;ibin++) | |
103 | for (ibin=0;ibin<nbin;ibin++) | |
104 | 104 | { |
105 | 105 | xmin = min + ibin*bin_width; |
106 | 106 | xmax = xmin + bin_width; |
107 | 107 | ymin = 0.; |
108 | 108 | ymax = (double) ninbin[ibin]; |
109 | ||
109 | ||
110 | 110 | /* plot only 3 sides of the rectangle for all except the last */ |
111 | 111 | cairo_move_to (Dev[id].context, xmin, ymin); |
112 | 112 | cairo_line_to (Dev[id].context, xmin, ymax); |
117 | 117 | } |
118 | 118 | |
119 | 119 | /* restore previous fill style */ |
120 | giza_set_fill(oldFill); | |
120 | giza_set_fill(oldFill); | |
121 | 121 | _giza_set_trans (oldTrans); |
122 | 122 | } |
123 | 123 | |
126 | 126 | * |
127 | 127 | * Synopsis: Same as giza_histogram but takes floats |
128 | 128 | * |
129 | * See also: giza_histogram, giza_histogram_binned_float | |
129 | * See Also: giza_histogram, giza_histogram_binned_float | |
130 | 130 | * |
131 | 131 | */ |
132 | 132 | void |
141 | 141 | ddat[i] = (double) dat[i]; |
142 | 142 | } |
143 | 143 | giza_histogram(n, ddat, (double) min, (double) max, nbin, flag); |
144 | ||
144 | ||
145 | 145 | } |
146 | 146 | |
147 | 147 | /** |
155 | 155 | * -dat :- data values for each bin |
156 | 156 | * -center :- if true (1) x values correspond to centre of each bin |
157 | 157 | * |
158 | * See also: giza_histogram, giza_histogram_binned_float | |
158 | * See Also: giza_histogram, giza_histogram_binned_float | |
159 | 159 | * |
160 | 160 | */ |
161 | 161 | void |
172 | 172 | double dx; |
173 | 173 | |
174 | 174 | /* plot the bars of the histogram */ |
175 | for (i=0;i<n;i++) | |
175 | for (i=0;i<n;i++) | |
176 | 176 | { |
177 | 177 | if (i==n-1) { |
178 | 178 | dx = x[i] - x[i-1]; |
194 | 194 | * |
195 | 195 | * Synopsis: Same as giza_histogram_binned but takes floats |
196 | 196 | * |
197 | * See also: giza_histogram, giza_histogram_binned_float | |
197 | * See Also: giza_histogram, giza_histogram_binned_float | |
198 | 198 | * |
199 | 199 | */ |
200 | 200 | void |
120 | 120 | |
121 | 121 | !------------------------------------------------------------------------ |
122 | 122 | ! Module: PGAXIS -- draw an axis |
123 | ! Status: NOT IMPLEMENTED | |
123 | ! Status: IMPLEMENTED | |
124 | 124 | !------------------------------------------------------------------------ |
125 | 125 | subroutine PGAXIS (OPT, X1, Y1, X2, Y2, V1, V2, STEP, NSUB, DMAJL, DMAJR, FMIN, DISP, ORIENT) |
126 | use giza, only:giza_axis | |
126 | 127 | implicit none |
127 | 128 | character*(*), intent(in) :: OPT |
128 | 129 | real, intent(in) :: X1, Y1, X2, Y2, V1, V2, STEP, DMAJL, DMAJR, FMIN, DISP |
129 | 130 | real, intent(in) :: ORIENT |
130 | 131 | integer, intent(in) :: NSUB |
132 | ||
133 | call giza_axis(OPT, X1, Y1, X2, Y2, V1, V2, STEP, NSUB, DMAJL, DMAJR, FMIN, DISP, ORIENT) | |
131 | 134 | |
132 | 135 | end subroutine PGAXIS |
133 | 136 | |
1671 | 1674 | |
1672 | 1675 | !------------------------------------------------------------------------ |
1673 | 1676 | ! Module: PGTICK -- draw a single tick mark on an axis |
1674 | ! Status: NOT IMPLEMENTED | |
1677 | ! Status: IMPLEMENTED | |
1675 | 1678 | !------------------------------------------------------------------------ |
1676 | 1679 | subroutine PGTICK (X1, Y1, X2, Y2, V, TIKL, TIKR, DISP, ORIENT, STR) |
1680 | use giza, only:giza_tick | |
1677 | 1681 | implicit none |
1678 | 1682 | real, intent(in) :: X1, Y1, X2, Y2, V, TIKL, TIKR, DISP, ORIENT |
1679 | 1683 | character*(*), intent(in) :: STR |
1684 | ||
1685 | call giza_tick(X1, Y1, X2, Y2, V, TIKL, TIKR, DISP, ORIENT, STR) | |
1680 | 1686 | |
1681 | 1687 | end subroutine PGTICK |
1682 | 1688 |
76 | 76 | cairo_font_face_t* font; |
77 | 77 | } giza_font_t; |
78 | 78 | |
79 | /* type definition for the motion callback function */ | |
80 | typedef void (*giza_callback_t)(double *x, double *y, int *mode); | |
81 | ||
79 | 82 | /* Store variables relating to the current device */ |
80 | 83 | typedef struct |
81 | 84 | { |
124 | 127 | cairo_font_extents_t fontExtents; |
125 | 128 | double fontAngle; |
126 | 129 | int number_format; |
130 | giza_callback_t motion_callback; | |
127 | 131 | } giza_device_t; |
128 | 132 | |
129 | 133 | extern giza_device_t Dev[GIZA_MAX_DEVICES]; |
55 | 55 | giza_get_character_height (&ch); |
56 | 56 | |
57 | 57 | cairo_save (Dev[id].context); |
58 | ||
58 | ||
59 | 59 | /* save the font (can be changed by \rm \fn \fc during text write) */ |
60 | 60 | int len = GIZA_FONT_LEN; |
61 | 61 | char giza_font[len]; |
72 | 72 | /* Draw the bounding box */ |
73 | 73 | if (Dev[id].text_background >= 0) |
74 | 74 | { |
75 | int oldCi; | |
75 | int oldCi,oldfill; | |
76 | 76 | giza_get_colour_index (&oldCi); |
77 | 77 | giza_set_colour_index (Dev[id].text_background); |
78 | giza_get_fill (&oldfill); | |
79 | giza_set_fill(GIZA_FILL_SOLID); | |
78 | 80 | giza_polygon (4, xbox, ybox); |
79 | 81 | giza_set_colour_index (oldCi); |
82 | giza_set_fill (oldfill); | |
80 | 83 | } |
81 | 84 | |
82 | 85 | /* change the current trans to world coords */ |
37 | 37 | * Input: |
38 | 38 | * -sizex :- The dimensions of data in the x-direction |
39 | 39 | * -sizey :- The dimensions of data in the y-direction |
40 | * -data :- The data to be render | |
40 | * -data :- The data to be rendered | |
41 | 41 | * -i1 :- The inclusive range of data to render in the x dimension. |
42 | 42 | * -i2 :- The inclusive range of data to render in the x dimension. |
43 | 43 | * -j1 :- The inclusive range of data to render in the y direction |
59 | 59 | */ |
60 | 60 | void |
61 | 61 | 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) | |
63 | 63 | { |
64 | 64 | _giza_render (sizex, sizey, data,i1,i2,j1,j2,valMin,valMax,affine,0,extend,data); |
65 | 65 | } |
85 | 85 | */ |
86 | 86 | void |
87 | 87 | 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) | |
89 | 89 | { |
90 | 90 | _giza_render (sizex, sizey, data,i1,i2,j1,j2,valMin,valMax,affine,2,extend,alpha); |
91 | 91 | } |
96 | 96 | */ |
97 | 97 | void |
98 | 98 | _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) | |
101 | 101 | { |
102 | 102 | if (!_giza_check_device_ready ("giza_render")) |
103 | 103 | return; |
506 | 506 | cairo_surface_t *pixmap; |
507 | 507 | cairo_matrix_t mat; |
508 | 508 | int stride, pixnum, width = i2 - i1 + 1, height = j2 - j1 + 1; |
509 | ||
509 | ||
510 | 510 | cairo_extend_t cairoextendtype; |
511 | 511 | _giza_get_extend(extend,&cairoextendtype); |
512 | 512 |
0 | 0 | /* giza - a scientific plotting library built on cairo |
1 | 1 | * |
2 | 2 | * Copyright (c) 2010 James Wetter and Daniel Price |
3 | * Copyright (c) 2010-2012 Daniel Price | |
3 | * Copyright (c) 2010-2022 Daniel Price | |
4 | 4 | * |
5 | 5 | * This library is free software; and you are welcome to redistribute |
6 | 6 | * it under the terms of the GNU General Public License |
22 | 22 | */ |
23 | 23 | |
24 | 24 | void _giza_stroke (void); |
25 | void _giza_tick_intervals (double xmin, double xmax, double xinterval, | |
26 | int *i1, int *i2); |
39 | 39 | * down-then-across instead of the default |
40 | 40 | * across-then-down |
41 | 41 | * |
42 | * See also: giza_select_panel, giza_get_panel | |
42 | * See Also: giza_select_panel, giza_get_panel | |
43 | 43 | * |
44 | 44 | */ |
45 | 45 | void |
83 | 83 | * -ix :- panel index in x direction |
84 | 84 | * -iy :- panel index in y direction |
85 | 85 | * |
86 | * See also: giza_subpanel, giza_get_panel | |
86 | * See Also: giza_subpanel, giza_get_panel | |
87 | 87 | * |
88 | 88 | */ |
89 | 89 | void |
116 | 116 | * -ix :- panel index in x direction |
117 | 117 | * -iy :- panel index in y direction |
118 | 118 | * |
119 | * See also: giza_subpanel, giza_set_panel | |
119 | * See Also: giza_subpanel, giza_set_panel | |
120 | 120 | * |
121 | 121 | */ |
122 | 122 | 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, ¤tTickL_l); | |
93 | cairo_device_to_user_distance (Dev[id].context, &TickL_r_tmp, ¤tTickL_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 | } |
71 | 71 | /* Scaling */ |
72 | 72 | double dxWin = (Win.xmax - Win.xmin); |
73 | 73 | double dyWin = (Win.ymax - Win.ymin); |
74 | ||
74 | ||
75 | 75 | double x0,y0,xfac,yfac; |
76 | 76 | if (Dev[id].ix > 0 && Dev[id].iy > 0) { /* sanity check */ |
77 | 77 | x0 = (Dev[id].ix - 1)*Dev[id].panelwidth/Dev[id].width; |
0 | 0 | /* giza - a scientific plotting library built on cairo |
1 | 1 | * |
2 | 2 | * Copyright (c) 2010 James Wetter and Daniel Price |
3 | * Copyright (c) 2010-2012 Daniel Price | |
3 | * Copyright (c) 2010-2022 Daniel Price | |
4 | 4 | * |
5 | 5 | * This library is free software; and you are welcome to redistribute |
6 | 6 | * it under the terms of the GNU General Public License |
39 | 39 | float justification, const char *string); |
40 | 40 | void giza_begin_autolog(void); |
41 | 41 | 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 | ||
42 | 50 | int giza_band (int mode, int moveCursm, double xanc, double yanc, double *x, |
43 | 51 | double *y, char *ch); |
44 | 52 | int giza_band_float (int mode, int moveCurs, float xanc, float yanc, float *x, |
74 | 82 | void giza_set_clipping (int clip); |
75 | 83 | void giza_get_clipping (int *clip); |
76 | 84 | |
77 | void giza_colour_bar (const char *side, double disp, double width, | |
85 | void giza_colour_bar (const char *side, double disp, double width, | |
78 | 86 | 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, | |
80 | 88 | float valMin, float valMax, const char *label); |
81 | 89 | |
82 | 90 | void giza_set_colour_index (int ci); |
151 | 159 | int giza_device_has_cursor (void); |
152 | 160 | int giza_get_key_press (double *x, double *y, char *ch); |
153 | 161 | 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); | |
154 | 164 | |
155 | 165 | void giza_draw (double xpt, double ypt); |
156 | 166 | void giza_draw_float (float xpt, float ypt); |
326 | 336 | void giza_set_text_background (int colourIndex); |
327 | 337 | void giza_get_text_background (int *colourIndex); |
328 | 338 | |
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 | ||
329 | 344 | void |
330 | 345 | giza_vector (int n, int m, const double* horizontal, const double* vertical, |
331 | 346 | int i1, int i2, int j1, int j2, double scale, int position, |