Skip to content

Commit de96b34

Browse files
committed
fix: typo
1 parent 5e46734 commit de96b34

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

examples/plot_interest_radar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"Dimension",
4343
"Computer virus",
4444
],
45-
visualize_variance=False,
45+
visualise_variance=False,
4646
)
4747

4848
# you can also use plotter.show() here

truelearn/tests/test_utils_visualisations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def test_top_n(self, resources):
473473

474474
def test_no_variance(self, resources):
475475
plotter = visualisations.RadarPlotter()
476-
plotter.plot(resources[0], visualize_variance=False)
476+
plotter.plot(resources[0], visualise_variance=False)
477477
return plotter
478478

479479

truelearn/utils/visualisations/_bar_plotter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def plot(
4949
topics: Optional[Iterable[str]] = None,
5050
top_n: Optional[int] = None,
5151
history: bool = False,
52-
visualize_variance: bool = True,
52+
visualise_variance: bool = True,
5353
) -> Self:
5454
"""Plot the graph based on the given data.
5555
@@ -70,7 +70,7 @@ def plot(
7070
Whether to utilize history information in the visualisation.
7171
If this is set to True, an attribute called history must be
7272
present in all knowledge components.
73-
visualize_variance:
73+
visualise_variance:
7474
Whether to visualise variance.
7575
"""
7676
content_dict, _ = self._standardise_data(content, history, topics)
@@ -110,7 +110,7 @@ def plot(
110110
"color": "black",
111111
"thickness": 4,
112112
"width": 3,
113-
"visible": visualize_variance,
113+
"visible": visualise_variance,
114114
},
115115
customdata=np.transpose(
116116
[variances, number_of_videos, last_video_watched] # type: ignore

truelearn/utils/visualisations/_dot_plotter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def plot(
4949
topics: Optional[Iterable[str]] = None,
5050
top_n: Optional[int] = None,
5151
history: bool = False,
52-
visualize_variance: bool = True,
52+
visualise_variance: bool = True,
5353
) -> Self:
5454
"""Plot the graph based on the given data.
5555
@@ -70,7 +70,7 @@ def plot(
7070
Whether to utilize history information in the visualisation.
7171
If this is set to True, an attribute called history must be
7272
present in all knowledge components.
73-
visualize_variance:
73+
visualise_variance:
7474
Whether to visualise variance.
7575
"""
7676
content_dict, _ = self._standardise_data(content, history, topics)
@@ -110,7 +110,7 @@ def plot(
110110
"color": "black",
111111
"thickness": 4,
112112
"width": 3,
113-
"visible": visualize_variance,
113+
"visible": visualise_variance,
114114
},
115115
customdata=np.transpose(
116116
[variances, number_of_videos, last_video_watched] # type: ignore

truelearn/utils/visualisations/_line_plotter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def plot(
8282
content: Union[List[Knowledge], Knowledge],
8383
topics: Optional[Iterable[str]] = None,
8484
top_n: Optional[int] = None,
85-
visualize_variance: bool = False,
85+
visualise_variance: bool = False,
8686
) -> Self:
8787
"""Plot the graph based on the given data.
8888
@@ -100,7 +100,7 @@ def plot(
100100
top_n:
101101
The number of topics to visualise. E.g. if top_n is 5, then the
102102
top 5 topics ranked by mean will be visualised.
103-
visualize_variance:
103+
visualise_variance:
104104
Whether to visualise variance.
105105
"""
106106
if isinstance(content, list):
@@ -111,7 +111,7 @@ def plot(
111111
if not content_dict:
112112
return self
113113

114-
traces = [self._trace(tr_data, visualize_variance) for tr_data in content_dict]
114+
traces = [self._trace(tr_data, visualise_variance) for tr_data in content_dict]
115115

116116
self.figure.add_traces(traces)
117117

truelearn/utils/visualisations/_radar_plotter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def plot(
3333
content: Knowledge,
3434
topics: Optional[Iterable[str]] = None,
3535
top_n: Optional[int] = None,
36-
visualize_variance: bool = True,
36+
visualise_variance: bool = True,
3737
) -> Self:
3838
"""Plot the graph based on the given data.
3939
@@ -50,7 +50,7 @@ def plot(
5050
top_n:
5151
The number of topics to visualise. E.g. if top_n is 5, then the
5252
top 5 topics ranked by mean will be visualised.
53-
visualize_variance:
53+
visualise_variance:
5454
Whether to visualise variance.
5555
"""
5656
content_dict, _ = self._standardise_data(content, False, topics)
@@ -72,7 +72,7 @@ def plot(
7272
self._trace(means, titles, "Means"),
7373
)
7474

75-
if visualize_variance:
75+
if visualise_variance:
7676
self.figure.add_trace(self._trace(variances, titles, "Variances"))
7777

7878
self.figure.update_layout(

0 commit comments

Comments
 (0)