You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
print("Setting the horizontal interval to '"+str(x_max-x_min) +"' pixels and the vertical interval to '"+str(y_max-y_min) +"' pixels.")
52
+
log("Setting the horizontal interval of the plotting window to '"+str(x_max-x_min) +"' pixels and the vertical interval to '"+str(y_max-y_min) +"' pixels.", "INFO", "TI Plotlib", "Window")
list: a list containing the followig data: [x_scale, y_scale, style]
70
87
"""
88
+
ifcerr.type_error(float, x_scale) ==False: log("Argument 'x_scale' has to be type float!", "ERROR", "TI Plotlib", "Grid")
89
+
ifcerr.type_error(float, y_scale) ==False: log("Argument 'y_scale' has to be type float!", "ERROR", "TI Plotlib", "Grid")
90
+
ifcerr.type_error(str, style) ==False: log("Argument 'style' has to be type string!", "ERROR", "TI Plotlib", "Grid")
71
91
err.type_error(float, "float", x_scale)
72
92
err.type_error(float, "float", y_scale)
73
93
err.type_error(str, "str", style)
74
94
95
+
ifcerr.argument_error(style, "solid", "dotted", "dashed") ==False: log("Argument 'style' can only be on of these: 'solid', 'dotted', 'dashed'!", "ERROR", "TI Plotlib", "Grid")
print("Setting the grid scale to '"+str(x_scale) +", "+str(y_scale) +"' with the style '"+style+"'")
99
+
log("Setting the grid scale to '"+str(x_scale) +" x' and '"+str(y_scale) +" y' with style '"+style+"'", "INFO", "TI Plotlib", "Grid")
78
100
return [x_scale, y_scale, style]
79
101
80
102
defaxes(mode:str):
@@ -87,10 +109,13 @@ def axes(mode:str):
87
109
Returns:
88
110
list: a list containing the following data: [mode]
89
111
"""
112
+
ifcerr.type_error(str, mode) ==False: log("Argument 'mode' has to be type string!", "ERROR", "TI Plotlib", "Axes")
90
113
err.type_error(str, "str", mode)
91
114
115
+
ifcerr.argument_error(mode, "off", "on", "axes", "window") ==False: log("Argument 'mode' can only be one of these: 'off', 'on', 'axes', 'window'!", "ERROR", "TI Plotlib", "Axes")
list: a list containing the following data: [x_name, y_name, x_row, y_row]
108
133
"""
134
+
ifcerr.type_error(str, x_name) ==False: log("Argument 'x_name' has to be type string!", "ERROR", "TI Plotlib", "Labels")
135
+
ifcerr.type_error(str, y_name) ==False: log("Argument 'y_name' has to be type string!", "ERROR", "TI Plotlib", "Labels")
136
+
ifcerr.type_error(int, x_row) ==False: log("Argument 'x_row' has to be type integer!", "ERROR", "TI Plotlib", "Labels")
137
+
ifcerr.type_error(int, y_row) ==False: log("Argument 'y_row' has to be type integer!", "ERROR", "TI Plotlib", "Labels")
109
138
err.type_error(str, "str", x_name)
110
139
err.type_error(str, "str", y_name)
111
140
err.type_error(int, "int", x_row)
112
141
err.type_error(int, "int", y_row)
113
142
114
143
print("Displaying '"+x_name+"' at row '"+str(x_row) +"' for the x axis. Displaying '"+y_name+"' at row '"+str(y_row) +"' for the y axis.")
144
+
log("Displaying '"+x_name+"' at row '"+str(x_row) +"' for the x axis. Displaying '"+y_name+"' at row '"+str(y_row) +"' for the y axis.", "INFO", "TI Plotlib", "Screen")
115
145
return[x_name, y_name, x_row, y_row]
116
146
117
147
deftitle(title:str):
@@ -124,8 +154,10 @@ def title(title:str):
124
154
Returns:
125
155
list: a list containing the following data: [title]
126
156
"""
157
+
ifcerr.type_error(str, title) ==False: log("Argument 'title' has to be type string!", "ERROR", "TI Plotlib", "Title")
127
158
err.type_error(str, "str", title)
128
159
160
+
log("Setting the title of the plotting window to '"+title+"'", "INFO", "TI Plotlib", "Title")
129
161
print("Setting the title of the window to '"+title+"'")
130
162
return [title]
131
163
@@ -136,6 +168,7 @@ def show_plot():
136
168
Returns:
137
169
None: None
138
170
"""
171
+
log("Displaying the buffered drawing output", "INFO", "TI Plotlib", "Show Plot")
139
172
print("Displaying buffered drawing output")
140
173
returnNone
141
174
@@ -146,6 +179,7 @@ def use_buffer():
146
179
Returns:
147
180
None: None
148
181
"""
182
+
log("Enabling the use of the offscreen buffer for faster plotting", "INFO", "TI Plotlib", "Use Buffer")
list: a list containing the following data: [x_list, y_list, mark]
186
230
"""
231
+
ifcerr.type_error(list, x_list) ==False: log("Argument 'x_list' has to be type list!", "ERROR", "TI Plotlib", "Scatter")
232
+
ifcerr.type_error(list, y_list) ==False: log("Argument 'y_list' has to be type list!", "ERROR", "TI Plotlib", "Scatter")
233
+
ifcerr.type_error(str, mark) ==False: log("Argument 'mark' has to be type string!", "ERROR", "TI Plotlib", "Scatter")
234
+
235
+
ifcerr.argument_error(mark, "o", "+", "x", ".") ==False: log("Argument 'mark' can only be one of these: 'o', '+', 'x', '.'!", "ERROR", "TI Plotlib", "Scatter")
236
+
187
237
err.type_error(list, "list", x_list)
188
238
err.type_error(list, "list", y_list)
189
239
err.type_error(str, "str", mark)
190
240
191
241
err.argument_error(mark, "o", "+", "x", ".")
192
242
243
+
log("Scattering mark '"+mark+"' at the values from the given lists", "INFO", "TI Plotlib", "Scatter")
193
244
print("Scattering mark '"+mark+"' in between the given lists")
194
245
return [x_list, y_list, mark]
195
246
196
247
197
248
defplot(x_list:list, y_list:list, mark:str):
198
249
"""
199
-
Plots a line using ordered pairs from specified x-list and y-list.
250
+
Plots a line using ordered pairs from specified x-list and y-list. To use just one value, put this one value in a list.
200
251
201
252
202
253
Args:
203
254
x_list (list): The list of the possible x values.
204
255
y_list (list): The list of the possible y values.
205
-
mark (str): The mark to scatter. Possible Options: 'o', '+', 'x', '.'.
256
+
mark (str): The mark to plot. Possible Options: 'o', '+', 'x', '.'.
206
257
207
258
Returns:
208
259
list: a list containing the following data: [x_list, y_list, mark]
209
260
"""
261
+
ifcerr.type_error(list, x_list) ==False: log("Argument 'x_list' has to be type list!", "ERROR", "TI Plotlib", "Plot")
262
+
ifcerr.type_error(list, y_list) ==False: log("Argument 'y_list' has to be type list!", "ERROR", "TI Plotlib", "Plot")
263
+
ifcerr.type_error(str, mark) ==False: log("Argument 'mark' has to be type string!", "ERROR", "TI Plotlib", "Plot")
264
+
265
+
ifcerr.argument_error(mark, "o", "+", "x", ".") ==False: log("Argument 'mark' can only be one of these: 'o', '+', 'x', '.'!", "ERROR", "TI Plotlib", "Plot")
266
+
210
267
err.type_error(list, "list", x_list)
211
268
err.type_error(list, "list", y_list)
212
269
err.type_error(str, "str", mark)
213
270
214
271
err.argument_error(mark, "o", "+", "x", ".")
215
272
273
+
log("Plotting a line with the mark '"+mark+"' in between the range of the specifed lists", "INFO", "TI Plotlib", "Plot")
216
274
print("Plotting line with mark '"+mark+"' in between the given lists")
list: a list containing the following data: [x1, y1, x2, y2, mode]
232
290
"""
291
+
ifcerr.type_error(float, x1) ==False: log("Argument 'x1' has to be type float!", "ERROR", "TI Plotlib", "Line")
292
+
ifcerr.type_error(float, y1) ==False: log("Argument 'y1' has to be type float!", "ERROR", "TI Plotlib", "Line")
293
+
ifcerr.type_error(float, x2) ==False: log("Argument 'x2' has to be type float!", "ERROR", "TI Plotlib", "Line")
294
+
ifcerr.type_error(float, y2) ==False: log("Argument 'y2' has to be type float!", "ERROR", "TI Plotlib", "Line")
295
+
ifcerr.type_error(str, mode) ==False: log("Argument 'mode' has to be type string!", "ERROR", "TI Plotlib", "Line")
296
+
297
+
298
+
ifcerr.argument_error(mode, "default", "arrow") ==False: log("Argument 'mode' can only be one of these: 'default', 'arrow'!", "ERROR", "TI Plotlib", "Line")
299
+
300
+
233
301
err.type_error(float, "float", x1)
234
302
err.type_error(float, "float", y1)
235
303
err.type_error(float, "float", x2)
236
304
err.type_error(float, "float", y2)
237
305
err.type_error(str, "str", mode)
238
306
239
-
err.relation.smaller_error(x1, x2)
240
-
err.relation.smaller_error(y1, y2)
241
307
242
308
err.argument_error(mode, "default", "arrow")
243
309
310
+
log("Drawing a line of type '"+mode+"' from '("+str(x1) +"|"+str(y1) +")' to '("+str(x2) +"|"+str(y2) +")'", "INFO", "TI Plotlib", "Line")
244
311
print("Drawing line of type '"+mode+"' from '("+str(x1) +"|"+str(y1) +")' to '("+str(x2) +"|"+str(y2) +")'")
list: a list containing the following data: [x_list, y_list, display]
259
326
"""
327
+
ifcerr.type_error(list, x_list) ==False: log("Argument 'x_list' has to be type list!", "ERROR", "TI Plotlib", "Linear Regression")
328
+
ifcerr.type_error(list, y_list) ==False: log("Argument 'y_list' has to be type list!", "ERROR", "TI Plotlib", "Linear Regression")
329
+
ifcerr.type_error(str, display) ==False: log("Argument 'dsiplay' has to be type string!", "ERROR", "TI Plotlib", "Linear Regression ")
330
+
331
+
ifcerr.argument_error(display, "left", "center", "right") ==False: log("Argument 'display' can only be one of these: 'left', 'center', 'right'!", "ERROR", "TI Plotlib", "Linear Regression")
list: list: a list containing the following data: [thickness, style]
279
354
"""
355
+
ifcerr.type_error(str, thickness) ==False: log("Argument 'thickness' has to be type string!", "ERROR", "TI Plotlib", "Pen")
356
+
ifcerr.type_error(str, style) ==False: log("Argument 'style' has to be type string!", "ERROR", "TI Plotlib", "Pen")
357
+
358
+
ifcerr.argument_error(thickness, "thin", "medium", "thick") ==False: log("Argument 'thickness' can only be one of these: 'thin', 'medium', 'thick'!", "ERROR", "TI Plotlib", "Pen")
359
+
ifcerr.argument_error(style, "solid", "dotted", "dashed") ==False: log("Argument 'style' can only be one of these: 'solid', 'dotted', 'dashed'!", "ERROR", "TI Plotlib", "Pen")
list: list: list: a list containing the following data: [line, text, align]
300
383
"""
384
+
385
+
ifcerr.type_error(int, line) ==False: log("Argument 'line' has to be type integer!", "ERROR", "TI Plotlib", "Text At")
386
+
ifcerr.type_error(str, text) ==False: log("Argument 'text' has to be type string!", "ERROR", "TI Plotlib", "Text At")
387
+
ifcerr.type_error(str, align) ==False: log("Argument 'align' has to be type string!", "ERROR", "TI Plotlib", "Text At")
388
+
ifcerr.argument_error(align, "left", "center", "right") ==False: log("Argument 'align' can only be one of these: 'left', 'center', 'right'!", "ERROR", "TI Plotlib", "Text At")
389
+
ifcerr.range_error(1, 13, line) ==False: log("Argument 'line' has to be between the values 1 and 13 (included)!", "ERROR", "TI Plotlib", "Text At")
0 commit comments