0
$\begingroup$

I can't figure out how to make ListDensityPlot with both logarithmic coloring and logarithmic scale on both x and y axis.

Logarithmic scale in a DensityPlot and its legend

This question worked for ListDensityPlot plot as well - I as able to color plot points in logarithmic coloring scale. But how do you add logarithmic scale to x and y axis as well?

I would appreciate any help.

$\endgroup$
  • $\begingroup$ Why not simply plot the log of the data? $\endgroup$ – yohbs May 30 '17 at 0:42
1
$\begingroup$

In M11.2 you can use ScalingFunctions to make the ticks logarithmic, for example:

DensityPlot[
    Sin[x +y]^2 ,{x, 1, 20}, {y, 1, 20},
    ScalingFunctions -> {"Log", "Log", "Linear"},
    PlotPoints -> 40
]

enter image description here

Change "Linear" to "Log" if you want the values to be logarithmic as well.

$\endgroup$
0
$\begingroup$

You can manually Plot the log of your function and specify Ticks (e.g. Ticks -> {{{1, 10}, {2, 100}, {3, 1000}}, {{1, 10}, {2, 100}, {3, 1000}}}) and ColorFunction.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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