--- title: Plotting keywords: fastai sidebar: home_sidebar summary: "Plotting classes." description: "Plotting classes." nb_path: "nbs/09_plotting.ipynb" ---
%load_ext autoreload
%autoreload 2
window = 20
plotter = SubPlotter(12, 4, "MyData", [["Data0", "time", "y", 2, window, 121, ['line1','line2']],
["Data1", "time", "y", 2, window, 122, ['line1','line2']]])
for x in range(10):
y11 = random()-0.5
y12 = random()-0.5
plotter.add_data(0, x, [y11, y12])
y21 = random()-0.5
y22 = random()-0.5
plotter.add_data(1, x, [y21, y22])
plotter.draw()
window = 20
plotter = SubPlotter(12, 8, "MyData", [["Data0", "time", "y", 2, window, 211, ['line1','line2']],
["Data1", "time", "y", 2, window, 212, ['line1','line2']]])
for x in range(10):
y11 = random()-0.5
y12 = random()-0.5
plotter.add_data(0, x, [y11, y12])
y21 = random()-0.5
y22 = random()-0.5
plotter.add_data(1, x, [y21, y22])
plotter.draw()
window = 20
plotter = SubPlotter(12, 8, "MyData", [["Data0", "time", "y", 2, window, 221, ['line1','line2']],
["Data1", "time", "y", 2, window, 222, ['line1','line2']],
["Data2", "time", "y", 2, window, 212, ['line1','line2']]])
for x in range(10):
y11 = random()-0.5
y12 = random()-0.5
plotter.add_data(0, x, [y11, y12])
y21 = random()-0.5
y22 = random()-0.5
plotter.add_data(1, x, [y21, y22])
y21 = random()-0.5
y22 = random()-0.5
plotter.add_data(2, x, [y21, y22])
plotter.draw()