I would like to do a DensityPlot with logarithmic xy-axes and logarithmic color scale for the function
\begin{align} S(\epsilon_{v},\epsilon_{\phi}) = \frac{\pi}{\epsilon_{v}} \frac{\sinh \left(\frac{2 \pi \epsilon_{v}}{\pi^{2} \epsilon_{\phi}/6} \right)}{\cosh \left(\frac{2 \pi \epsilon_{v}}{\pi^{2} \epsilon_{\phi}/6} \right) - \cos \left(2 \pi \sqrt{\frac{1}{\pi^{2} \epsilon_{\phi}/6} - \left( \frac{\epsilon_{v}}{\pi^{2} \epsilon_{\phi}/6} \right)^{2}} \right)}\\ ~\\ \epsilon_{v} \to x , \epsilon_{\phi} \to y~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \end{align}
[Background: Considering velocity dependent Dark Matter interaction this function (Sommerfeld enhancement) arises when solving the corresponding Schrödinger equation with a Hulthén potential]
While searching for a solution I found these two posts:
1) Logarithmic scale in a DensityPlot and its legend
2) DensityPlot with one log axis
But I am searching in some sense a combination of these two ideas.
Alas I started using Mathematica only a few weeks ago and I am not familiar with all its features. Hence, I came to no satisfactorily result yet and would be very happy if anyone can help.
Here the Matematica code which I in principle took from 1):
f[x_, y_] :=
Pi/x * Sinh[
12*x/(Pi*y)]/(Cosh[12*x/(Pi*y)] -
Cos[2*Pi*Sqrt[ 6/(Pi*Pi*y) - (6*x/(Pi*Pi*y))^2]]);
plotter[min_, max_, NumberOfTicks_] :=
DensityPlot[f[x, y], {x, 10^(-6), 10^(0)}, {y, 1/(10^4), 1/(10^3)},
PlotPoints -> 10, PlotRange -> Full, ColorFunctionScaling -> False,
ColorFunction -> (ColorData["Rainbow"][
LogarithmicScaling[#, min, max]] &),
PlotLegends ->
BarLegend[{ColorData["Rainbow"], {0, 1}}, LegendMarkerSize -> 340,
Ticks -> ({LogarithmicScaling[#, min, max],
ScientificForm[#, 2]} & /@ (min (max/min)^
Range[0, 1, 1/NumberOfTicks]))]]
plotter[1, 10^(6), 6]
g[x_,y_] := f[10^x, 10^y]
and plotg
with the range{x, -6, 0}, {y, -4, -3}
. $\endgroup$