0
$\begingroup$

I think the colors will be more distinguishable with the logarithmic scales. How can I do it for the following plot? Thanx.

DensityPlot[(μ + η^2), 
    {μ, 0, 0.043}, {η, 0, 0.03}, 
FrameLabel -> {Style[μ, FontSize -> 14, Blue], 
Style[η, FontSize -> 14, Blue]}, 
BaseStyle -> {FontWeight -> Bold, FontSize -> 17}, 
ColorFunction -> "SunsetColors", 
PlotLegends -> 
BarLegend[Automatic, LegendMarkerSize -> 230, LegendMargins -> 5, 
LegendLabel -> Style["Q/(1+C)", FontSize -> 16], 
LabelStyle -> {Bold, FontSize -> 14}]]
$\endgroup$
14
  • 3
    $\begingroup$ Look at ScalingFunctions. You should be able to use ScalingFunctions -> {"Linear", "Linear", "Log"} $\endgroup$
    – Lukas Lang
    Commented Jun 19, 2018 at 21:58
  • $\begingroup$ @LukasLang: It is not possible. This command after adding the -> becomes red! $\endgroup$ Commented Jun 19, 2018 at 22:13
  • 2
    $\begingroup$ What version of Mathematica are you using? $\endgroup$
    – Lukas Lang
    Commented Jun 19, 2018 at 22:31
  • $\begingroup$ @LukasLang: Is it the version? I am using 10.4 $\endgroup$ Commented Jun 20, 2018 at 5:47
  • 1
    $\begingroup$ Probably - ScalingFunctions was updated in 11.0... If you're stuck with 10.4 this question should work for you though $\endgroup$
    – Lukas Lang
    Commented Jun 20, 2018 at 7:24

1 Answer 1

1
$\begingroup$

Thanks for the comments. I upgrade my software to version 11.3 and the ScalingFunctions is available now. This command can scale the third axis (the color), and the figure will be more clear. It should be noted that, as @Lukas Lang said, I used ScalingFunctions -> {"Linear", "Linear", "Log"}.

$\endgroup$

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