Re: [racket-users] Science graphics with Racket?

2017-10-23 Thread Lawrence Bottorff
This is amazing! Thank you very much! On Mon, Oct 23, 2017 at 4:49 PM, Jens Axel Søgaard wrote: > I forgot to show how to make a graph. > > #lang racket > (require racket/draw metapict metapict/graph) > > (set-curve-pict-size 300 300) ; width and height of image >

Re: [racket-users] Science graphics with Racket?

2017-10-23 Thread Jens Axel Søgaard
I forgot to show how to make a graph. #lang racket (require racket/draw metapict metapict/graph) (set-curve-pict-size 300 300) ; width and height of image (ahlength 1.0); size of arrow head (define (f x) (sin x)) (define p (with-window (window -12 12 -12 12) ;

Re: [racket-users] Science graphics with Racket?

2017-10-23 Thread Jon Zeppieri
On Mon, Oct 23, 2017 at 3:04 PM, Lawrence Bottorff wrote: > I'd like to use Racket to generate scalable (svg?) graphics like gnuplot or > GeoGebra does. For example, I'd like to create a cartesian coordinate graph > system, then draw functions on it. One thing in particular

Re: [racket-users] Science graphics with Racket?

2017-10-23 Thread Jens Axel Søgaard
Here is how to do it using MetaPict: #lang racket (require racket/draw metapict) (set-curve-pict-size 300 300) ; width and height of image (ahlength 1.0); size of arrow head (define p (with-window (window -12 12 -12 12) ; xmin, xmax, ymin, ymax (draw

[racket-users] Science graphics with Racket?

2017-10-23 Thread Lawrence Bottorff
I'd like to use Racket to generate scalable (svg?) graphics like gnuplot or GeoGebra does. For example, I'd like to create a cartesian coordinate graph system, then draw functions on it. One thing in particular would be to draw a graph of a circle based on the standard form of a circle, e.g., x^2