[racket-users] Re: Plot with text annotation inside the graph

2016-10-14 Thread Alex Harsanyi
You could try using a point-label or a function-label with a point size of 0, like this: (plot (list (function-interval sin (lambda (x) 0)) (function-label (lambda (x) (* (sin x) 0.2)) -1.8 "sin(x)" #:point-size 0)) #:x-min -2 #:x-max 2) Alex. On Saturday, October 15, 2016 a

Re: [racket-users] Re: Plot ticks with arbitrary strings - breaks DrRacket

2016-10-14 Thread Alex Harsanyi
On Saturday, October 15, 2016 at 9:19:20 AM UTC+8, Robby Findler wrote: > Is there a contract we could add somewhere? Well, the contract should be that the number of elements in the output list should be the same as the number of elements in the input list. I'm not sure how that would be expres

[racket-users] Plot with text annotation inside the graph

2016-10-14 Thread Marc Kaufmann
Hi all, I am creating some graphs where I want to label various regions as region A, B, C, and so on. Currently I am doing this by coloring the regions differently and having the labels in legend: (plot-file (list (axes) (function-interval (lambda (x) 0) MD 0 E_x #:label "F

Re: [racket-users] Re: Plot ticks with arbitrary strings - breaks DrRacket

2016-10-14 Thread Robby Findler
Is there a contract we could add somewhere? Robby On Fri, Oct 14, 2016 at 6:31 PM, Alex Harsanyi wrote: > Your tick format function returns less labels than the number of items in the > pre-ticks. It should return one label for each pre-tick object (I just > printed out the lengths from the f

[racket-users] Re: Plot ticks with arbitrary strings - breaks DrRacket

2016-10-14 Thread Alex Harsanyi
Your tick format function returns less labels than the number of items in the pre-ticks. It should return one label for each pre-tick object (I just printed out the lengths from the function to find this out.) To fix this, I replaced the format function with (for/list (((t idx) (

[racket-users] One more question about murphy/protobuf

2016-10-14 Thread David Storrs
With a helpful pointer from Dupéron Georges I found the protocol-buffer compiler and managed to create the messages I needed. I have things working now, but one (hopefully final) issue: I can serialize any message I want, send it through a port, and deserialize it on the other end, but so far I ha

[racket-users] Re: Planet package murphy/protobuf for Protocol Buffers

2016-10-14 Thread Dupéron Georges
Maybe it's in /Users/dstorrs/Library/Racket/bin, or something like this? otherwise, this command shoul hopefully show the file's path if it is on your system: find / -name protoc-gen-racket -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To u

Re: [racket-users] Unable to track down what is requiring inclusion of tzinfo module - Resolved

2016-10-14 Thread Ian Thomas
On Friday, October 14, 2016 at 12:39:19 AM UTC-4, Sam Tobin-Hochstadt wrote: > That's likely the problem. Usually you need to use define-runtime-path or a > variant of that to cooperate with raco exe. > > Sam > >From what I'm reading in the documentation, that sounds right. "Library modules o

[racket-users] Plot ticks with arbitrary strings - breaks DrRacket

2016-10-14 Thread Laurent
Hi all, I'm trying to write a `string-ticks` function to have arbitrary strings on the (y) axis. It mostly works, but as soon as I try to zoom by selecting a rectangle *that touches upper left corner of the plot frame* DrRacket's interaction window goes crazy and I have to restart it. Here's the

[racket-users] Re: demande d'aide

2016-10-14 Thread frd
Bonjour, Je débute en racket aussi, donc mes commentaires ne vous seront pas forcément utiles :-) Quelques considerations generales: - pour obtenir plus d'aide, je vous conseille de poser votre question en anglais, - ensuite, la question posée est assez vague: decomposez-la en questions plus pré

Re: [racket-users] demande d'aide

2016-10-14 Thread Jens Axel Søgaard
You need to break down your problem in smaller pieces. Here is a suggestion of some helper functions to get you started. digit->image : number -> image Given a digit (0,1,...,9) as input, return an image of that digit. number->digits : number -> listof-numbers Given a natural number return