Matplotlib: add twin y axis without using its values in the plots
问题 This is to clarify the question title. Say you have four lists of integers, with which you want to produce a scatter plot: a=[3,7,2,8,12,17] b=[9,4,11,7,6,3] c=[9,3,17,13,10,5] d=[5,1,1,14,5,8] You also have a function, for simplicity f(x)=1/x , that applies to all lists, so that: from __future__ import division a1=[1/i for i in a] b1=[1/i for i in b] c1=[1/i for i in c] d1=[1/i for i in d] My question: how to add a second y axis, knowing that the values returned by the function range from 0