Facet without column or row
See original GitHub issueWith altair < 3.0, I was able to do this:
[1]
import altair.vegalite.v2 as alt
from vega_datasets import data
source = data.cars()
line = alt.Chart().mark_line().encode(x="Year", y="mean(Miles_per_Gallon)")
line.facet(data=source)
And then, on another jupyter cell, quickly iterate with facet plot with:
[2]
line.facet(data=source, column='Origin')
However, I get Javascript Error: Cannot read property 'length' of undefined
when I specify a facet plot without column or row with altair 3.0.
Is there a way to specify a plot and a facet plot from line
?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Lay out panels in a grid — facet_grid • ggplot2
facet_grid () forms a matrix of panels defined by row and column faceting variables ... there should be no faceting on this dimension...
Read more >17 Faceting - ggplot2: Elegant Graphics for Data Analysis
facet_grid () has an additional parameter called space , which takes the same values as scales . When space is “free”, each column...
Read more >Facet by different data columns — facet_matrix • ggforce
The facet_matrix() facet allows you to put different data columns into different rows and columns in a grid of panels.
Read more >How to specify columns in facet_grid OR how to change labels ...
I can use facet_grid so that I can take advantage of the labeller function but then there seems to be no straightforward way...
Read more >Facets
This relieves the constraint that ggplot2::facet_grid() has that a scale can only be free between rows and columns of the layout, and instead...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi Jake, I can confirm that with the current
master
branch, both ways of declaring data (withalt.Chart(data)
andchart.properties(data=data)
) work correctly, even with layered charts. Thank you for the awesome support.Another note, in case it helps your current workflow: in place of the empty facet, you can always do: