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

Adjoint overlay #1213

Merged
merged 4 commits into from Mar 16, 2017
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+5 −6
Diff settings

Always

Just for now

Python3 fixes

  • Loading branch information...
Philipp Rudiger Philipp Rudiger
Philipp Rudiger authored and Philipp Rudiger committed Mar 16, 2017
commit afa88e3b3b63aab02cafa0da91d0afa39b9cfe52
Copy path View file
@@ -103,7 +103,7 @@ def __mul__(self, other, reverse=False):
layer2 = self if reverse else other
adjoined_items = []
if isinstance(layer1, AdjointLayout) and isinstance(layer2, AdjointLayout):
adjoined_items = layer1.data.values()
adjoined_items = list(layer1.data.values())
adjoined_items[0] = layer1.main*layer2.main
too_many = False
if layer1.right is not None and layer2.right is not None:
@@ -126,10 +126,10 @@ def __mul__(self, other, reverse=False):
"do not match and the AdjointLayout can "
"hold no more than two adjoined plots.")
elif isinstance(layer1, AdjointLayout):
adjoined_items = layer1.data.values()
adjoined_items = list(layer1.data.values())
adjoined_items[0] = layer1.main * layer2
elif isinstance(layer2, AdjointLayout):
adjoined_items = layer2.data.values()
adjoined_items = list(layer2.data.values())
adjoined_items[0] = layer1 * layer2.main

if adjoined_items:
Copy path View file
@@ -36,9 +36,8 @@ def dynamic_mul(*args, **kwargs):
items = [(k, self * v) for (k, v) in other.items()]
return other.clone(items)
elif isinstance(other, AdjointLayout):
main = ('main', self * other.main)
adjoined_items = other.items()
adjoined_items[0] = main
adjoined_items = list(other.data.values())
adjoined_items[0] = self * other.main
return other.clone(adjoined_items)

return Overlay.from_values([self, other])
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.