0

Consider some function f[x,y] where 10^-5 < x < 1 and 10^-8 < y < 10^6. As for example,

f[x_,y_]=Exp[-10^5. x^5 y]x^6

I want to make a density plot in the logarithmic scale (similar to LogLogPlot). The simplest option is to make

DensityPlotp[f[10^x,10^y],{x,-5,0},{y,-8,6}]

However, in this case, axes will show log[x], log[y] instead of x,y.

Could you please tell me how to make this thing properly?

John Taylor
  • 5,701
  • 2
  • 12
  • 33
  • Did you try ScalingFunctions? – Michael E2 Nov 08 '20 at 18:40
  • Possible duplicate: https://mathematica.stackexchange.com/questions/147181/listdensityplot-with-logarithmic-scale . Related: https://mathematica.stackexchange.com/questions/229617/minor-log-ticks-on-x-axis-of-densityplot – Michael E2 Nov 08 '20 at 18:47

1 Answers1

2

As Michael noted, you can use ScalingFunctions, for both x and y axes.

DensityPlot[f[x, y], {x, 10^-5, 1}, {y, 10^-8, 10^6}, 
    ScalingFunctions -> {"Log", "Log"}, PlotRange -> All, 
    PlotLegends -> Automatic]

Most of the values are near zero, so you'll need to use PlotRange to see the full range of values. PlotLegends shows the range.

tad
  • 1,875
  • 4
  • 9