[Tex/LaTex] Problem with xticks when importing Matlab figures using matlab2tikz

MATLABmatlab2tikzpgfplots

When importing the following figure
enter image description here

using the Matlab2Tikz, I obtain the following output enter image description here , with the xticks strangely exported . Does any one have an idea how I can prevent this? Maybe by passing an extra inut to the matlab2tikz function?

Hier is a simple Matlab Code :

close all
x=linspace(5*10^-2,10*10^-2);
y1=-4*10^5*x+2;
y2=-4*10^5*x+1;
figure;
    subplot(121);plot(x,y1);xlabel('x');ylabel('y')
    subplot(122);plot(x,y2);xlabel('x');ylabel('y')
matlab2tikz('Test.tikz','standalone', true,'extraAxisOptions','label style={font=\Large}') 

The obtained *.Tikz file without the data:

\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepackage{amsmath}
\begin{document}
\begin{tikzpicture}

\begin{axis}[%
width=1.95217803030303in,
height=3.565625in,
scale only axis,
xmin=0.04,
xmax=0.1,
xlabel={x},
ymin=-40000,
ymax=-15000,
ylabel={y},
name=plot1,
label style={font=\Large}
]
\addplot [
color=blue,
solid,
forget plot
]
table[row sep=crcr]{

Best Answer

You can scale your ticks to get rid of powers of 10 and get a more elegant look on your axes. Alternatively, as Paul Gessler suggested, you can also use fixed formatting with desired precision. The example below gives you the idea.

\documentclass[tikz,border=2pt]{article}

\usepackage{pgfplots}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
\begin{axis}[%
  width=2in,
  height=3in,
  xlabel={$x$},
  ylabel={$x^2$},
  ylabel near ticks,
  every axis label/.style={font=\small},
  scaled x ticks=base 10:2,
  scaled y ticks=base 10:-3,
  every tick label/.style={font=\footnotesize},
  tick scale binop=\times,
  title={With scaled x ticks},
  title style={above=1.5ex},
]
\addplot [color=black,solid,mark=o,domain=0.04:0.1,samples=10] {-4*10^5*x+1};
\end{axis}
\end{tikzpicture}
%
\begin{tikzpicture}
\begin{axis}[%
  width=2in,
  height=3in,
  xlabel={$x$},
  xticklabel style={
    /pgf/number format/precision=2,
    /pgf/number format/fixed,
    /pgf/number format/fixed zerofill,
  },
  ylabel={$x^2$},
  ylabel near ticks,
  every axis label/.style={font=\small},
  every tick label/.style={font=\footnotesize},
  tick scale binop=\times,
  title={With fixed x ticks},
  title style={above=1.5ex},
]
\addplot [color=black,solid,mark=o,domain=0.04:0.1,samples=10] {-4*10^5*x+1};
\end{axis}
\end{tikzpicture}

\end{document}

enter image description here