forked from racket/racket
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparams.scrbl
More file actions
265 lines (203 loc) · 8.45 KB
/
params.scrbl
File metadata and controls
265 lines (203 loc) · 8.45 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
#lang scribble/manual
@(require "common.rkt")
@title[#:tag "params"]{Plot and Renderer Parameters}
@declare-exporting[plot]
@defmodule*/no-declare[(plot plot/typed) #:link-target? #f]
@section{Compatibility}
@doc-apply[plot-deprecation-warnings?]{
When @(racket #t), prints a deprecation warning to @(racket current-error-port) on the first use of @(racket mix), @(racket line), @(racket contour), @(racket shade), @(racket surface), or a keyword argument of @(racket plot) or @(racket plot3d) that exists solely for backward compatibility.
}
@section{Output}
@doc-apply[plot-new-window?]{When @(racket #t), @(racket plot) and @(racket plot3d) open a new window for each plot instead of returning an @(racket image-snip%).
Users of command-line Racket, which cannot display image snips, should enter
@racketblock[(plot-new-window? #t)]
before using @(racket plot) or @(racket plot3d).}
@doc-apply[plot-width]
@doc-apply[plot-height]{The width and height of a plot, in logical drawing units (e.g. pixels for bitmap plots).}
@doc-apply[plot-jpeg-quality]{
The quality of JPEG images written by @(racket plot-file) and @(racket plot3d-file). See @(method bitmap% save-file).
}
@doc-apply[plot-ps/pdf-interactive?]{
If @(racket #t), @(racket plot-file) and @(racket plot3d-file) open a dialog when writing PostScript or PDF files. See @(racket post-script-dc%) and @(racket pdf-dc%).
}
@section{General Appearance}
@doc-apply[plot-foreground]
@doc-apply[plot-background]{
The plot foreground and background color.
That both are @(racket 0) by default is not a mistake: for foreground colors, @(racket 0) is interpreted as black; for background colors, @(racket 0) is interpreted as white.
See @(racket ->pen-color) and @(racket ->brush-color) for details on how @(plot-name) interprets integer colors.}
@doc-apply[plot-foreground-alpha]
@doc-apply[plot-background-alpha]{The opacity of the background and foreground colors.}
@doc-apply[plot-font-size]{The font size of the title, axis labels, tick labels, and other labels, in drawing units.}
@doc-apply[plot-font-family]{The font family used for the title and labels.}
@doc-apply[plot-line-width]{The width of axis lines and major tick lines. (Minor tick lines are half this width.)}
@doc-apply[plot-legend-anchor]{Controls the placement of the legend.}
@doc-apply[plot-legend-box-alpha]{The opacity of the filled rectangle behind the legend entries.}
@doc-apply[plot-tick-size]{The length of tick lines, in drawing units.}
@doc-apply[plot-title]
@doc-apply[plot-x-label]
@doc-apply[plot-y-label]
@doc-apply[plot-z-label]{The title and axis labels. A @(racket #f) value means the label is not drawn and takes no space. A @(racket "") value effectively means the label is not drawn, but it takes space.
}
@doc-apply[plot-x-far-label]
@doc-apply[plot-y-far-label]
@doc-apply[plot-z-far-label]{
The axis labels for ``far'' axes. See @racket[plot-x-ticks] for a discussion of near and far axes.
}
@doc-apply[plot-x-tick-label-anchor]
@doc-apply[plot-x-tick-label-angle]
@doc-apply[plot-y-tick-label-anchor]
@doc-apply[plot-y-tick-label-angle]
@doc-apply[plot-x-far-tick-label-anchor]
@doc-apply[plot-x-far-tick-label-angle]
@doc-apply[plot-y-far-tick-label-anchor]
@doc-apply[plot-y-far-tick-label-angle]{
Anchor and angles for axis tick labels (2D only).
Angles are in degrees.
The anchor refers to the part of the label attached to the end of the tick line.
Set these when labels would otherwise overlap; for example, in histograms with long category names.
@interaction[#:eval plot-eval
(parameterize ([plot-x-tick-label-anchor 'top-right]
[plot-x-tick-label-angle 30])
(plot (discrete-histogram '(#(really-long-category-name-1 2)
#(long-category-name-2 1.75)
#(long-category-name-3 2.5)))))]
}
@doc-apply[plot-x-axis?]
@doc-apply[plot-x-far-axis?]
@doc-apply[plot-y-axis?]
@doc-apply[plot-y-far-axis?]
@doc-apply[plot-z-axis?]
@doc-apply[plot-z-far-axis?]{
When any of these is @racket[#f], the corresponding axis is not drawn.
Use these along with @racket[x-axis] and @racket[y-axis] if you want axes that intersect the origin or some other point.
}
@doc-apply[plot-animating?]{
When @(racket #t), certain renderers draw simplified plots to speed up drawing. @(plot-name) sets it to @(racket #t), for example, when a user is clicking and dragging a 3D plot to rotate it.
}
@doc-apply[animated-samples]{
Given a number of samples, returns the number of samples to use.
This returns @racket[samples] when @racket[plot-animating?] is @racket[#f].
}
@doc-apply[plot-decorations?]{
When @(racket #f), axes, axis labels, ticks, tick labels, and the title are not drawn.
}
@section{Lines}
@doc-apply[line-samples]
@doc-apply[line-color]
@doc-apply[line-width]
@doc-apply[line-style]
@doc-apply[line-alpha]
@section{Intervals}
@doc-apply[interval-color]
@doc-apply[interval-style]
@doc-apply[interval-line1-color]
@doc-apply[interval-line1-width]
@doc-apply[interval-line1-style]
@doc-apply[interval-line2-color]
@doc-apply[interval-line2-width]
@doc-apply[interval-line2-style]
@doc-apply[interval-alpha]
@section{Points}
@doc-apply[point-sym]
@doc-apply[point-color]
@doc-apply[point-size]
@doc-apply[point-line-width]
@doc-apply[point-alpha]
@section{Vector Fields}
@doc-apply[vector-field-samples]
@doc-apply[vector-field-color]
@doc-apply[vector-field-line-width]
@doc-apply[vector-field-line-style]
@doc-apply[vector-field-scale]
@doc-apply[vector-field-alpha]
@doc-apply[vector-field3d-samples]
@section{Error Bars}
@doc-apply[error-bar-width]
@doc-apply[error-bar-color]
@doc-apply[error-bar-line-width]
@doc-apply[error-bar-line-style]
@doc-apply[error-bar-alpha]
@section{Contours and Contour Intervals}
@doc-apply[default-contour-colors]
@doc-apply[default-contour-fill-colors]
@doc-apply[contour-samples]
@doc-apply[contour-levels]
@doc-apply[contour-colors]
@doc-apply[contour-widths]
@doc-apply[contour-styles]
@doc-apply[contour-alphas]
@doc-apply[contour-interval-colors]
@doc-apply[contour-interval-styles]
@doc-apply[contour-interval-alphas]
@section{Rectangles}
@doc-apply[rectangle-color]
@doc-apply[rectangle-style]
@doc-apply[rectangle-line-color]
@doc-apply[rectangle-line-width]
@doc-apply[rectangle-line-style]
@doc-apply[rectangle-alpha]
@doc-apply[rectangle3d-line-width]
@doc-apply[discrete-histogram-gap]
@doc-apply[discrete-histogram-skip]
@doc-apply[discrete-histogram-invert?]
@doc-apply[stacked-histogram-alphas]
@doc-apply[stacked-histogram-colors]
@doc-apply[stacked-histogram-line-colors]
@doc-apply[stacked-histogram-line-styles]
@doc-apply[stacked-histogram-line-widths]
@doc-apply[stacked-histogram-styles]
@section{Decorations}
These parameters do not control the @italic{typical} appearance of plots.
Instead, they control the look of renderers that add specific decorations, such as labeled points.
@doc-apply[x-axis-alpha]
@doc-apply[y-axis-alpha]
@doc-apply[z-axis-alpha]
@doc-apply[x-axis-far?]
@doc-apply[y-axis-far?]
@doc-apply[z-axis-far?]
@doc-apply[x-axis-ticks?]
@doc-apply[y-axis-ticks?]
@doc-apply[z-axis-ticks?]
@doc-apply[x-axis-labels?]
@doc-apply[y-axis-labels?]
@doc-apply[z-axis-labels?]
@doc-apply[polar-axes-number]
@doc-apply[polar-axes-alpha]
@doc-apply[polar-axes-ticks?]
@doc-apply[polar-axes-labels?]
@doc-apply[label-anchor]
@doc-apply[label-angle]
@doc-apply[label-alpha]
@doc-apply[label-point-size]
@section{3D General Appearance}
@doc-apply[plot3d-samples]
@doc-apply[plot3d-angle]
@doc-apply[plot3d-altitude]
@doc-apply[plot3d-ambient-light]
@doc-apply[plot3d-diffuse-light?]
@doc-apply[plot3d-specular-light?]
@section{Surfaces}
@doc-apply[surface-color]
@doc-apply[surface-style]
@doc-apply[surface-line-color]
@doc-apply[surface-line-width]
@doc-apply[surface-line-style]
@doc-apply[surface-alpha]
@section{Contour Surfaces}
Contour surface renderers use shared contour parameters except for the following three.
@doc-apply[contour-interval-line-colors]
@doc-apply[contour-interval-line-widths]
@doc-apply[contour-interval-line-styles]
@section{Isosurfaces}
Single isosurfaces (@(racket isosurface3d)) use surface parameters.
Nested isosurfaces (@(racket isosurfaces3d)) use the following.
@doc-apply[default-isosurface-colors]
@doc-apply[default-isosurface-line-colors]
@doc-apply[isosurface-levels]
@doc-apply[isosurface-colors]
@doc-apply[isosurface-styles]
@doc-apply[isosurface-line-colors]
@doc-apply[isosurface-line-widths]
@doc-apply[isosurface-line-styles]
@doc-apply[isosurface-alphas]