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 easily aligned multiple plots, add additional elements outside the plots (in other embedded canvases), or overwrite the plot as I want. This works great for plots that are embedded in graphical programs - I do a lot of analysis work that way. I assume you could use plot/pict in a similar manner, but I never have.
I'm not sure that helps your particular scenario. I would be glad to point you to code snippets. Doug On Wed, Dec 5, 2018 at 4:22 PM Matt Jadud <m...@jadud.com> wrote: > 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, and I'm not clear where/how, if I were to > implement in a similar way, where I would override/parameterize for > changing the axes. (There's near and far axes (bottom and top) in 2D > renderers, but I don't seem to get to decide where they go vertically in > the plot space.) > > Then, would I be drawing to it using the utilities built into plot, or do > I convert to a dc% in some way, and leverage pict, or... ? > > In short, I feel like I should be building on plot/extending plot, I don't > want to reinvent wheels that are already invented, but I'm not yet sure > where the best starting point is. Do I develop a new plot type, dig deeper > into how axes are drawn, or do I do everything with overlays, or ...? > > Many thanks, > Matt > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.