I am trying to make my code readable and nice.
My functions are
W[L_, r_] := 1 + 3 L + 2 L^2 - 6 r*L - 6 L (r*L) + 6 (r*L)^2;
T[L_, r_, d_, koff_, u_, W_] := ((u/d^2)* W[L, r]+6 u (L - 1)) + koff (u/d^2) W[L, r]
Here I import my data
d0 = Import["t0_vs_L_koff0_u3_kon" <> # <> ".dat"] & /@ {"01", "1", "10", "102"};
d3 = Import["t0_vs_L_koff3_u3_kon" <> # <> ".dat"] & /@ {"01", "1", "10", "102"};
d6 = Import["t0_vs_L_koff6_u3_kon" <> # <> ".dat"] & /@ {"01", "1", "10", "102"};
After that I give a vector of parameters which I want to use
konVals = {0.1, 1, 10, 100};
And after that I make two plots for
koff=1
in usual axes
Show[Plot[Evaluate@Table[T[L, 0.5, n, 1, 10^3], {n, konVals}], {L, 2, 1000},
AxesLabel -> {"L", "T"},
PlotLabel -> "T vs L, koff=1",
PlotLegends -> konVals, PlotStyle -> {Red, Blue, Green, Orange}],
ListPlot[d0, PlotStyle -> {Red, Blue, Green, Orange}]]
and log-log axes
Show[LogPlot[
Evaluate@Table[T[L, 0.5, n, 1, 10^3], {n, konVals}], {L, 2, 1000},
AxesLabel -> {"L", "T"},
PlotLabel -> "T) vs L, koff=1",
PlotLegends -> konVals], ListLogPlot[d0],
Style -> {Red, Blue, Green, Orange}]
2 plots for
koff=10^3
in usual axes
Show[Plot[
Evaluate@Table[T[L, 0.5, n, 10^3, 10^3, W], {n, konVals}], {L, 2,
1000}, AxesLabel -> {"L", "T"},
PlotLabel -> "T vs L, koff=10^3",
PlotLegends -> konVals], ListPlot[d3],
Style -> {Red, Blue, Green, Orange}]
and log-log
Show[LogPlot[
Evaluate@Table[T[L, 0.5, n, 10^3, 10^3, W], {n, konVals}], {L, 2,
1000}, AxesLabel -> {"L", "T"},
PlotLabel -> "T vs L, koff=10^3",
PlotLegends -> konVals], ListLogPlot[d3],
Style -> {Red, Blue, Green, Orange}]
And for
koff=10^6
do the same thing
Show[Plot[
Evaluate@Table[T[L, 0.5, n, 10^6, 10^3, W], {n, konVals}], {L, 2,
1000}, AxesLabel -> {"L", "T"},
PlotLabel -> "T vs L, koff=10^6",
PlotLegends -> konVals], ListPlot[d6],
Style -> {Red, Blue, Green, Orange}]
and in log-log scale
Show[LogPlot[
Evaluate@Table[T[L, 0.5, n, 10^6, 10^3, W], {n, konVals}], {L, 2,
1000}, AxesLabel -> {"L", "T"},
PlotLabel -> "T vs L, koff=10^6",
PlotLegends -> konVals], ListLogPlot[d6],
Style -> {Red, Blue, Green, Orange}]
Could you please suggest the shortest and easiest way to do that? Can I download all data in one string? Can I than use this to plot everything much faster?
Grid[Table[{Plot[ # , {x, 2, 100}], LogPlot[ # , {x, 2, 100}]} &@ (x^ k) , {k, 3}]]
for some ideas. $\endgroup$