.. This document is auto-generated by the altair-gallery extension. Do not modify directly. .. _gallery_bar_and_line_with_dual_axis: Bar Chart with Line on Dual Axis -------------------------------- This example shows how to combine two plots and keep their axes. For a more polished version of this chart, see :ref:`gallery_wheat_wages`. .. altair-plot:: :code-below: import altair as alt from vega_datasets import data source = data.wheat() base = alt.Chart(source).encode(x='year:O') bar = base.mark_bar().encode(y='wheat:Q') line = base.mark_line(color='red').encode( y='wages:Q' ) (bar + line).properties(width=600) .. toctree:: :hidden: