Producing a plot that contains two different y-axis scales

Hi

I'm trying to produce a single plot containing two different datasets
that share the same x-axis but different y-axes, i.e. I would like one
y-axis to be on the left of the plot and the other on the right hand
side. I've looked for example that illustrates how to do this but have
been unable to find an example. Can anyone point me to and example or
the appropriate methods that would allow me to do this?

Cheers

Adam

Hi Adam,

···

On Thursday 19 June 2008 8:01:32 pm Adam Mercer wrote:

I'm trying to produce a single plot containing two different datasets
that share the same x-axis but different y-axes, i.e. I would like one
y-axis to be on the left of the plot and the other on the right hand
side. I've looked for example that illustrates how to do this but have
been unable to find an example. Can anyone point me to and example or
the appropriate methods that would allow me to do this?

You are looking for two_scales.py, it is distributed with matplotlib's
collection of examples:
http://matplotlib.sourceforge.net/matplotlib_examples_0.98.0.zip

Darren

Thanks Darren, thats exactly what I was after. I must of overlooked that.

Cheers

Adam

···

On Thu, Jun 19, 2008 at 7:07 PM, Darren Dale <dsdale24@...287...> wrote:

You are looking for two_scales.py, it is distributed with matplotlib's
collection of examples:
http://matplotlib.sourceforge.net/matplotlib_examples_0.98.0.zip