Plot.plot({
grid: false,
marginRight: 60,
x: {domain: [-272/2-10,272/2+10]},
y: {domain: [-152/2-50,152/2+50]},
facet: {label: null},
axis: null,
facet: {
data: csv,
x: d => d.num_point % num_facette,
y: d => Math.floor(d.num_point / num_facette)
},
marks: [
Plot.frame(),
Plot.line(coor_table_moins_2, {y: "distance_x", x: "distance_y",stroke: "grey", strokeWidth: epaiseur_trait}),
Plot.areaY(filet_noir1, Plot.windowY({
y: "distance_x",
x1: "distance_y1",
x2: "distance_y2",
fill: "grey",
k: 14
})),
Plot.areaY(filet_noir2, Plot.windowY({
y: "distance_x",
x1: "distance_y1",
x2: "distance_y2",
fill: "grey",
k: 14
})),
Plot.line(filet_blanc, {y: "distance_x", x: "distance_y",stroke: "grey", strokeWidth: epaiseur_trait}),
Plot.line(ligne_v_un_tier, {y: "distance_x", x: "distance_y",stroke: "grey", strokeWidth: epaiseur_trait-1}),
Plot.line(ligne_v_deux_tier, {y: "distance_x", x: "distance_y",stroke: "grey", strokeWidth: epaiseur_trait-1}),
Plot.line(ligne_h_un_tier_haut, {y: "distance_x", x: "distance_y",stroke: "grey", strokeWidth: epaiseur_trait-1}),
Plot.line(ligne_h_un_tier_bas, {y: "distance_x", x: "distance_y",stroke: "grey", strokeWidth: epaiseur_trait-1}),
Plot.line(ligne_h_deux_tier_haut, {y: "distance_x", x: "distance_y",stroke: "grey", strokeWidth: epaiseur_trait-1}),
Plot.line(ligne_h_deux_tier_bas, {y: "distance_x", x: "distance_y",stroke: "grey", strokeWidth: epaiseur_trait-1}),
Plot.line(liste_element_num_point_coor.filter(d => d.body.includes("service") || d.body.includes("D1") || d.body.includes("D2") || d.body.includes("D3") || d.body.includes("M1") || d.body.includes("M2") || d.body.includes("M3") || d.body.includes("G1") || d.body.includes("G2") || d.body.includes("G3")), {
y: "coor_balle_x",
x: "coor_balle_y",
stroke: "black"
}),
Plot.dot(liste_element_num_point_coor.filter(d => d.body.includes("service") || d.body.includes("D1") || d.body.includes("D2") || d.body.includes("D3") || d.body.includes("M1") || d.body.includes("M2") || d.body.includes("M3") || d.body.includes("G1") || d.body.includes("G2") || d.body.includes("G3")), {
y: "coor_balle_x",
x: "coor_balle_y",
fill: "author",
r:10
}),
Plot.text("num_point", {
y: d => -100,
x: d => 0,
text: ["Point "+((clientMessages_joueur.length == 0)?0:clientMessages_joueur[clientMessages_joueur.length-1].num_point)],
textAnchor: "middle",
fontSize :20,
dx: 0
}),
Plot.text(positions_zones, {
y: "x",
x: "y",
text: "zone",
textAnchor: "middle",
fontSize :50,
dx: 0,
fill: "grey",
opacity: 0.3
}),
Plot.text(liste_element_num_point_coor_pour_coup, {
y: "coor_balle_x",
x: "coor_balle_y",
text: d => (d.body == 'coup_droit')?"C":"R",
textAnchor: "middle",
fontSize :15,
dx: 0,
fill: 'white'
}),
]
})