0
$\begingroup$

I am trying to find the reflection function. Here is my function and its graph.

eq[n_, \[Beta]_, a_] :=  Hypergeometric1F1[1/2 - 1/4 a, n + 1, \[Beta]]
ED[n_, a_, k_Integer: 1] := \[Beta] /.   FindRoot[eq[n, \[Beta], a] == 0, {\[Beta], 0}]
rootslist[n_Integer, k_Integer, a_Integer] :=  Rest@FoldList[
FindRoot[eq[n, \[Beta], #2] == 0, {\[Beta], #1}][[1, 2]] &, 0,Range@a]
firstroot = Table[rootslist[n, 1, 50], {n, 0, 5}]
gr = ListLinePlot[firstroot, PlotRange -> Automatic, AxesLabel -> {(2 - 4 a), \[Beta]},
frame -> False]

If I tried this I can get the function of a graph, (x-axis:a and y-axis:$\beta$). I am wondering how to get the reflection function of this? (x-axis:$\beta$ and y-axis:a)? I have tried this code, but it didn't work.

Show[gr, Plot[a, {a, Automatic}, PlotStyle -> Black], 
gr /. L_Line -> {Red, GeometricTransformation[L, ReflectionTransform[{-1, 1}]]}, PlotRange   
-> All]
$\endgroup$
1
  • $\begingroup$ Welcome to our site, Keith! You probably didn't know or guess, but searching for keywords like listlineplot axes would have spared you the effort of re-asking this question. $\endgroup$
    – whuber
    Apr 25, 2013 at 3:07

1 Answer 1

0
$\begingroup$

Just swap the Axes:

ListLinePlot[((Partition[#, 2] & /@ (Riffle[#, Range@50] & /@ firstroot))[[All, 2 ;;]])]

enter image description here

$\endgroup$
1
  • $\begingroup$ Belisarius, I myself have used a combination of Riffle and Partition so often that I made myself remember to use that. However, I was very glad to hear Thread did exactly this. Perhaps interesting: ListLinePlot[(Thread[{#, Range@50}] & /@ firstroot)[[All, 2 ;;]]]. But maybe I'm being annoying :P. $\endgroup$ Jun 7, 2013 at 11:28

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