\begin{tikzpicture}
    \pgfplotstableread[col sep=comma]{data/hynix.csv}\hynix
    \pgfplotstableread[col sep=comma]{data/micron.csv}\micron
    \pgfplotstableread[col sep=comma]{data/samsung.csv}\samsung
    

    \begin{groupplot}[
        group style={
            group size=1 by 3,
            horizontal sep=0pt,
            vertical sep=30pt,
            xticklabels at=edge bottom,
            yticklabels at=edge left,
            xlabels at=edge bottom,
            ylabels at=edge left,
        },
        width=\linewidth, height=4cm,
        xlabel={Time},
        ylabel={Power [mW]},
        xmin=0, xmax=0.006,
        ymin=0, ymax=800,
        xtick=\empty,
        axis x line=middle,
        axis y line=middle,
        ylabel near ticks,
        xlabel near ticks,
    ]
        \nextgroupplot[
            title=Vendor 1,
        ]

        \addplot[dashed,black!50] coordinates {(0.001,0) (0.001,1100)};
        \addplot[dashed,black!50] coordinates {(0.002,0) (0.002,1100)};
        \addplot[dashed,black!50] coordinates {(0.003,0) (0.003,1100)};
        \addplot[dashed,black!50] coordinates {(0.004,0) (0.004,1100)};
        \addplot[dashed,black!50] coordinates {(0.005,0) (0.005,1100)};

        \node[circle,draw,inner sep=1pt] at (axis cs:0.0005, 750) {\tiny 1};
        \node[circle,draw,inner sep=1pt] at (axis cs:0.0015, 750) {\tiny 2};
        \node[circle,draw,inner sep=1pt] at (axis cs:0.0025, 750) {\tiny 3};
        \node[circle,draw,inner sep=1pt] at (axis cs:0.0035, 750) {\tiny 4};
        \node[circle,draw,inner sep=1pt] at (axis cs:0.0045, 750) {\tiny 5};
        \node[circle,draw,inner sep=1pt] at (axis cs:0.0055, 750) {\tiny 6};

        \addplot[color=green!50] table [x={time}, y={datasheet}]{\hynix};
        \addplot[color=blue!50] table [x={time}, y={measured}]{\hynix};
        \addplot[color=red!50] table [x={time}, y={optimized}]{\hynix};
        \addplot[color=brown!50] table [x={time}, y={optimized_no_if}]{\hynix};
    
        \nextgroupplot[
            title=Vendor 2,
        ]

        \addplot[dashed,black!50] coordinates {(0.001,0) (0.001,1100)};
        \addplot[dashed,black!50] coordinates {(0.002,0) (0.002,1100)};
        \addplot[dashed,black!50] coordinates {(0.003,0) (0.003,1100)};
        \addplot[dashed,black!50] coordinates {(0.004,0) (0.004,1100)};
        \addplot[dashed,black!50] coordinates {(0.005,0) (0.005,1100)};

        \node[circle,draw,inner sep=1pt] at (axis cs:0.0005, 750) {\tiny 1};
        \node[circle,draw,inner sep=1pt] at (axis cs:0.0015, 750) {\tiny 2};
        \node[circle,draw,inner sep=1pt] at (axis cs:0.0025, 750) {\tiny 3};
        \node[circle,draw,inner sep=1pt] at (axis cs:0.0035, 750) {\tiny 4};
        \node[circle,draw,inner sep=1pt] at (axis cs:0.0045, 750) {\tiny 5};
        \node[circle,draw,inner sep=1pt] at (axis cs:0.0055, 750) {\tiny 6};

        \addplot[color=green!50] table [x={time}, y={datasheet}]{\micron};
        \addplot[color=blue!50] table [x={time}, y={measured}]{\micron};
        \addplot[color=red!50] table [x={time}, y={optimized}]{\micron};
        \addplot[color=brown!50] table [x={time}, y={optimized_no_if}]{\micron};

        \nextgroupplot[
            title=Vendor 3,
        ]    

        \addplot[dashed,black!50] coordinates {(0.001,0) (0.001,1100)};
        \addplot[dashed,black!50] coordinates {(0.002,0) (0.002,1100)};
        \addplot[dashed,black!50] coordinates {(0.003,0) (0.003,1100)};
        \addplot[dashed,black!50] coordinates {(0.004,0) (0.004,1100)};
        \addplot[dashed,black!50] coordinates {(0.005,0) (0.005,1100)};

        \node[circle,draw,inner sep=1pt] at (axis cs:0.0005, 750) {\tiny 1};
        \node[circle,draw,inner sep=1pt] at (axis cs:0.0015, 750) {\tiny 2};
        \node[circle,draw,inner sep=1pt] at (axis cs:0.0025, 750) {\tiny 3};
        \node[circle,draw,inner sep=1pt] at (axis cs:0.0035, 750) {\tiny 4};
        \node[circle,draw,inner sep=1pt] at (axis cs:0.0045, 750) {\tiny 5};
        \node[circle,draw,inner sep=1pt] at (axis cs:0.0055, 750) {\tiny 6};

        \addplot[color=green!50] table [x={time}, y={datasheet}]{\samsung};
        \addplot[color=blue!50] table [x={time}, y={measured}]{\samsung};
        \addplot[color=red!50] table [x={time}, y={optimized}]{\samsung};
        \addplot[color=brown!50] table [x={time}, y={optimized_no_if}]{\samsung};
    \end{groupplot}
        
    % Legend
    \begin{scope}
        \draw[green!50,line width=0.9pt] (-0.15, -8) -- (0.15, -8);
        \node[anchor=west] at (0.2,-8) {Sim. Datasheet IDDs};

        \draw[red!50,line width=0.9pt] (3.4-0.15, -8) -- (3.4+0.15, -8);
        \node[anchor=west] at (3.6,-8) {Sim. Measured IDDs};
        
        \draw[blue!50,line width=0.9pt] (-0.15, -8.5) -- (0.15, -8.5);
        \node[anchor=west] at (0.2,-8.5) {Measurement};
    \end{scope}
\end{tikzpicture}%
