--
"Besides coordinate transformations, Compose also handles mixtures of relative and abosule coordinates. For example, 1w - 10mm is a well formed expression, giving the width of the parent canvas minus ten millimeters."
This mixing of relative and absolute coords is essential for good layout and often not very convenient to do. Julia's syntax makes this particularly nice looking.
Brian
Whenever a range of colors is used to convey information, problems arise. Human perception of color was shaped largely by the need for our hairier, tree-dwelling ancestors to tell when fruit is ripe.
We should try to factor out the most common low-level definitions, such as abstract color and shape types, Point, Line, Polygon, etc. into a Graphics or GraphicsBase package. This would be really minimal; the goal would just be to avoid having 6 different Point types floating around.
Thanks for the feedback everyone!
I'll think about what parts can be generalized and moved out of gadfly/compose. I think merging the color code in compose into the Color package is an easy first start. I'm tempted to try to integrate some of code handling units with Tim's units.jl in extras, since I'm borrowing ideas from there anyway.
I very much want to to see zooming and panning happen. It's difficult, but possible. I've thought of three ways.
1. Client/server: events get sent to Julia which redraws the plot and sends it back.
2. A lot more javascript: move most of the rendering to javascript where re-rendering on the fly is easier.
3. A little more javascript: pre-generate all the svg in julia, use javascript to pan/zoom/clip this prepared svg.
Awesome!I love your other work too (notably Quip), it's great to see so many bioinformatics/computational biologists getting involved with Julia.
--
Not all of this is possible currently. I've thought a little about it, but not enough to be sure how to proceed.Another simple problem I want to solve that gets at some of this is automatically rotating x-axis labels, or word-wrapping, when they wouldn't otherwise fit. There's no way to do that now. There should be a way to do it, but I think you're right that it would involve solving some sort of optimization problem (as opposed to just blindly transforming coordinates). This sort of automatic layout problem could get very complex (e.g., reimplementing latex), but maybe a very limited notion of automatic layout would fit our needs. The example you show is helpful to elucidate this.One roundabout way of tackling layout problems is trying to generate HTML and let browsers do the layout, since they already solve complex layout problems. But that would harm the ability to render directly to postscript or pdf, for example.
--
ls.AddConstraint(new double[] { 2, -1 }, new Variable[] { x1, x2 },
OperatorType.EQ, 0);Besides not fitting with the functional style of Compose, it's not too pretty.--
even not-so-simple) interaction is part of my own personal graphics roadmap,
and it seems to be for most everyone else, too. I think we're still in the
process of deciding the right backends/implementations/etc. Feel free to chime
in.
On Saturday, December 22, 2012 12:08:24 PM Daniel Jones wrote:I agree, it's not obvious how to solve this problem. After writing that last
> Not all of this is possible currently. I've thought a little about it, but
> not enough to be sure how to proceed.
email I thought, "wow, using LP to solve the layout problem is such an obvious
idea, I bet it's been thought of before." Indeed it has, numerous times.
Here's a link to a relatively recent paper:
https://www.cs.auckland.ac.nz/courses/compsci705s2c/lectures/geraldpapers/reading1_LutterothStrandhWeber.pdf
> Another simple problem I want to solve that gets at some of this is
> automatically rotating x-axis labels, or word-wrapping, when they wouldn't
> otherwise fit. There's no way to do that now.
Hmm, yes, that is a very important problem, and one to solve early. It seems
like there also needs to be an "askchild" facility, so that canvases can get
some of their geometric information from their contents. I haven't thought
about this yet at all, so I don't have anything that could be mistaken for
wisdom here.
> One roundabout way of tackling layout problems is trying to generate HTMLYes, I've also thought about punting an putting this off to other toolkits.
> and let browsers do the layout, since they already solve complex layout
> problems. But that would harm the ability to render directly to postscript
> or pdf, for example.
Like HTML, Tk (used for visual display in Winston) has a built-in layout
manager. So one option is to do direct support of the native toolkit. But as
you say, it's not obvious that we will be happy targeting only a single
backend, especially because not all backends have a layout manager. It seems
better to do the layout in Julia, and then hope that either (1) one can map
the Julia layout problem to the toolkit manager framework, or (2) hope that
the toolkit supports a callback interface so that Julia can just feed position
information in real time.
Peter Wang, any thoughts on this matter? Any possibilities for collaboration
among projects here, either at the level of ideas or code??
--