<commit_before><?php

// Dataset definition
$president = false;
$DataSet = new xsPData();
$DataSet->AddPoint($labels, "Serie1");
$DataSet->AddPoint($n_presences_hemicycle, "Serie2");
if ($president == true) {
  $DataSet->SetSerieName("Présidences", "Serie2");
} else $DataSet->SetSerieName("Invectives", "Serie2");
$DataSet->AddPoint($n_participations_hemicycle, "Serie3");
$DataSet->SetSerieName("Participations", "Serie3");
$DataSet->AddPoint($n_mots_hemicycle, "Serie4");
$DataSet->SetSerieName("10 000 mots", "Serie4");
$DataSet->AddSerie("Serie2");
$DataSet->AddSerie("Serie3");
$DataSet->AddSerie("Serie4");
$DataSet->SetAbsciseLabelSerie("Serie1");
$DataSet->SetYAxisName("Total par semaine");
$Data = $DataSet->GetData();
$DataDescr = $DataSet->GetDataDescription();
$DataSet2 = new xsPData();
$DataSet2->AddPoint($labels, "Serie1");
$DataSet2->AddPoint($vacances, "Serie5");
$DataSet2->SetSerieName("mots par 10 000", "Serie5");
$DataSet2->AddSerie("Serie5");
$DataSet2->SetAbsciseLabelSerie("Serie1");
$Data2 = $DataSet2->GetData();
$DataDescr2 = $DataSet2->GetDataDescription();

$Test = new xsPChart(700,230);
$Test = new xsPChart(800,300);
$Test->setGraphArea(70,40,765,280);
$Test->drawFilledRoundedRectangle(7,7,793,293,5,240,240,240);
$Test->drawRoundedRectangle(5,5,795,395,5,230,230,230);
$Test->drawGraphArea(15,15,15,FALSE);
$Test->setFixedScale(0,14,15);
$Test->xsSetFontProperties("tahoma.ttf",13);
$Test->drawScale($Data,$DataDescr,SCALE_NORMAL,50,50,50,TRUE,0,0,TRUE,1,TRUE);
$Test->drawGrid(0,TRUE,0,0,0,3);
$Test->drawTreshold(0.8,255,0,0,FALSE,FALSE,8);
$Test->drawTreshold(4,255,255,0,FALSE,FALSE,8);
$Test->setColorPalette(0,250,250,250);
$Test->drawOverlayBarGraph($Data2,$DataDescr2,30);
if ($president == true) {
  $Test->setColorPalette(0,0,255,0);
} else $Test->setColorPalette(0,255,255,0);
$Test->setColorPalette(1,255,0,0);
$Test->setColorPalette(2,0,0,255);
$Test->xsSetFontProperties("tahoma.ttf",12);
$Test->drawLegend(105,65,$DataDescr,255,255,255);
$Test->drawFilledLineGraph($Data,$DataDescr,80);
$Test->setColorPalette(0,100,100,100);
$Test->setColorPalette(1,100,100,100);
$Test->setColorPalette(2,100,100,100);
$Test->drawLineGraph($Data,$DataDescr);
$Test->drawPlotGraph($Data,$DataDescr,1,1,128,128,128);
$Test->xsSetFontProperties("tahoma.ttf",16);
$Test->drawTitle(270,30,"Assiduité en hémicycle au cours de l'année passée",50,50,50,585);
$Test->xsRender('presence-hemicycle-annee-'.$parlementaire->slug.'.png');

echo image_tag('tmp/xspchart/presence-hemicycle-annee-'.$parlementaire->slug.'.png', 'alt="Assiduité en hémicycle de '.$parlementaire->nom.'"');
/*
// Dataset definition
$DataSet = new xsPData();
$DataSet->AddPoint($n_presences_hemicycle,"Présences");
$DataSet->AddPoint($n_participations_hemicycle,"Participations");
$DataSet->AddPoint($n_mots_hemicycle,"Milliers de mots");
$DataSet->AddPoint($n_vacances,"Vacances");<commit_msg>tests sur le plot<commit_after><?php
for ($i = 0; $i < count($n_presences_hemicycle); $i ++) if ($n_presences_hemicycle[$i] != 0) $n_presences_hemicycle[$i] += .1;
// Dataset definition
$president = false;
$DataSet = new xsPData();
$DataSet->AddPoint($labels, "Serie1");
$DataSet->AddPoint($n_presences_hemicycle, "Serie2");
$DataSet->SetSerieName("Présences", "Serie2");
$DataSet->AddPoint($n_participations_hemicycle, "Serie3");
$DataSet->SetSerieName("Participations", "Serie3");
$DataSet->AddPoint($n_mots_hemicycle, "Serie4");
$DataSet->SetSerieName("10 000 mots", "Serie4");
$DataSet->AddSerie("Serie2");
$DataSet->AddSerie("Serie3");
$DataSet->AddSerie("Serie4");
$DataSet->SetAbsciseLabelSerie("Serie1");
$DataSet->SetYAxisName("Total par semaine");
$Data = $DataSet->GetData();
$DataDescr = $DataSet->GetDataDescription();
$DataSet2 = new xsPData();
$DataSet2->AddPoint($labels, "Serie1");
$DataSet2->AddPoint($vacances, "Serie5");
$DataSet2->SetSerieName("mots par 10 000", "Serie5");
$DataSet2->AddSerie("Serie5");
$DataSet2->SetAbsciseLabelSerie("Serie1");
$Data2 = $DataSet2->GetData();
$DataDescr2 = $DataSet2->GetDataDescription();

$Test = new xsPChart(700,230);
$Test = new xsPChart(800,300);
$Test->setGraphArea(70,40,780,265);
$Test->drawFilledRoundedRectangle(7,7,793,293,5,240,240,240);
$Test->drawRoundedRectangle(5,5,795,395,5,230,230,230);
$Test->drawGraphArea(230,230,230,FALSE);
$Test->setFixedScale(0,13,13);
$Test->xsSetFontProperties("tahoma.ttf",13);
$Test->drawScale($Data,$DataDescr,SCALE_NORMAL,50,50,50,TRUE,0,0,TRUE,1,TRUE);
$Test->drawGrid(0,TRUE,0,0,0,100);
$Test->drawTreshold(0.8,255,0,0,FALSE,FALSE,8);
$Test->drawTreshold(4,255,255,0,FALSE,FALSE,8);
$Test->setColorPalette(0,50,50,50);
$Test->drawOverlayBarGraph($Data2,$DataDescr2,30);
if ($president == true) {
  $Test->setColorPalette(0,255,255,0);
} else $Test->setColorPalette(0,255,0,0);
$Test->setColorPalette(1,255,255,0);
$Test->setColorPalette(2,0,0,255);
$Test->xsSetFontProperties("tahoma.ttf",12);
$Test->drawLegend(105,65,$DataDescr,255,255,255);
$Test->drawFilledLineGraph($Data,$DataDescr,80);
//$Test->drawOverlayBarGraph($Data,$DataDescr,75);
$Test->setColorPalette(0,150,150,150);
$Test->setColorPalette(1,150,150,150);
$Test->setColorPalette(2,150,150,150);
$Test->drawLineGraph($Data,$DataDescr);
$Test->drawPlotGraph($Data,$DataDescr,1,1,128,128,128);
$Test->xsSetFontProperties("tahoma.ttf",16);
$Test->drawTitle(270,30,"Assiduité en hémicycle au cours de l'année passée",50,50,50,585);
$Test->xsRender('presence-hemicycle-annee-'.$parlementaire->slug.'.png');

echo image_tag('tmp/xspchart/presence-hemicycle-annee-'.$parlementaire->slug.'.png', 'alt="Assiduité en hémicycle de '.$parlementaire->nom.'"');
/*
// Dataset definition
$DataSet = new xsPData();
$DataSet->AddPoint($n_presences_hemicycle,"Présences");
$DataSet->AddPoint($n_participations_hemicycle,"Participations");
$DataSet->AddPoint($n_mots_hemicycle,"Milliers de mots");
$DataSet->AddPoint($n_vacances,"Vacances");
{'fraction_non_alphanumeric': 0.2169779286926995, 'fraction_numerical': 0.08760611205432937, 'mean_word_length': 11.641630901287554, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 115, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '680268', 'n_tokens_mistral': 2593, 'n_tokens_neox': 2395, 'n_words': 250}