From 4612dd5a6efe6863a01286fa1a467785b21017f4 Mon Sep 17 00:00:00 2001 From: Eggert Jung Date: Thu, 16 Feb 2023 19:32:10 +0100 Subject: [PATCH] uncommited work --- liveview.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/liveview.py b/liveview.py index 3aa9209..fcaf5eb 100644 --- a/liveview.py +++ b/liveview.py @@ -12,7 +12,7 @@ class ResistanceView: self.fig.canvas.flush_events() class VectorView: - def __init__(self, vectormap): + def __init__(self, vectormap, title=""): # Vector origin location X = np.repeat(range(9), 10) Y = np.resize(range(10), 10*9) @@ -23,10 +23,10 @@ class VectorView: # Creating plot pyplot.quiver(X, Y, U, V, color='b', units='xy', scale=1) - pyplot.title('Single Vector') + pyplot.title(title) ## x-lim and y-lim - pyplot.xlim(-1, 10) + pyplot.xlim(-1, 9) pyplot.ylim(-2, 11) # Show plot with grid