Skip to content
Snippets Groups Projects
Commit bc26942e authored by Jean-Marie  FAVREAU's avatar Jean-Marie FAVREAU
Browse files

Amélioration de l'affichage des nombres entiers en abscisse

parent 1fdd32b6
No related branches found
No related tags found
No related merge requests found
......@@ -265,13 +265,20 @@ class GenerateurExercice(GammeTemperee):
pas /= 2.
nbGraduations = int(self.duree / pas)
result = ""
for i in range(0, nbGraduations + 1):
h = i * pas
hinc = self.horodatageEnCm(h)
result += "\draw[black] (" + str(hinc) + ", -0.1) -- ";
result += "(" + str(hinc) + ", 0.)\n";
result += "(" + str(hinc) + ", -0.1) node[below]{" + '{0:.2f}'.format(h).replace(".", ",") + "};\n";
result += "(" + str(hinc) + ", -0.1) node[below]{"
if h.is_integer():
result += str(int(h))
else:
result += '{0:.2f}'.format(h).replace(".", ",")
result += "};\n";
return result
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment