0

Do you know how can I reduce the size of the markers?

code:

\documentclass{book}


\usepackage{caption}
\usepackage{subcaption}
\usepackage{epsfig}
\usepackage{contour}




\usepackage{bm}        
\usepackage{colortbl}
\usepackage{enumitem}
\usepackage{makecell}
\usepackage[font=footnotesize]{caption}
\usepackage{forest}
\usetikzlibrary{shadows,arrows.meta}
\usepackage{pgfplotstable}
%\usepackage{filecontents}
\usepackage{graphicx}
\usepackage{pgfplots}
%\pgfplotsset{compat=newest}
\pgfplotsset{compat=1.16}
\usepackage{smartdiagram}


\usetikzlibrary{%
    arrows,%
    calc,%
    arrows.meta,
    fit,%
    patterns,%
    plotmarks,%
    shadows,
    shapes.geometric,%
    shapes.misc,%
    shapes.symbols,%
    shapes.arrows,%
    shapes.callouts,%
    shapes.multipart,%
    shapes.gates.logic.US,%
    shapes.gates.logic.IEC,%
    er,%
    automata,%
    backgrounds,%
    chains,%
    topaths,%
    trees,%
    petri,%
    mindmap,%
    matrix,%
    % calendar,%
    folding,%
    fadings,%
    through,%
    positioning,%
    scopes,%
    decorations.fractals,%
    decorations.shapes,%
    decorations.text,%
    decorations.pathmorphing,%
    decorations.pathreplacing,%
    decorations.footprints,%
    decorations.markings,%
    shadows}
\usetikzlibrary{arrows.meta,bending,positioning,calc}


\usepackage{listings}
\usepackage{color}

\begin{document}

\begin{figure}

    \begin{subfigure}[b]{0.5\textwidth}

        \begin{tikzpicture}
        \begin{axis}[ 
        width=\linewidth,
        line width=0.5,
        grid=major, % Display a grid
        tick label style={font={\tiny }},
        legend style={nodes={scale=0.6, transform shape}},
        label style={font={\tiny }},
        legend image post style={},
        grid style={white},
        xlabel={Epochs},
        ylabel={RMSE},
        y tick label style={
            /pgf/number format/.cd,
            fixed,
            fixed zerofill,
            precision=2
        },
        legend style={at={(1,0.95)}, anchor=north east, line width=.3pt,mark size=.4pt, draw=none, fill=none}
        ]
        \addplot[yellow!85!black,mark=diamond*] table[x expr=\coordindex,y index=0] {
        1.1256
        0.9999
        0.9737
        0.9623
        0.9558
        0.9517
        0.9487
        0.9465
        0.9451
        0.9439
        0.943
        0.9425
        0.9416
        0.9411
        0.941
        0.9403
        0.9401
        0.94
        0.9403
        0.9395
        0.94
        0.94
        0.9392
        0.9395
        0.9391
        0.9399
        0.9394
        0.9396
        0.9394
        0.9393
        0.939
        0.939
        0.9392
        0.9393
        0.9389
        0.939
        0.9389
        0.9393
        0.9396
        0.9391
        0.9393
        0.939
        0.9387
        0.9394
        0.9392
        0.9393
        0.9396
        0.939
        0.9388
        0.9392


        };
        \addlegendentry{Test error} 

        \end{axis}

        \end{tikzpicture}

        \subcaption{ 100K}
        \label{fig:sub11}
    \end{subfigure}
    \begin{subfigure}[b]{0.5\textwidth}
        \begin{tikzpicture}
        \begin{axis}[ 
        width=\linewidth,
        line width=0.5,
        grid=major, % Display a grid
        tick label style={font={\tiny}},
        legend style={nodes={scale=0.6, transform shape}},
        label style={font={\tiny }},
        legend image post style={},
        grid style={white},
        xlabel={Epochs},
        ylabel={RMSE},
        y tick label style={
            /pgf/number format/.cd,
            fixed,
            fixed zerofill,
            precision=2
        },
        legend style={at={(1,0.95)}, anchor=north east,  draw=none, fill=none},
        ]
        \addplot[blue,mark=*] table[x expr=\coordindex,y index=0] {
            1.1171
            0.9368
            0.9208
            0.9154
            0.9128
            0.9116
            0.9105
            0.9098
            0.9096
            0.9094
            0.909
            0.9092
            0.909
            0.9089
            0.9087
            0.9088
            0.909
            0.909
            0.9085
            0.9088
            0.9086
            0.9087
            0.9086
            0.9088
            0.9087
            0.9088
            0.9087
            0.9089
            0.9087
            0.9086
            0.9087
            0.9086
            0.9088
            0.9088
            0.9086
            0.9087
            0.9088
            0.9087
            0.9088
            0.9086
            0.9089
            0.9088
            0.9087
            0.9088
            0.9088
            0.9087
            0.9089
            0.9088
            0.9089
            0.9087




        };
        \addlegendentry{Test} 

        \end{axis}

        \end{tikzpicture}


        \subcaption{1M}
        \label{fig:sub22}

    \end{subfigure}

    \caption{Performance.}
    \label{tablex}
\end{figure}


\end{document}

enter image description here

  • 2
    You have mark size – user156344 May 25 at 13:21
  • Mmm yeah, but it does not change anything. I don't know what's going on – NaveganTeX May 25 at 13:22
  • Remark: It's your 26th question: Next time please reduce the code to the minimal necessary amount. – Dr. Manuel Kuehner May 25 at 13:54
2

mark size do this. Here I set mark size to 1pt, you may need a bigger number.

\documentclass{book}


\usepackage{caption}
\usepackage{subcaption}
\usepackage{epsfig}
\usepackage{contour}




\usepackage{bm}        
\usepackage{colortbl}
\usepackage{enumitem}
\usepackage{makecell}
\usepackage[font=footnotesize]{caption}
\usepackage{forest}
\usetikzlibrary{shadows,arrows.meta}
\usepackage{pgfplotstable}
%\usepackage{filecontents}
\usepackage{graphicx}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepackage{smartdiagram}


\usetikzlibrary{%
    arrows,%
    calc,%
    arrows.meta,
    fit,%
    patterns,%
    plotmarks,%
    shadows,
    shapes.geometric,%
    shapes.misc,%
    shapes.symbols,%
    shapes.arrows,%
    shapes.callouts,%
    shapes.multipart,%
    shapes.gates.logic.US,%
    shapes.gates.logic.IEC,%
    er,%
    automata,%
    backgrounds,%
    chains,%
    topaths,%
    trees,%
    petri,%
    mindmap,%
    matrix,%
    % calendar,%
    folding,%
    fadings,%
    through,%
    positioning,%
    scopes,%
    decorations.fractals,%
    decorations.shapes,%
    decorations.text,%
    decorations.pathmorphing,%
    decorations.pathreplacing,%
    decorations.footprints,%
    decorations.markings,%
    shadows}
\usetikzlibrary{arrows.meta,bending,positioning,calc}


\usepackage{listings}
\usepackage{color}

\begin{document}

\begin{figure}

    \begin{subfigure}[b]{0.5\textwidth}

        \begin{tikzpicture}
        \begin{axis}[ 
        width=\linewidth,
        line width=0.5,
        grid=major, % Display a grid
        tick label style={font={\tiny }},
        legend style={nodes={scale=0.6, transform shape}},
        label style={font={\tiny }},
        legend image post style={},
        grid style={white},
        xlabel={Epochs},
        ylabel={RMSE},
        y tick label style={
            /pgf/number format/.cd,
            fixed,
            fixed zerofill,
            precision=2
        },
        legend style={at={(1,0.95)}, anchor=north east, line width=.3pt,mark size=.4pt, draw=none, fill=none}
        ]
        \addplot[yellow!85!black,mark=diamond*,mark size=1pt] table[x expr=\coordindex,y index=0] {
        1.1256
        0.9999
        0.9737
        0.9623
        0.9558
        0.9517
        0.9487
        0.9465
        0.9451
        0.9439
        0.943
        0.9425
        0.9416
        0.9411
        0.941
        0.9403
        0.9401
        0.94
        0.9403
        0.9395
        0.94
        0.94
        0.9392
        0.9395
        0.9391
        0.9399
        0.9394
        0.9396
        0.9394
        0.9393
        0.939
        0.939
        0.9392
        0.9393
        0.9389
        0.939
        0.9389
        0.9393
        0.9396
        0.9391
        0.9393
        0.939
        0.9387
        0.9394
        0.9392
        0.9393
        0.9396
        0.939
        0.9388
        0.9392


        };
        \addlegendentry{Test error} 

        \end{axis}

        \end{tikzpicture}

        \subcaption{ 100K}
        \label{fig:sub11}
    \end{subfigure}
    \begin{subfigure}[b]{0.5\textwidth}
        \begin{tikzpicture}
        \begin{axis}[ 
        width=\linewidth,
        line width=0.5,
        grid=major, % Display a grid
        tick label style={font={\tiny}},
        legend style={nodes={scale=0.6, transform shape}},
        label style={font={\tiny }},
        legend image post style={},
        grid style={white},
        xlabel={Epochs},
        ylabel={RMSE},
        y tick label style={
            /pgf/number format/.cd,
            fixed,
            fixed zerofill,
            precision=2
        },
        legend style={at={(1,0.95)}, anchor=north east,  draw=none, fill=none},
        ]
        \addplot[blue,mark=*,mark size=1pt] table[x expr=\coordindex,y index=0] {
            1.1171
            0.9368
            0.9208
            0.9154
            0.9128
            0.9116
            0.9105
            0.9098
            0.9096
            0.9094
            0.909
            0.9092
            0.909
            0.9089
            0.9087
            0.9088
            0.909
            0.909
            0.9085
            0.9088
            0.9086
            0.9087
            0.9086
            0.9088
            0.9087
            0.9088
            0.9087
            0.9089
            0.9087
            0.9086
            0.9087
            0.9086
            0.9088
            0.9088
            0.9086
            0.9087
            0.9088
            0.9087
            0.9088
            0.9086
            0.9089
            0.9088
            0.9087
            0.9088
            0.9088
            0.9087
            0.9089
            0.9088
            0.9089
            0.9087




        };
        \addlegendentry{Test} 

        \end{axis}

        \end{tikzpicture}


        \subcaption{1M}
        \label{fig:sub22}

    \end{subfigure}

    \caption{Performance.}
    \label{tablex}
\end{figure}


\end{document}

But my sugestion is: not to use a marker at all...

2

Not sure, that I get it because you already had the solution in your code (wrong position)?!

Just add mark size = 0.4pt to your \addplot command: \addplot[mark = diamond*, mark size = 0.4pt]

  • We posted at the same time :) but I don't think mark size is in his code – user156344 May 25 at 13:27
  • 1
    @JouleV It's in the code for the legend style. – Dr. Manuel Kuehner May 25 at 13:29

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.