2
$\begingroup$

This question already has an answer here:

This question has appeared in many forms online, but none directly apply to my problem. I have a quite complicated, albeit bijective function of the form

F: X->Y.

Concretely, here is the function of two variables, which I named "Graham":

Graham[d_, σ_] := 
Module[{β, ϵ0, h, m, e0, ϕ0},
h = 6.62606957*10^(-34);
ϵ0 = 8.8541878176*10^(-12);
m = 9.10938291*10^(-31);
e0 = 1.6*10^(-19);

β = 4/(((5*((3/5 2^(-1/3) (3/π)^(
2/3))*((ϵ0*
h^2)/(m*(e0)^(5/3)))*(d^(-5/3)*σ^(-1/3)))/
3)*(1/2)^(2/3))^(3/4)*Sqrt[5]);

ϕ0 = (Cosh[β/2])/(β*Sinh[β/2]) - 
1/(β*Sinh[β/2]);

Return[ϕ0]]

A relevant plot of this function would be

Plot[{Graham[10^-9, σ]}, {σ, 0, 1}]

Graham function

I want to reflect this function over the x=y line. I know how to do it point-wise and using listline plot and the transformation

rt = ReflectionTransform[{1, -1}];

rt[{x, y}]
{y, x}

but I'm sure there must exist a way to somehow reflect it around the identity x=y. Help is much appreciated!

$\endgroup$

marked as duplicate by J. M. will be back soon May 28 '15 at 16:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4
$\begingroup$

Here are a couple of approaches:

  1. using ParametricPlot

    Quiet@ParametricPlot[{Graham[10^-9, t], t}, {t, 0, 1}, 
    AspectRatio -> Full]
    
  2. Let p be your plot and just extract points:

    ListPlot[Reverse /@ First[Cases[p, Line[x__] :> x, -1]], 
    Joined -> True]
    

enter image description here

$\endgroup$
  • $\begingroup$ Thank you for your fast reply, it totally works! $\endgroup$ – drabus May 28 '15 at 13:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.