1

I am using the matlab2tikz function for obtaining a .pgf file. The problem is that when I use this function for a “semilogy” plot of Matlab then in LaTeX it doesn't show any plot.

If anyone has an idea, please share.

\begin{axis}
[% width=6.870052cm, height=4.346667cm,
 at={(1.152396cm,0.586667cm)}, 
scale only axis,
 separate axis lines, every outer x axis line/.append style={black},
 every x tick label/.append style={font=\color{black}},
 xmin=0, xmax=1000, xtick={ 0, 200, 400, 600, 800, 1000}, 
xlabel={No of Iterations}, 
every outer y axis line/.append style={black}, 
every y tick label/.append style={font=\color{black}}, 
ymode=log, 
ymin=-10, 
ymax=-0.0001, 
yminorticks=true,
 ylabel={Testing MSE (dB)}, ] 

\addplot [color=black,solid,line width=2.0pt]
  table[row sep=crcr]{%
1   0\\
2   -0.000840570981167748\\
3   -0.00630270674863155\\
4   -0.00843172598606444\\
5   -0.0138142909635406\\
6   -0.0162749955326287\\

This is the samples of data i have.

Heiko Oberdiek
  • 271,626
Waqas
  • 11
  • Can you add more details, what you have tried so far? What are you using, Matlab, Octave, which version? Can you add a small example to reproduce the problem? – Heiko Oberdiek Jun 28 '15 at 10:20
  • @HeikoOberdiek i am using Matlab version 2010a , i have tried to by removing "scale only axis" line from the commands and by adding "yminortricks = true". below is the code. – Waqas Jun 28 '15 at 10:24
  • @Waqas Please, edit in your question, rather than adding code in comments. – egreg Jun 28 '15 at 10:32
  • i get following warning: Ignoring illegal input argument ymin=-10: cannot apply log. Ignoring illegal input argument ymax=-0.0001: cannot apply log. – Waqas Jun 28 '15 at 10:32
  • 3
    Negative numbers cannot be logged. You probably create the data array already logged in matlab. – percusse Jun 28 '15 at 10:41

0 Answers0