IUP

Check-in [c7943a8242]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Documented IupPlot binding
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c7943a82423f11493d540af8ad520268b48fa681
User & Date: murphy 2015-05-01 14:29:20.525
Context
2015-05-01
14:29
Documented IupScintilla binding check-in: d9923ee8ef user: murphy tags: trunk
14:29
Documented IupPlot binding check-in: c7943a8242 user: murphy tags: trunk
14:03
Racket bindings for the IupPlot control check-in: af610253ba user: murphy tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Added api/plot.wiki.


























































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<h1><tt>plot</tt> Module</h1>

<h2>Synopsis</h2>

<table>
	<tr>
		<th>Racket</th>
		<td><code>(require (planet murphy/iup:1:0/plot))</code></td>
	</tr>
	<tr>
		<th>CHICKEN</th>
		<td><code>(require-extension iup-plot)</code></td>
	</tr>
</table>

Plotting support. Initializes the IUP Plot library when loaded.

<h2>Plot Control</h2>

<h3><a id="plot"><code><nowiki>(plot #:<name> <value> ...) → ihandle?</nowiki></code></a></h3>

Creates a plotting canvas.

<h2>Plotting Functions</h2>

<h3><a id="call-with-plot"><code><nowiki>(call-with-plot [handle ihandle?] [proc (-> ihandle? any)] #:x-string? [x-string? any/c #f]) → any</nowiki></code></a></h3>

Calls the given procedure with the given plotting canvas handle and ensures
that the canvas is ready to receive data in the given x-axis mode. Returns
whatever the given procedure returns.

<h3><a id="plot-add_"><code><nowiki>(plot-add! [handle ihandle?] [x (or/c string? real?)] [y real?] [sample-index (or/c integer? #f) #f] [index (or/c integer? #f) #f]) → void?</nowiki></code></a></h3>

Adds a sample to the given plotting canvas. Whether <code>x</code> must be a
string or a real number depends on the setting of the <code>xdata-string?</code>
argument to the <code><a href="#call-with-plot">call-with-plot</a></code>
invocation that created the dataset.

If <code>sample-index</code> is <code>#f</code>, the sample is appended to the
dataset and the call to <code>plot-add!</code> must be within the dynamic
context of a call to <code><a href="#call-with-plot">call-with-plot</a></code>.

If <code>sample-index</code> is a number, the sample is inserted into the
dataset before the given sample index. The call to <code>plot-add!</code>
does not have to be within the dynamic context of a call to
<code><a href="#call-with-plot">call-with-plot</a></code> in this case.
The dataset to which the new sample should be added may be specified explicitly
by its index through the <code>index</code> argument. If the <code>index</code>
argument is false, the current dataset of the plotting canvas is used.

<h2>Auxiliary Functions</h2>

<h3><a id="plot-x_y-_pixel-x_y"><code><nowiki>(plot-x/y->pixel-x/y [handle ihandle?] [x real?] [y real?]) → (values real? real?)</nowiki></code></a></h3>

Transforms plot coordinates into pixel coordinates.

<h3><a id="plot-paint-to"><code><nowiki>(plot-paint-to [handle ihandle?] [canvas canvas?]) → void?</nowiki></code></a></h3>

Paints the plot's contents into a canvas other than the one belonging to the
plot control itself. <code>canvas</code> should be a pointer to a canvas
object created using the CD graphics library.