Re: [racket-users] Questions about plot

2018-12-05 Thread Matt Jadud
Hi Doug, I suspect (in this case), I'd like to build on/leverage plot, because I'd like things to place nice in DrRacket's REPL (for example), and be able to play with the plot ecosystem. To save you any work, I'll circle around later if future me thinks current me was wrong. This is crossing wit

[racket-users] Re: Questions about plot

2018-12-05 Thread Alex Harsanyi
The plot library creates plots by assembling elements (such as axes and renderers) together. For example, the plot library does no have a scatter plot type, instead points can be rendered on a plot, but lines could also be rendered on the same plot. You can also control many other things, such as

Re: [racket-users] Questions about plot

2018-12-05 Thread Doug Williams
Matt, I have done many extensions to plots for a variety of reasons. Most of my extensions are a third option: Build on dc%. I typically make a new widget, say based on a horizontal or vertical panel with one or more embedded canvases. Then I use plot/dc to render directly on those canvases. I can

[racket-users] Questions about plot

2018-12-05 Thread Matt Jadud
Hi all, If I want to develop a new plot type, would I do best to: 1. Build on plot, or 2. Build on pict? I suspect #1. If I want to (say) have a number line, I would like to have an x-axis, centered in my plot area (vertically), and no y-axis. I've been reading the plot code for scatter plots,

Re: [racket-users] The performance of ‘set’ vs. lists+‘remove-duplicates’

2018-12-05 Thread 'Leandro Facchinetti' via Racket Users
The sets are about 20 elements in size. It seems that ‘member’ before ‘cons’ is marginally faster than ‘remove-duplicates’ after ‘cons’, as one would expect. But it’s the strangest thing: in some cases switching from sets to lists with unique elements changes the meaning of the program! I spent

[racket-users] Re: The performance of ‘set’ vs. lists+‘remove-duplicates’

2018-12-05 Thread Tony Garnock-Jones
I suspect it will be slow because sets are generics, and generics are slow. For my application, it has worked well to replace set/seteq with hash/hasheq mapping to #t; this only works when you have total control over set representation as an implementation detail, of course! But for me it sped