old_contents: """
  Bar Chart with Line on Dual Axis
  --------------------------------
  This example shows how to combine two plots and keep their axes.
  """
  # category: bar charts
  import altair as alt
  from vega_datasets import data
  
  source = data.wheat.url
  
  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).resolve_scale(
      y='independent'
  ).properties(width=600)
  
new_contents: """
  Bar Chart with Line on Dual Axis
  --------------------------------
  This example shows how to combine two plots and keep their axes.
  """
  # category: bar charts
  import altair as alt
  from vega_datasets import data
  
  source = data.wheat.url
  
  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)
  
subject: Update bar_and_line_with_dual_axis.py