Plot with a shared y axis with two different x axes oriented in opposite directions.

Hi All,

I’m trying to recreate some plots from a old 1970’s era report. This is a single plot with an elevation-capacity curve and an elevation-area curve overlaid on top of each other.

The plot needs to have a shared y-axis (elevation). The elevation-capacity curve has an x-axis along the bottom that goes left to right. The elevation-area curve has a x-axis with a different scale that goes right to left along the top.

I’ve tried using twiny and reversing the second x axis but that ends up reversing both. Any help would be appreciated. I’ve attached a low res image of one of the original plots for reference.

Thanks,

  • dharhas

01_02.0_I.rating_curves_small.png

Hi Darhas,

How did you invert the axis? I find that it works for me to do:
ax.plot(x1,y1)
ax2 = ax.twiny()
ax2.plot(x2,y2)
ax2.invert_xaxis()

Jon

···

On Wed, 2013-01-30 at 16:45 +0000, Dharhas Pothina wrote:

Hi All,

I'm trying to recreate some plots from a old 1970's era report. This
is a single plot with an elevation-capacity curve and an
elevation-area curve overlaid on top of each other.

The plot needs to have a shared y-axis (elevation). The
elevation-capacity curve has an x-axis along the bottom that goes left
to right. The elevation-area curve has a x-axis with a different scale
that goes right to left along the top.

I've tried using twiny and reversing the second x axis but that ends
up reversing both. Any help would be appreciated. I've attached a low
res image of one of the original plots for reference.

Thanks,

- dharhas

--
______________________________________________________________
Jonathan D. Slavin Harvard-Smithsonian CfA
jslavin@...1081... 60 Garden Street, MS 83
phone: (617) 496-7981 Cambridge, MA 02138-1516
cell: (781) 363-0035 USA
______________________________________________________________