From ee95182386ae989f733732cc37a2cf2a042ea2be Mon Sep 17 00:00:00 2001 From: Neil Toronto Date: Fri, 25 May 2012 11:33:50 +0900 Subject: [PATCH] =?UTF-8?q?Made=20(require=20plot)=20more=20obvious=20in?= =?UTF-8?q?=20the=20plot=20introduction=20(suggested=20by=20Jens=20Axel=20?= =?UTF-8?q?S=C3=B8gaard)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mentioned (plot-new-window? #t) early in the introduction Increased drdr:timeout for plot.scrbl --- collects/meta/props | 2 +- collects/plot/scribblings/intro.scrbl | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/collects/meta/props b/collects/meta/props index 78af3fc3c6..26db470d2d 100755 --- a/collects/meta/props +++ b/collects/meta/props @@ -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) diff --git a/collects/plot/scribblings/intro.scrbl b/collects/plot/scribblings/intro.scrbl index ddaa3ebcf0..746f8074ff 100644 --- a/collects/plot/scribblings/intro.scrbl +++ b/collects/plot/scribblings/intro.scrbl @@ -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!}