When importing the following figure
using the Matlab2Tikz, I obtain the following output , 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]{
xlabel
s are exported from MATLAB? Is this not expected? I think the simplest solution would be to refrain from settingxlabel
in MATLAB. Or callmatlab2tikz
before adding thexlabel
s, if they are required for your visualization in MATLAB.xtick
and notxlabel
.xticklabel style={/pgf/number format/fixed}
should be added to the value ofmatlab2tikz
's'extraAxisOptions'
key.