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

Multiple axis in fake faceted views #39

Closed
giorgi-ghviniashvili opened this issue May 5, 2021 · 13 comments
Closed

Multiple axis in fake faceted views #39

giorgi-ghviniashvili opened this issue May 5, 2021 · 13 comments
Assignees

Comments

@giorgi-ghviniashvili
Copy link
Collaborator

I got an idea to render two vega specs, one for axis and not touched by Gemini and second for fake faceted with animated by Gemini.

@giorgi-ghviniashvili giorgi-ghviniashvili self-assigned this May 5, 2021
@giorgi-ghviniashvili
Copy link
Collaborator Author

giorgi-ghviniashvili commented May 5, 2021

@jhofman Started working on this, but finding it hard to exactly match points:

Upper ones are real ones, below ones are faked.

image

Will need a bit more work on this.

@jhofman
Copy link
Contributor

jhofman commented May 5, 2021

@giorgi-ghviniashvili looks like a pretty good start, in fact i'm not sure what looks "off" other than the lower-left panel where the blue points are outside of the axes?

@giorgi-ghviniashvili
Copy link
Collaborator Author

Points are duplicated, one point is from real faceted view, the other one is faked (a bit below). These two needs to match exactly and have only one circle, like this:

image

@giorgi-ghviniashvili
Copy link
Collaborator Author

giorgi-ghviniashvili commented May 6, 2021

@jhofman made it work:

Two vega graphs are overlaid.

Inner axes is drawn using "vega spec for axis".

Outer axes done with fake faceted spec. Notice that because we are using fake faceted view we can have facet axis on the right, which would not be possible with real faceted view because it is not supported yet.

image

Will do animation now.

@sharlagelfand
Copy link
Collaborator

@giorgi-ghviniashvili this looks great! If I want to pass a title for the y-axis in the jitter/summary frames, does it make sense to just pass that through in the y encoding title?

@giorgi-ghviniashvili
Copy link
Collaborator Author

giorgi-ghviniashvili commented May 7, 2021

@sharlagelfand , yes I think it will work. Please also remove axis: null from spec you want additional axis, and add title to it.

@sharlagelfand
Copy link
Collaborator

Just to keep track of here, previously the axis appeared as soon as the points moved from infogrid -> jitter

axes.appear.sooner.mov

But now it looks like they only appear when moving jitter -> summary

axes.appear.later.mov

Probably better to keep them on for longer (the first case)

@jhofman
Copy link
Contributor

jhofman commented May 12, 2021

@giorgi-ghviniashvili as discussed yesterday, can you check and confirm that the bounding boxes of the real and fake axes line up?

@giorgi-ghviniashvili
Copy link
Collaborator Author

giorgi-ghviniashvili commented May 12, 2021

@jhofman yes, currently they line up correctly (tested various frames).

@giorgi-ghviniashvili
Copy link
Collaborator Author

As per @jhofman 's comment that points don't line up correctly:

image

@sharlagelfand could you please do this:

image

Avoid using decimals, and have 1, 2, 3 in axis.values. Adjust padding using scale.domain (and always include scale.domain).

We will get this:

image

image

@sharlagelfand
Copy link
Collaborator

Thanks @giorgi-ghviniashvili!

I have a question about the Y domain in the jitter and summary frames - I've set the Y domain to be the range of the data as we discussed so that the summary points are in the same range as the jitter points. It all looks good in the animation but when you actually click on the last summary frame, you can see it has a different Y domain:

Screen.Recording.2021-05-19.at.8.31.58.AM.mov

Do you know why the domain looks like this? The actual frame itself in the vega lite editor doesn't look like that:

visualization(3)

In the specs here you can see that the Y domain is the same for the jitter and the summary frame - is there something going on with that final frame that changes its axis? Thanks!

@giorgi-ghviniashvili
Copy link
Collaborator Author

@sharlagelfand good catch, fixed it. Please update shiny app with this commit.

@sharlagelfand
Copy link
Collaborator

Looks good, thanks @giorgi-ghviniashvili!

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

No branches or pull requests

3 participants