% create a plot with the vowel space
N = 500;
sz=3;

%colors = ["#0072BD", "#4DBEEE", "#D95319", "#EDB120", "#7E2F8E", "#77AC30"];
%colors = [ "#0072BD","#EDB120", "#7E2F8E", "#77AC30", "#0072BD", "#4DBEEE"];
colors = ["#0072BD", "#4DBEEE", "#D95319", "#EDB120", "#7E2F8E", "#77AC30"];
colororder(colors)

% lang2_sound.vowels =    ["a",   "o",    "ɐ",    "ɨ",   "ə",  "ɪ̈", "NONE"]
vowels_to_draw = 1:6;
v = lang2_sound.vowels(vowels_to_draw);

for vowel_index = vowels_to_draw
    V = zeros(N,2);
    for i=1:N
        [f1, f2] = vowel.sample_with_std( ...
            lang2_sound.f1_erbs(vowel_index), lang2_sound.f2_erbs(vowel_index), ...
            lang2_sound.f1_std(vowel_index), lang2_sound.f2_std(vowel_index));
        V(i, :) = [f1, f2];
    end
    scatter(V(:,2),V(:,1), sz, 'MarkerEdgeAlpha',1, 'LineWidth',0.001);
    hold on
end

legend(v, 'Location', 'southeast', 'Fontname', 'Times', 'Interpreter','tex')
xlabel('F2 (erb)')
ylabel('F1 (erb)')

set(gca, 'Fontname', 'Georgia')
set(gca, 'XDir', 'reverse')
set(gca, 'YDir', 'reverse')
set(gca, 'XGrid', 'on')
set(gca, 'YGrid', 'on')
set(gca, 'XMinorGrid', 'on')
set(gca, 'YMinorGrid', 'on')
set(gca, 'XAxisLocation', 'top')
set(gca, 'YAxisLocation', 'right')


