title: Assigning two y-axes to two lineseries in oxyplot (C# WPF)
body: <p>I've searched low and high for an answer to this question, but I only find older answers related to Windows Forms and not WPF. Nothing is mentioned in the documentation.</p>
  
  <p>I have two lineseries that I plot using <a href="http://www.oxyplot.org" rel="nofollow noreferrer">oxyplot</a>. However, I am not able to assign each series to a separate axis (I need two due to different scale).</p>
  
  <p>In the examples found it's stated that one should assign <em>key="somename"</em> to the axis definition and <em>YAxisKey="somename"</em> in the line series. However, I am given an error message that these properties does not exist. Any help is greatly appreciated. See xaml code attached below</p>
  
  <pre><code>&lt;Wpf:Plot    
      DockPanel.Dock="Bottom"
      x:Name="OxyPlot1" 
      Title="{Binding Title}" Height="400" Margin="0,0,0,0"&gt;
  
      &lt;Wpf:Plot.Axes&gt;        
          &lt;Wpf:LinearAxis
              x:Name="Psiaxis" Position="Left" Title="Pressure (PSI)"
              TickStyle="Inside" StartPosition="0"/&gt;
          &lt;Wpf:LinearAxis
              x:Name="Gpmaxis" Position="Right" Title="Flow In (GPM)"
              TickStyle="Inside" StartPosition="0"/&gt;
          &lt;Wpf:DateTimeAxis
              Position="Bottom" TickStyle="Inside" IntervalType="Seconds" 
              MinorGridlineStyle="Dash" MajorGridlineStyle="Solid"
              StringFormat="dd:MM:yyyy HH:mm:ss"/&gt;
          &lt;/Wpf:Plot.Axes&gt;
  
          &lt;Wpf:LineSeries 
              x:Name="SelectedPointsPressure"
              Height="100" 
              Width="100" 
              Title="Pressure (psi)"
              ItemsSource="{Binding ToPlotPoints1}"/&gt;
  
          &lt;Wpf:LineSeries
              x:Name="RegressionPoints"
              Height="100"
              Width="100"
              LineStyle="Solid"
              Color="Blue"
              Title="Linear least squares fit"
              ItemsSource="{Binding ToPlotPoints2}"/&gt;
  
          &lt;Wpf:LineSeries 
              x:Name="SelectedPointsFlowin"
              Height="100" 
              Width="100" 
              LineStyle="Solid"
              Color="Green"
              Title="Flow In (gpm)"
              ItemsSource="{Binding ToPlotPoints3}"/&gt;
      &lt;/Wpf:Plot&gt;
  </code></pre>