\documentclass[margin=2pt]{standalone}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{amsmath,amsfonts}
\usepackage{pgfplots}
\usepgfplotslibrary{groupplots}
\pgfplotsset{compat=1.16}

\begin{document}
\begin{tikzpicture}[]

\pgfplotsset{every x tick label/.append style={font=\scriptsize, yshift=0ex}}
\pgfplotsset{every y tick label/.append style={font=\scriptsize, xshift=0ex}}
\pgfplotsset{
    jitter/.style={
        y filter/.code={\pgfmathparse{\pgfmathresult+0.5*rand*#1}}
    },
    jitter/.default=0.1
}
\pgfplotsset{tick scale binop=\times}

\begin{axis}[
    ymajorgrids,
    xmajorgrids,
    % ymode=log,
    % xmode=log,
    % axis equal,
    % title={Conv-4},
    % title style={yshift=1.2em},
    ylabel={Marginal probability of MEC},
    xlabel={BGe score},
    % ymin=0,
    % ymax=1,
    % xmin=0,
    % xmax=1,
    % xminorticks=false,
    % yticklabel={
    %     \pgfmathparse{exp(\tick)}
    %     \pgfmathprintnumber[sci, precision=0]{\pgfmathresult}
    % },
    % log identify minor tick positions=true,
    height=6cm,
    width=9cm,
    legend style={font=\small},
    scaled x ticks=false,
    scaled y ticks=false,
    yticklabel style = {
       /pgf/number format/fixed,
       /pgf/number format/precision=2,
    },
    legend pos=north west,
    legend cell align={left},
    legend style={column sep=5pt, inner xsep=5pt},
    minor x tick num=4,
    minor y tick num=4,
    enlarge y limits=upper,
    ymin=0
]

% \addplot[color=black, thick, dashed, mark=none] coordinates {(0, 0) (1, 1)};

% \addplot[
%     scatter=true,
%     mark=*,
%     only marks, mark size=1.2pt, opacity=0.5, scatter/classes={
% mc3={color=BrickRed},
% gadget={color=Blue},
% gflownet={color=Green}
% }, point meta=explicit symbolic] table[col sep=comma, x=score, y=count, meta=name] {uai2022/figures/sachs-comparison-mcmc/comparison_gflownet_mcmc.csv};

\addplot[
    scatter=true,
    mark=*,
    only marks,
    opacity=0.5,
    point meta=explicit symbolic,
    scatter/@pre marker code/.style={/tikz/mark size=\pgfplotspointmeta/5},
    scatter/@post marker code/.style={},
    color=Blue,
    % jitter=3e-4
] table[col sep=comma, x=score, y=marginal, meta=unique_dags] {figures/sachs-comparison/mc3.csv};
\addlegendentry{MC\textsuperscript{3}}

\addplot[
    scatter=true,
    mark=*,
    only marks,
    opacity=0.5,
    point meta=explicit symbolic,
    scatter/@pre marker code/.style={/tikz/mark size=\pgfplotspointmeta/5},
    scatter/@post marker code/.style={},
    color=ForestGreen,
    % jitter=3e-4
] table[col sep=comma, x=score, y=marginal, meta=unique_dags] {figures/sachs-comparison/gadget.csv};
\addlegendentry{Gadget}

\addplot[
    scatter=true,
    mark=*,
    only marks,
    opacity=0.5,
    point meta=explicit symbolic,
    scatter/@pre marker code/.style={/tikz/mark size=\pgfplotspointmeta/5},
    scatter/@post marker code/.style={},
    color=BrickRed,
    % jitter=3e-4
] table[col sep=comma, x=score, y=marginal, meta=unique_dags] {figures/sachs-comparison/gflownet.csv};
\addlegendentry{DAG-GFlowNet}

\end{axis}

% \node[below=3em of {group c1r1}.south] (edge) {(a) Edge features};
% \node[below=3em of {group c2r1}.south] (path) {(b) Path features};
% \node[below=3em of {group c3r1}.south] (markov) {(c) Markov features};

% \node[anchor=south east, above left=3pt of {group c1r1}.{south east}, inner sep=3pt, fill=white] (r_edge) {$r = 0.9992$};
% \node[anchor=south east, above left=3pt of {group c2r1}.{south east}, inner sep=3pt, fill=white] (r_path) {$r = 0.9989$};
% \node[anchor=south east, above left=3pt of {group c3r1}.{south east}, inner sep=3pt, fill=white] (r_markov) {$r = 0.9997$};

\end{tikzpicture}
\end{document}
