Commit Graph

185 Commits

Author SHA1 Message Date
Asumu Takikawa
bf4e69fea9 Export racket/draw's helper contracts and document them 2013-02-14 18:22:48 -05:00
Matthew Flatt
0583616dd7 racket/date: change current-date', add date*->seconds' 2013-02-01 15:00:24 -08:00
Neil Toronto
ecd43f7579 Fixed erroneous raised exception when plotting outside the bounds of
a 2D contour plot

Please merge to 5.3.2
2013-01-17 21:30:07 -07:00
Neil Toronto
2657d8f96b Plots whose functions raise errors now have an empty spot instead of
failing
2012-12-17 16:59:30 -07:00
Neil Toronto
44d8ebb2c6 Enabled optional non-keyword arguments in `plot/typed' 2012-12-17 16:15:20 -07:00
Neil Toronto
e06ba39b0c Added note about `plot/typed/utils' 2012-12-17 15:54:30 -07:00
Neil Toronto
009293885b Renamed typed/plot' to plot/typed' 2012-12-17 11:52:24 -07:00
Neil Toronto
5a2aa226fb Initial commit for `typed/plot' module
I also made some minor changes to `plot' so that its functions would
type more easily. In particular, everything that used to take a list
of vectors now accepts a (Sequenceof (Sequenceof Real)). The 3D
discrete histogram renderers now also accept lists as well as vectors
in the sequence of categories.

For now, in typed/plot functions, optional non-keyword arguments are
required. As soon as Vincent closes PR 13354, I should be able to
uncomment part of a macro in "typed/plot/syntax.rkt" to make them
correctly optional.
2012-12-15 21:22:50 -07:00
Ryan Culpepper
fd7d8a412c move lazy-require to racket/lazy-require 2012-12-03 19:28:12 -05:00
Neil Toronto
8aa623c2e8 Made plots in plot' and math' render nicely in PDFs (plots in docs are picts now)
Fixed errors in `linear-seq' when end <= start
2012-11-25 22:32:07 -08:00
Eli Barzilay
672910f27b Lots of bad TAB eliminations.
I started from tabs that are not on the beginning of lines, and in
several places I did further cleanings.

If you're worried about knowing who wrote some code, for example, if you
get to this commit in "git blame", then note that you can use the "-w"
flag in many git commands to ignore whitespaces.  For example, to see
per-line authors, use "git blame -w <file>".  Another example: to see
the (*much* smaller) non-whitespace changes in this (or any other)
commit, use "git log -p -w -1 <sha1>".
2012-11-07 11:22:20 -05:00
Eli Barzilay
bffe336220 #lang racket' -> #lang racket/base' conversions in plot and in images. 2012-11-07 08:03:45 -05:00
Matthew Flatt
7ee6a814e5 explicitly close evaluator for plot doc
Although this shouldn't affect document rendering, since
each document is run under a custodian that is shut down,
it simplifies using the document individually to check for
leaks.
2012-11-04 06:09:21 -07:00
Neil Toronto
ca99eb4a5e Altered a couple of tests to test list-of-lists histogram arguments 2012-08-12 08:58:51 -06:00
Ray Racine
b8c025da61 Histogram plots support lists as well as vectors of data. 2012-08-12 08:51:57 -06:00
Neil Toronto
a70aca3176 Fixed off-by-epsilon error; addresses issue with plateaus in contour-intervals and contour-intervals3d reported by Doug Williams
Please merge into release
2012-08-04 11:25:33 -06:00
Neil Toronto
3d1f2da3bc Added #:add-ticks? arguments to 2d histogram functions
Added #:add-x-ticks? and #:add-y-ticks? arguments to 3d histogram functions
2012-07-10 11:22:26 -07:00
Neil Toronto
ef2bd3fc0a Revert "Added #:add-ticks? argument to all 2d-renderer-producing functions"
I forgot that (plot-x-ticks no-ticks) does the same thing.

This reverts commit 8ae3ff48d8.
2012-07-10 11:22:26 -07:00
Neil Toronto
8ae3ff48d8 Added #:add-ticks? argument to all 2d-renderer-producing functions 2012-07-10 10:40:22 -07:00
Eli Barzilay
a7064d5f6a A bunch of typo fixes from Richard Cleis. 2012-06-14 17:20:05 -04:00
Neil Toronto
a713ca8a8b Added nan?, infinite?, degrees->radians, radians->degrees, exact-round, exact-floor, exact-ceiling, exact-truncate to racket/math
Altered TR's random arithmetic testing to generate single-flonums and very small flonums; fails now because of erroneous types

Fixes to sgn, sinh, cosh, and tanh:
 * preserve single-flonum-ness
 * correct zero sign (-0.0) for negative return values that are smaller than epsilon
 * correct behavior with NaN and infinite inputs
2012-06-05 22:40:44 -06:00
Neil Toronto
50ad8dac1f When plot-new-window?' is #t, plot' and `plot3d' now create a frame in a new eventspace. This allows plot frames to be displayed programmatically. (Without this change, the frames are unresponsive until the REPL regains control.) 2012-05-25 13:11:46 +09:00
Neil Toronto
ee95182386 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
2012-05-25 11:33:50 +09:00
Neil Toronto
365ee2c70d 1d, 2d and 3d function renderers no longer sample outside the function's bounds
This makes it more efficient to plot piecewise functions by drawing each piece with one renderer, and possible to plot functions with discontinuities by using a renderer to draw each continuous piece.
2012-05-25 10:40:05 +09:00
Eli Barzilay
6318df82e5 Drop the now-redundant " " argument from existing uses of `string-join'. 2012-05-24 10:40:20 -04:00
Eli Barzilay
17090fca4f A bunch of fprintf' -> eprintf' conversions (and a few related things). 2012-05-06 12:06:00 -04:00
Matthew Flatt
68e005fb2c racket/draw: make-immutable-{color,brush,pen} => make-{color,brush,pen}
Also, use keywords for `make-pen' and `make-brush'.

Adding `make-pen' and `make-color' creates many conflicts among
teaching libraries, such as `2htdp/image'. These are easy to fix
up in the tree, but adding such obvious names to `racket/draw'
may create other compatibility problems, so we might have to reconsider
the names.

In consultation with Asumu.
2012-05-01 21:04:40 -06:00
Asumu Takikawa
86a976531c Fix plot to use immutable constructors. 2012-05-01 21:20:52 -04:00
Neil Toronto
be49a59e4d Added plot-x-tick-label-angle, plot-x-tick-label-anchor, and similar for y and far axes 2012-04-30 16:12:12 -06:00
Neil Toronto
3862faee64 Fixed discrete-histogram gap and bounds calculation, expanded docs 2012-04-30 14:15:18 -06:00
Vincent St-Amour
cda496d4ed Doc fixes.
One is from Eric Hanchrow.
2012-04-30 14:13:32 -04:00
Robby Findler
33613a75a6 add an example from Neil \bot to the discrete-histogram docs 2012-04-29 21:29:37 -05:00
Eli Barzilay
43ef402274 Don't compile test files.
(Didn't touch the tiny "test-docs-complete" tests.)
2012-03-13 10:29:13 -04:00
Neil Toronto
568828d491 Fixed graphical glitches:
plots too small to render margin decorations (i.e. axis and tick labels) now render without them;
plots in frames now initially render with full detail
2012-03-03 15:39:16 -07:00
Neil Toronto
610280225c Added unstable/gui/snip (provides snip-canvas%) and docs
Changed plot-frame to use snip-canvas%, so resizing the frame resizes the plot; added Escape handler (closes the frame)
2012-03-03 12:37:09 -07:00
Neil Toronto
bf97780eda Fixed an internal function contract 2012-03-03 12:37:09 -07:00
Neil Toronto
50df61fc4e Fixed typo in introduction 2012-02-25 22:47:09 -07:00
Neil Toronto
3ed1a78713 Made plot snips resizeable 2012-02-25 22:47:09 -07:00
Neil Toronto
a94e1fc00e Fixed plot doc tests
Removed contract/c from unstable/contract
2012-02-01 22:17:25 -07:00
Neil Toronto
7d28eef00d Moved contract/c and treeof to unstable/contracts
Little plot doc fixes
2012-02-01 09:44:47 -07:00
Neil Toronto
ec96e37e09 Documented unstable/flonum 2012-02-01 09:44:47 -07:00
Neil Toronto
47fcdd4916 Sped up floor-log/base and ceiling-log/base, and made them correct on flonum inputs.
This change significantly increases the speed of number formatting, making extreme-bounds-tests.rkt run in about 1/4 the time.

Should consider moving these into racket/math, since floor-log/base generalizes order-of-magnitude.
2012-02-01 09:44:47 -07:00
Neil Toronto
713772959f Clipping lines now uses exact arithmetic. Fixes visual issues with plotting inexact functions at very small scales. Every plot should render correctly at every scale now. 2012-02-01 09:44:47 -07:00
Neil Toronto
f966ea8876 Removed test byproducts accidentally committed in d020c75202
Please merge into release
2012-01-23 15:56:12 -07:00
Neil Toronto
015625e732 PLoT documentation for new renderers and plot/utils (code changes are only to move code around so a previously public function could be public again)
Many little doc fixes

Closes PR 12433

Closes PR 12435

Please please please merge into release
2012-01-23 15:56:11 -07:00
Matthew Flatt
d020c75202 remove libfit 2011-12-21 16:17:56 -07:00
Ryan Culpepper
f99d79ef10 pruned unstable/contract
Removed unused code. Removed nat/c, pos/c as they correspond to
standard predicates.
2011-12-18 13:56:00 -07:00
Neil Toronto
3e895b7072 Plot performance improvement: precalculated light, view and half dir
Color flonum-to-byte conversion handles special flonums (hopefully helps with Marijn's problem)
2011-12-07 10:56:08 -07:00
Neil Toronto
73615de58f Precision improvements for user functions that return flonums
Performance: 2d-plot-area% now uses flonums internally as much as possible
2011-12-01 13:26:36 -07:00
Neil Toronto
f41fce1fc3 Finished icons docs, renamed racket-icon-style to default-icon-style 2011-11-29 12:11:07 -07:00