1

I try to scale the x-axis with ScalingFunctions options to make the curve look a line. But I dont see y-axis's ticks.

ListPlot[{Table[{(x), (x)^1.5}, {x, 100}]}, Joined -> True, 
 PlotRange -> {All, All}, Frame -> True, 
 BaseStyle -> {FontSize -> 18}, 
 PlotLegends -> 
  Placed[LineLegend[
    MaTeX[#, Magnification -> 24/12] &@{"\\textrm{Approximation}", 
      "\\textrm{Experiment}"}, LegendLayout -> {"Row", 1}, 
    LegendFunction -> Framed], {Center, Top}], ImageSize -> 1000, 
 PlotMarkers -> {"*"}, ScalingFunctions -> {#^0.66 &, #^1.5 &}, 
 FrameLabel -> {MaTeX["B,\\,\\textrm{T}", Magnification -> 24/12], 
   MaTeX["R(\\theta_{1}),\\,\\Omega", Magnification -> 24/12]}]
  • 1
    Not sure why ticks don't appear, but you can add them manually with FrameTicks -> {{Range[0, 1000, 200], None}, {Automatic, None}} – MelaGo Oct 16 '23 at 21:33

1 Answers1

2

This looks like a bug.

A work-around: Add the frame ticks using Show and the ticks functions Charting`ScaledTicks and Charting`ScaledFrameTicks:

scalingfunctions = {#^(2/3) &, #^(3/2) &};

Show[ListPlot[Table[{x, x^(3/2)}, {x, 100}], Joined -> True, PlotRange -> All, Frame -> True, BaseStyle -> {FontSize -> 18}, ImageSize -> 1000, PlotMarkers -> {"*"}, ScalingFunctions -> scalingfunctions], FrameTicks -> {{ChartingScaledTicks[scalingfunctions][0, 100^(3/2)], ChartingScaledFrameTicks[scalingfunctions][1, 100^(3/2)]}, {Automatic, Automatic}}]

enter image description here

kglr
  • 394,356
  • 18
  • 477
  • 896