[Tex/LaTex] Change mark size in legend entry

legendpgfplotstikz-pgf

I want the marks in the legend to be bigger than in the plot. But I'm facing the problem that if I use mark options in legend style, then I can't use it again in addplot.

At the moment I get the following result, but I want to have both marks bigger in the legend. How can I use mark options in legend style as well as in addplot ?

enter image description here

\documentclass{standalone} 
\usepackage{amsthm, amssymb} 
\usepackage{pgfplots} 
\pgfplotsset{compat=1.7} 

\begin{document}
  \begin{tikzpicture} 
    \begin{axis}[ 
      xmin = 0,
      xmax = 6,
      legend style = { 
        legend cell align=left, 
        mark options={scale=3},
        /tikz/every even column/.append style={column sep=1cm} 
    }] 

      \addplot[red,mark=*,only marks,mark size=2]  table {
      x y
      1 2
      2 4
      4 3
    };
    \addplot[blue,mark=triangle,only marks,mark size=2,mark options={rotate=180}]  table {
              x y
              1 1
              2 2
              4 1
            };

  \addlegendentry{no. 1}
  \addlegendentry{no.2}

    \end{axis} 
  \end{tikzpicture} 
\end{document}

Best Answer

Use legend image post style={scale=3},.

\documentclass{standalone}
\usepackage{amsthm, amssymb}
\usepackage{pgfplots}
\pgfplotsset{compat=1.7}

\begin{document}
  \begin{tikzpicture}
    \begin{axis}[
      xmin = 0,
      xmax = 6,
      legend image post style={scale=3},
      legend style = {
        legend cell align=left,
        %mark options={scale=3},
        /tikz/every even column/.append style={column sep=1cm}
    }]

      \addplot[red,mark=*,only marks,mark size=1]  table {
      x y
      1 2
      2 4
      4 3
    };
    \addplot[blue,mark=triangle,only marks,mark size=1,mark options={rotate=180}]  table {
              x y
              1 1
              2 2
              4 1
            };

  \addlegendentry{no. 1}
  \addlegendentry{no.2}

    \end{axis}
  \end{tikzpicture}
\end{document}

enter image description here