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$
  • 3
    $\begingroup$ Look at ScalingFunctions. You should be able to use ScalingFunctions -> {"Linear", "Linear", "Log"} $\endgroup$ – Lukas Lang Jun 19 '18 at 21:58
  • $\begingroup$ @LukasLang: It is not possible. This command after adding the -> becomes red! $\endgroup$ – Perfect Fluid Jun 19 '18 at 22:13
  • 2
    $\begingroup$ What version of Mathematica are you using? $\endgroup$ – Lukas Lang Jun 19 '18 at 22:31
  • $\begingroup$ @LukasLang: Is it the version? I am using 10.4 $\endgroup$ – Perfect Fluid Jun 20 '18 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 Jun 20 '18 at 7:24
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"}.

|improve this answer|||||
$\endgroup$

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