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/π)^(

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


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!


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

| improve this answer | |
  • $\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.