SourceForge logo
SourceForge logo
Menu

matplotlib-users

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
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
js...@cf... 60 Garden Street, MS 83
phone: (617) 496-7981 Cambridge, MA 02138-1516
 cell: (781) 363-0035 USA
______________________________________________________________
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /