4

Hello stack exchange I have been looking at similar questions but can't make it work.

Here is my simplified code :

\documentclass[border=2pt]{standalone}
\usepackage[utf8]{inputenc}

\usepackage{tikz,pgfplots}
\usetikzlibrary{positioning} % pour le positionnement relatif
\usetikzlibrary{calc} 

%\pgfplotsset{scaled y ticks=false,
%yticklabel style ={
%/pgf/number format/fixed,
%/pgf/number format/precision=3},
%}

\begin{document}
\begin{tikzpicture}

\begin{axis}[axis x line=bottom, axis y line = left , xmode=log,ymode=log, grid=both, 
ymin = 0.05,ymax=1.1, extra y ticks={0.05,0.2,0.5},extra y tick labels={$0.05$,$0.2$,$0.5$},
%scaled ticks=false, tick label style={/pgf/number format/fixed},
    extra x ticks={0.05,0.2,0.5},extra x tick labels={$0.05$,$0.2$,$0.5$},
xmax=2, width=10cm]

\def\n{1}
\addplot[color=red,samples=10,domain=0.01:0.7,thick=3pt,ultra thick] { exp(-3.14159*\x*\n/sqrt(1-\x^2)) } ;

\end{axis}

\end{tikzpicture}
\end{document}

The commented lines are solutions I found here, and tried without success:

log plot with scientific writing

As you can see, there are still 10^n ticks, between the ones I typed manually.

What am I doing wrong ?

1
  • What precisely do you want to achieve? Since you are saying that there are still 10^n ticks around, removing them is as simple as adding xticklabels={},yticklabels={} to the options of the axis.
    – user121799
    Commented Jul 12, 2019 at 2:38

1 Answer 1

4

You are looking for the key log ticks with fixed point (see section 4.13.2 of the pgfplots manual). Adding

\pgfplotsset{
  log ticks with fixed point,
}

to your preamble should result in the desired output.

1
  • Perfectly what I needed. Thank you.
    – LMT-PhD
    Commented Jul 12, 2019 at 10:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .