I have a .dat file which I want to fetch the median data points to plot my figure. However the y-axis is giving issues. here is my code. and attached is the data file.


\usepackage[T1]{fontenc}% optional T1 font encoding

\title{plots of images: Image completion }
                ticklabel style = {font=\Large},
                title={NeNMF perf. w.r.t. different ranks (i.e. r=5,10,50)}
                \addplot[green,line width=2pt] table[x expr=\coordindex, y=Med_V_NeNMF, col sep=space]{Envelop_1000_5.dat};
                \addplot[blue,line width=2pt] table[x expr=\coordindex,y=Med_ARPI_NeNMF, col sep=space]{Envelop_1000_5.dat};
                \addplot[red,line width=2pt] table[x expr=\coordindex,y=Med_RPI_NeNMF, col sep=space]{Envelop_1000_5.dat};
                \legend{{vanilla ($r = 5$)},{ARPI ($r = 5$)},{RPI ($r = 5$)}}
    } \hfill
    \caption{NMF performance with respect to compression techniques.}  

Link to data file: https://www.sendspace.com/file/pru1dg

  • Please make your document example compilable. For example, in preamble include rank_tests_dat/Envelop_1000_5.dat accordingly – Zarko Sep 7 '20 at 13:42
  • Hello @Zarko ive edited it. That was just a link to where I kept my .dat files. I have also attached a link to download my .dat file for compiling. sendspace.com/file/pru1dg – Farouk Yahaya Sep 7 '20 at 13:51
  • 2
    Just drop the ymin and ymax. Pgfplots will determine them from the data BEFORE it starts to draw anything. – John Kormylo Sep 7 '20 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.