ではggplot2
、行と列の両方にまたがるファセットを持つファセット プロットを簡単に作成できます。でこれを行う「巧妙な」方法はありaltair
ますか? facet
ドキュメンテーション
ファセットを単一の列にプロットすることは可能です。
import altair as alt
from vega_datasets import data
iris = data.iris
chart = alt.Chart(iris).mark_point().encode(
x='petalLength:Q',
y='petalWidth:Q',
color='species:N'
).properties(
width=180,
height=180
).facet(
row='species:N'
)
そして一列に、
chart = alt.Chart(iris).mark_point().encode(
x='petalLength:Q',
y='petalWidth:Q',
color='species:N'
).properties(
width=180,
height=180
).facet(
column='species:N'
)
しかし、多くの場合、複数の列/行を使用してグリッドにプロットしたいだけです。つまり、単一の列/行に並んでいるものは特に意味がありません。
たとえば、 http : //www.cookbook-r.com/Graphs/Facets_facet_wrap
(ggplot2)/#facetwrapから参照してください。ggplot2