Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow any plot as adjoints #358

Closed
jbednar opened this issue Dec 14, 2015 · 9 comments
Closed

Allow any plot as adjoints #358

jbednar opened this issue Dec 14, 2015 · 9 comments

Comments

@jbednar
Copy link
Member

jbednar commented Dec 14, 2015

Currently, histograms (and some other types of plots?) can be used as adjoints in layouts, as in the home page example:

holohome

But often we want to plot some quantity that has a relationship to the x or y axis of the main plot, and it would be nice to be able to put whatever that plot is in the same position that the histogram fills. E.g. in the home page example, the slice would actually make sense as an adjoint along the top, since it's a slice along that axis:

holohome2

Is this feasible? It would make for much more effective layouts in some cases, allowing the main plot to be large while still allowing space for the adjoint plots.

@jbednar
Copy link
Member Author

jbednar commented Dec 14, 2015

Alternatively, eventually we really need to have more control over the layout in general, e..g. to make some plots take twice the width of others (so that here the main plot could be big with the two other plots side by side below or above it). But supporting any plot as an adjoint seems more feasible in the short term.

@philippjfr
Copy link
Member

The main obstacle to that is to make sure that all plot types support inverting the axes. Should be fairly straightforward but will take some time.

@jbednar
Copy link
Member Author

jbednar commented Dec 14, 2015

What would be the syntax? Something like

((fractal * HLine(y=0)).hist().adjoin(fractal.sample(y=0)))

?

@philippjfr
Copy link
Member

Currently it's:

(fractal * HLine(y=0)).hist()) << fractal.sample(y=0)

@jbednar
Copy link
Member Author

jbednar commented Dec 14, 2015

Thanks. Currently that gives a fairly unhelpful "KeyError" and no other output.

@jlstevens
Copy link
Contributor

We introduce the << operator because we wanted the adjoint plots to be general (i.e what this issue is asking for). That operator is so rarely used right now, I would like to either see it either go away or get used more often!

Given that removing the operator would require a new method (e.g adjoin above), I would hope resolving this issue will mean << gets used more.

@philippjfr
Copy link
Member

This also reminds me that we don't have a way to style adjoined plots separately from normal plots, so we can't expose any additional plot or style options an adjoined plot adds. Thought we had an issue about that but can't find it right now.

@vascotenner
Copy link
Contributor

Furthermore, AdjointLayouts are not in the tutorials yet. hv.help(hv.AdjointLayout) points to something like: http://holoviews.org/Tutorials/Containers.html#AdjointLayout

@philippjfr
Copy link
Member

Furthermore, AdjointLayouts are not in the tutorials yet. hv.help(hv.AdjointLayout) points to something like: http://holoviews.org/Tutorials/Containers.html#AdjointLayout

Good point, we had originally considered deprecating them, but they are useful so we should definitely document them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants