0

As a beginner, I am plotting some data points using ListLogLogPlot. May I know is it possible to make all the numbers on x and y axes to appear as 10^-1, 10^0, 10^1, instead of 0.1, 1, 10, etc. ?

enter image description here

Here is the code I use to plot the data points in log axes:

(*Data EF*)
EF = {{6.713329472805144`, 4.798728566747411`, 2.605948689531517`, 
    0.1751651588963768`, 0.044521739555961455`}, {6.683922382895504`, 
    4.785892414679682`, 3.0497788090671603`, 0.5684406939078067`, 
    0.2407333034352861`}, {6.4064763098145034`, 3.34985013297994`, 
    1.837210144328529`, 0.3680384898877517`, 
    0.1865277529403056`}, {4.695271123176444`, 1.2239371122572693`, 
    0.6089456965821706`, 0.12613160066194237`, 0.06502527257023452`}};
sList = {0.001, 0.01, 0.1, 1};
TMList = {0.1, 0.5, 1, 5, 10};
miumaxList = {-2, -1, 0, 1, 2};

(Function for tick formatting) GetScaledLogTicks[min_, max_, scale_] := Module[{ticks}, ticks = #[Log[min], Log[max]] & /@ {ChartingScaledTicks[{Log, Exp}], ChartingScaledFrameTicks[{Log, Exp}]}; (scale the tick length) Table[{Exp[#[[1]]], #[[2]], scale*#[[3]]} & /@ ticks[[i]], {i, 2}]]; lticks = {GetScaledLogTicks[10^-3, 10, 3], GetScaledLogTicks[0.1, 10, 3]};

(Plotting EF) Bigplot = {}; legendColours = {}; legendEntries = {}; For[i = 1, i <= Length[sList], i++, EFdata = Transpose@{TMList, EF[[i]]}; Bigplot = Show[Bigplot, ListLogLogPlot[EFdata, Joined -> True, PlotMarkers -> {Automatic, 8}, PlotStyle -> {RGBColor[1/Length[sList]i, 0, 1], Thickness[0.01]}, PlotRange -> {10^-3, 10}, Frame -> True, FrameStyle -> Directive[Black, Thick, Bold, 20], FrameTicks -> lticks, AspectRatio -> 1]]; legendColours = Insert[legendColours, RGBColor[1/Length[sList]i, 0, 1], i]; legendEntries = Insert[legendEntries, StringTemplate["s = a"][<|"a" -> sList[[i]]|>] , i];] Legended[Bigplot, LineLegend[legendColours, legendEntries, LegendLabel -> "s at miumax="[miumax]]]

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
Johnson
  • 357
  • 1
  • 6
  • 1
    Hello. Your code is quite long. It would be better to give a minimal example that illustrates your problem. A simple plot using the Ticks option to do the kind of thing you are asking would be yticks=Table[{10^i,Superscript[10,i]},{i,1,4}]; LogPlot[(1.2+Sin[x])*Exp[x],{x,0,8},Ticks->{Automatic,yticks}]. Perhaps you can adapt it to your problem. – user293787 Jul 18 '22 at 10:08
  • This previous answer may be applicable. – LouisB Jul 18 '22 at 11:54

0 Answers0