@@ -226,12 +226,32 @@ Returns a renderer that draws rectangles filled with a color based on the center
226
226
[#:width width (>=/c 0 ) (line-width)]
227
227
[#:style style plot-pen-style/c (line-style)]
228
228
[#:alpha alpha (real-in 0 1 ) (line-alpha)]
229
+ [#:marker marker point-sym/c 'none ]
230
+ [#:marker-color marker-color (or/c 'auto plot-color/c) 'auto ]
231
+ [#:marker-fill-color marker-fill-color (or/c 'auto plot-color/c) 'auto ]
232
+ [#:marker-size marker-size (>=/c 0 ) (point-size)]
233
+ [#:marker-line-width marker-line-width (>=/c 0 ) (point-line-width)]
234
+ [#:marker-alpha marker-alpha (real-in 0 1 ) (point-alpha)]
235
+ [#:marker-count marker-count positive-integer? 20 ]
229
236
[#:label label (or/c string? pict? #f ) #f ]
230
237
) renderer2d?]{
231
- Returns a renderer that plots a function of @italic{x}. For example, a parabola:
232
- @interaction[#:eval plot-eval (plot (function sqr -2 2 ))]
233
238
234
- @history[#:changed "7.9 " "Added support for pictures for #:label " ]
239
+ Returns a renderer that plots a function of @italic{x}. For example, a parabola:
240
+
241
+ @interaction[#:eval plot-eval (plot (function sqr -2 2 ))]
242
+
243
+ When @(racket marker) is not @racket['none ], markers will be placed on the
244
+ on the line drawn for the function at equal intervals. The marker and
245
+ related arguments are the same as for the @racket[points] renderer. The
246
+ number of markers shown on the plot is specified by @racket[marker-count]
247
+ parameter.
248
+
249
+ Using markers has the same effect as using both a @racket[function] and a
250
+ @racket[points] renderer in a single plot, exept that using @racket[marker]s
251
+ will show the marker super-imposed over the line style in the plot legend.
252
+
253
+ @history[#:changed "7.9 " "#:label argument supports pictures " ]
254
+ @history[#:changed "8.10 " "#:marker and related arguments added " ]
235
255
}
236
256
237
257
@defproc[(inverse [f (real? . -> . real?)]
@@ -242,17 +262,30 @@ Returns a renderer that plots a function of @italic{x}. For example, a parabola:
242
262
[#:width width (>=/c 0 ) (line-width)]
243
263
[#:style style plot-pen-style/c (line-style)]
244
264
[#:alpha alpha (real-in 0 1 ) (line-alpha)]
245
- [#:label label (or/c string? pict? #f ) #f ]
246
- ) renderer2d?]{
247
- Like @(racket function), but regards @(racket f) as a function of @italic{y}.
248
- For example, a parabola, an inverse parabola, and the reflection line:
265
+ [#:marker marker point-sym/c 'none ]
266
+ [#:marker-color marker-color (or/c 'auto plot-color/c) 'auto ]
267
+ [#:marker-fill-color marker-fill-color (or/c 'auto plot-color/c) 'auto ]
268
+ [#:marker-size marker-size (>=/c 0 ) (point-size)]
269
+ [#:marker-line-width marker-line-width (>=/c 0 ) (point-line-width)]
270
+ [#:marker-alpha marker-alpha (real-in 0 1 ) (point-alpha)]
271
+ [#:marker-count marker-count positive-integer? 20 ]
272
+ [#:label label (or/c string? pict? #f ) #f ]) renderer2d?]{
273
+
274
+ Like @(racket function), but regards @(racket f) as a function of
275
+ @italic{y}. For example, a parabola, an inverse parabola, and the
276
+ reflection line:
277
+
249
278
@interaction[#:eval plot-eval
250
279
(plot (list (axes)
251
280
(function sqr -2 2 #:label "y = x² " )
252
281
(function (λ (x) x) #:color 0 #:style 'dot #:label "y = x " )
253
282
(inverse sqr -2 2 #:color 3 #:label "x = y² " )))]
254
283
255
- @history[#:changed "7.9 " "Added support for pictures for #:label " ]
284
+ The @(racket marker) and related arguments have the same meaning as for the
285
+ @racket[function] renderer.
286
+
287
+ @history[#:changed "7.9 " "#:label argument supports pictures " ]
288
+ @history[#:changed "8.10 " "#:marker and related arguments added " ]
256
289
}
257
290
258
291
@defproc[(lines [vs (sequence/c (sequence/c #:min-count 2 real?))]
@@ -262,6 +295,12 @@ For example, a parabola, an inverse parabola, and the reflection line:
262
295
[#:width width (>=/c 0 ) (line-width)]
263
296
[#:style style plot-pen-style/c (line-style)]
264
297
[#:alpha alpha (real-in 0 1 ) (line-alpha)]
298
+ [#:marker marker point-sym/c 'none ]
299
+ [#:marker-color marker-color (or/c 'auto plot-color/c) 'auto ]
300
+ [#:marker-fill-color marker-fill-color (or/c 'auto plot-color/c) 'auto ]
301
+ [#:marker-size marker-size (>=/c 0 ) (point-size)]
302
+ [#:marker-line-width marker-line-width (>=/c 0 ) (point-line-width)]
303
+ [#:marker-alpha marker-alpha (real-in 0 1 ) (point-alpha)]
265
304
[#:label label (or/c string? pict? #f ) #f ]
266
305
[#:ignore-axis-transforms? ignore-axis-transforms? boolean? #f ]
267
306
) renderer2d?]{
@@ -284,6 +323,14 @@ For example, a parabola, an inverse parabola, and the reflection line:
284
323
independent data sets with one @(racket lines) renderer, improving rendering
285
324
performence for large datasets.
286
325
326
+ When @(racket marker) is not @racket['none ], markers will be placed on the
327
+ on the line at each point in @racket[vs]. The marker and related arguments
328
+ are the same as for the @racket[points] renderer.
329
+
330
+ Using markers has the same effect as using both a @racket[lines] and a
331
+ @racket[points] renderer in a single plot, exept that using @racket[marker]s
332
+ will show the marker super-imposed over the line style in the plot legend.
333
+
287
334
When @(racket ignore-axis-transforms?) is @racket[#t ], only the individual
288
335
points in @(racket vs) are affected by axis transforms, not the lines that
289
336
connect these points. This feature can be used, for example, to plot a
@@ -319,6 +366,7 @@ For example, a parabola, an inverse parabola, and the reflection line:
319
366
320
367
@history[#:changed "7.9 " "#:label argument supports pictures " ]
321
368
@history[#:changed "8.9 " "#:ignore-axis-transforms? argument added " ]
369
+ @history[#:changed "8.10 " "#:marker and related arguments added " ]
322
370
}
323
371
324
372
@defproc[(parametric [f (real? . -> . (sequence/c real?))]
0 commit comments