On Monday, September 14, 2015 07:53:31 PM Michael Prentiss wrote: > I was thinking the second option. It would be great to be able to hotwire > the gadfly part and read > in plots with pointers to previous rendered images.
Gadfly/Compose seems likely to get support for bitmaps soon: https://github.com/dcjones/Compose.jl/pull/141 I imagine that should help. Of course, from a jpg all "vector" information will be lost. > I do not understand > how difficult it would be > to mimic gadfly output from other sources. How tricky was that part of > this work? Gadfly & Compose were in pretty good shape for this already; aside from just learning the codebase, the biggest job was figuring out how to report back the screen-coordinates used for rendering. In the end it was a few lines added to the hijacked "drawpart" method (https://github.com/JuliaGraphics/Immerse.jl/blob/2f3aa049d09e58af44790d83e65752eddc121caf/src/compose.jl#L39-L162; hijacked because > 90% of the lines were copied directly from Compose). But I also needed quite a few utilities for navigating and manipulating Compose Context trees, and had to add several new features to both Gadfly and Compose (e.g., tagging). Daniel was a wonderful collaborator on that work. A nice consequence is that having built that infrastructure, we haven't yet seen all the possible applications. (Hint: see the setproperty! and getproperty methods in that same file.) Bottom line: I imagine that similar things could be done for other graphics or plotting packages, if that's what you're wondering. I don't plan on tackling that myself any time soon, because it was a fair (~2 weeks) amount of work to get all this working just with Gadfly. But I suspect that it would be easier for a 2nd source, since that time also included building Immerse itself and most of that would not need repetition. Best, --Tim