I want to create a special plot with two x axis and one y axis. The bottom X axis increases in value, and the top X axis decreases in value. I have an x-y
pair, for which I want to plot y over one x-axes and on the top x'
axes with different scale: (x' = f(x))
.
In my case, the conversion between x
and x'
is x' = c/x
, where c is a constant. I found an example here, which deals with transformations of this kind. Unfortunately this example doesn't work for me (no error message, the output is just not transformed).
I am using python 3.3
and matplotlib 1.3.0rc4 (numpy 1.7.1)
Does anybody know a convenient way to do this with matplotlib?
EDIT: I found an answer on stackoverflow (https://stackoverflow.com/a/10517481/2586950) which helped me to get to the desired plot. As soon as I can post Images (due to Reputation-Limit), I will post the answer here, if anyone is interested.