Made (require plot) more obvious in the plot introduction (suggested by Jens Axel Søgaard)
Mentioned (plot-new-window? #t) early in the introduction Increased drdr:timeout for plot.scrbl
This commit is contained in:
parent
365ee2c70d
commit
ee95182386
|
@ -1159,6 +1159,7 @@ path/s is either such a string or a list of them.
|
|||
"collects/plai/private/gc-gui.rkt" drdr:command-line (gracket "-t" *)
|
||||
"collects/planet" responsible (robby)
|
||||
"collects/plot" responsible (ntoronto)
|
||||
"collects/plot/scribblings/plot.scrbl" drdr:timeout 180
|
||||
"collects/plot/tests/extreme-bounds-tests.rkt" drdr:timeout 150
|
||||
"collects/plot/tests/slideshow-test.rkt" drdr:command-line #f
|
||||
"collects/preprocessor" responsible (eli)
|
||||
|
@ -2041,7 +2042,6 @@ path/s is either such a string or a list of them.
|
|||
"collects/tests/xml/test-clark.rkt" drdr:command-line #f drdr:timeout 300
|
||||
"collects/tests/xml/xml-snip-bug.rkt" drdr:command-line (gracket "-t" *)
|
||||
"collects/tests/xrepl" responsible (eli)
|
||||
"collects/tests/lazy/main" drdr:command-line #f
|
||||
"collects/tests/zo-path.rkt" responsible (mflatt)
|
||||
"collects/tests/zo-size.rkt" responsible (jay)
|
||||
"collects/tex2page" responsible (jay)
|
||||
|
|
|
@ -6,10 +6,16 @@
|
|||
|
||||
@section{Plotting 2D Graphs}
|
||||
|
||||
To plot a one-input, real-valued function, first @(racket (require plot)), and then try something like
|
||||
To plot a one-input, real-valued function, do something like
|
||||
|
||||
@racketinput[(require plot)]
|
||||
@interaction[#:eval plot-eval (plot (function sin (- pi) pi #:label "y = sin(x)"))]
|
||||
|
||||
(If you're not using DrRacket, start with
|
||||
@racketblock[(require plot)
|
||||
(plot-new-window? #t)]
|
||||
to open each plot in a new window.)
|
||||
|
||||
The first argument to @(racket function) is the function to be plotted, and the @(racket #:label) argument becomes the name of the function in the legend.
|
||||
|
||||
@section{Terminology}
|
||||
|
@ -23,7 +29,7 @@ The @(racket plot) function collects legend entries, bounds and ticks. It then s
|
|||
|
||||
@section{Plotting 3D Graphs}
|
||||
|
||||
To plot a two-input, real-valued function as a surface, first @(racket (require plot)), and then try something like
|
||||
To plot a two-input, real-valued function as a surface, try something like
|
||||
|
||||
@margin-note{The documentation can't show it, but in DrRacket you can rotate 3D plots by clicking on them and dragging the mouse. Try it!}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user