Code: Select all
\documentclass{article}\usepackage{pgfplots}\pgfplotsset{compat=newest}\begin{document}\definecolor{mycolor1}{rgb}{1,0,1}\definecolor{mycolor2}{rgb}{0,0.498039215803146,0}\begin{tikzpicture}\begin{axis}[color=black,scale only axis,xmin=1,xmax=24,%xtick={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24},xtick={0,4,8,12,24}, %%%<------------- herexlabel={$y$},ymin=1,ymax=10,ytick={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},yticklabels={1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0},y axis line style={blue},ytick style={blue},yticklabel style={blue},axis x line*=bottom,axis y line*=left,tick align = outside,]\addplot [color=blue,solid,line width=0.5pt,mark size=2.5pt,mark size=2.5pt,mark=square*,mark options={solid,,rotate=180,fill=blue}]table[row sep=crcr]{1 4\\4 6\\8 8.8\\12 2.8\\24 8.162\\};\end{axis}\end{tikzpicture}%