Browse Source

Minor formatting on doc examples

jrobinAV 1 năm trước cách đây
mục cha
commit
c3d4d0eb06

+ 3 - 3
doc/gui/examples/charts/error-bars-asymmetric.py

@@ -24,7 +24,7 @@ y = range(0, n_samples)
 
 data = {
     # The x series is made of random numbers between 1 and 10
-    "x": [random.uniform(1, 10) for i in y],
+    "x": [random.uniform(1, 10) for _ in y],
     "y": y,
 }
 
@@ -34,9 +34,9 @@ options = {
         # Allows for a 'plus' and a 'minus' error data
         "symmetric": False,
         # The 'plus' error data is a series of random numbers
-        "array": [random.uniform(0, 5) for i in y],
+        "array": [random.uniform(0, 5) for _ in y],
         # The 'minus' error data is a series of random numbers
-        "arrayminus": [random.uniform(0, 2) for i in y],
+        "arrayminus": [random.uniform(0, 2) for _ in y],
         # Color of the error bar
         "color": "red",
     }

+ 1 - 1
doc/gui/examples/charts/histogram-cumulative.py

@@ -18,7 +18,7 @@ import random
 from taipy.gui import Gui
 
 # Random data set
-data = [random.random() for i in range(500)]
+data = [random.random() for _ in range(500)]
 
 options = {
     # Enable the cumulative histogram

+ 1 - 1
doc/gui/examples/charts/histogram-horizontal.py

@@ -18,7 +18,7 @@ import random
 from taipy.gui import Gui
 
 # Random data set
-data = {"Count": [random.random() for i in range(100)]}
+data = {"Count": [random.random() for _ in range(100)]}
 
 page = """
 # Histograms - Horizontal

+ 1 - 1
doc/gui/examples/charts/histogram-normalized.py

@@ -18,7 +18,7 @@ import random
 from taipy.gui import Gui
 
 # Random data set
-data = [random.random() for i in range(100)]
+data = [random.random() for _ in range(100)]
 
 # Normalize to show bin probabilities
 options = {"histnorm": "probability"}

+ 1 - 1
doc/gui/examples/charts/histogram-overlay.py

@@ -18,7 +18,7 @@ import random
 from taipy.gui import Gui
 
 # Data set made of two series of random numbers
-data = [{"x": [random.random() + 1 for i in range(100)]}, {"x": [random.random() + 1.1 for i in range(100)]}]
+data = [{"x": [random.random() + 1 for _ in range(100)]}, {"x": [random.random() + 1.1 for _ in range(100)]}]
 
 options = [
     # First data set displayed as semi-transparent, green bars

+ 1 - 1
doc/gui/examples/charts/histogram-simple.py

@@ -18,7 +18,7 @@ import random
 from taipy import Gui
 
 # Random data set
-data = [random.gauss(0, 5) for i in range(1000)]
+data = [random.gauss(0, 5) for _ in range(1000)]
 
 page = """
 # Histogram - Simple

+ 1 - 1
doc/gui/examples/charts/histogram-stacked.py

@@ -18,7 +18,7 @@ import random
 from taipy.gui import Gui
 
 # Data set made of two series of random numbers
-data = {"A": [random.random() for i in range(200)], "B": [random.random() for i in range(200)]}
+data = {"A": [random.random() for _ in range(200)], "B": [random.random() for _ in range(200)]}
 
 # Names of the two traces
 names = ["A samples", "B samples"]