Skip to main content
added 117 characters in body
Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929
dp = DensityPlot[20*y/(0.2 y + 0.8 x), {x, 1/10^10, 1/10^2}, {y, 1/10^9, 1/10^6}, 
   ScalingFunctions -> {"Log", "Log"}, ColorFunction -> "Rainbow"];

Post-process dp to change the default number of major and minor ticks ({6,6}) to {8,6} for the bottom and top frames:

Replace[dp, {vt : {_, _}, {bt : Charting`ScaledTicks[{Log, Exp}], 
    tt_}} :> {vt, {bt[#, #2, {8, 6}] &, tt[#, #2, {8, 6}] &}}, All]

enter image description here

Alternatively,

bottomticks{leftticks, rightticks} = Charting`ScaledTicks[#[{Log, Exp}][Log[1/10^10]10^9], Log[1/10^2]10^6], {86, 6}];] & /@ 
    {Charting`ScaledTicks, Charting`ScaledFrameTicks};
{bottomticks, topticks} = Charting`ScaledFrameTicks[#[{Log, Exp}][Log[1/10^10], Log[1/10^2], {8, 6}];] & /@
    {Charting`ScaledTicks, Charting`ScaledFrameTicks};

Show[dp, FrameTicks -> {{Automaticleftticks, Automaticrightticks}, {bottomticks, topticks}}]

enter image description hereenter image description here

dp = DensityPlot[20*y/(0.2 y + 0.8 x), {x, 1/10^10, 1/10^2}, {y, 1/10^9, 1/10^6}, 
   ScalingFunctions -> {"Log", "Log"}, ColorFunction -> "Rainbow"];

Post-process dp to change the default number of major and minor ticks ({6,6}) to {8,6} for the bottom and top frames:

Replace[dp, {vt : {_, _}, {bt : Charting`ScaledTicks[{Log, Exp}], 
    tt_}} :> {vt, {bt[#, #2, {8, 6}] &, tt[#, #2, {8, 6}] &}}, All]

enter image description here

Alternatively,

bottomticks = Charting`ScaledTicks[{Log, Exp}][Log[1/10^10], Log[1/10^2], {8, 6}];
topticks = Charting`ScaledFrameTicks[{Log, Exp}][Log[1/10^10], Log[1/10^2], {8, 6}];

Show[dp, FrameTicks -> {{Automatic, Automatic}, {bottomticks, topticks}}]

enter image description here

dp = DensityPlot[20*y/(0.2 y + 0.8 x), {x, 1/10^10, 1/10^2}, {y, 1/10^9, 1/10^6}, 
   ScalingFunctions -> {"Log", "Log"}, ColorFunction -> "Rainbow"];

Post-process dp to change the default number of major and minor ticks ({6,6}) to {8,6} for the bottom and top frames:

Replace[dp, {vt : {_, _}, {bt : Charting`ScaledTicks[{Log, Exp}], 
    tt_}} :> {vt, {bt[#, #2, {8, 6}] &, tt[#, #2, {8, 6}] &}}, All]

enter image description here

Alternatively,

{leftticks, rightticks} = #[{Log, Exp}][Log[1/10^9], Log[1/10^6], {6, 6}] & /@ 
    {Charting`ScaledTicks, Charting`ScaledFrameTicks};
{bottomticks, topticks} = #[{Log, Exp}][Log[1/10^10], Log[1/10^2], {8, 6}] & /@
    {Charting`ScaledTicks, Charting`ScaledFrameTicks};

Show[dp, FrameTicks -> {{leftticks, rightticks}, {bottomticks, topticks}}]

enter image description here

Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929

dp = DensityPlot[20*y/(0.2 y + 0.8 x), {x, 1/10^10, 1/10^2}, {y, 1/10^9, 1/10^6}, 
   ScalingFunctions -> {"Log", "Log"}, ColorFunction -> "Rainbow"];

Post-process dp to change the default number of major and minor ticks ({6,6}) to {8,6} for the bottom and top frames:

Replace[dp, {vt : {_, _}, {bt : Charting`ScaledTicks[{Log, Exp}], 
    tt_}} :> {vt, {bt[#, #2, {8, 6}] &, tt[#, #2, {8, 6}] &}}, All]

enter image description here

Alternatively,

bottomticks = Charting`ScaledTicks[{Log, Exp}][Log[1/10^10], Log[1/10^2], {8, 6}];
topticks = Charting`ScaledFrameTicks[{Log, Exp}][Log[1/10^10], Log[1/10^2], {8, 6}];

Show[dp, FrameTicks -> {{Automatic, Automatic}, {bottomticks, topticks}}]

enter image description here