diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plotter.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plotter.py b/src/plotter.py index d19d344..c803f3f 100644 --- a/src/plotter.py +++ b/src/plotter.py @@ -22,7 +22,6 @@ class Plotter: def plot(self, model, normalize=True, density=False, save_path=''): self.clear() - self.patch = axes.add_patch(Rectangle((0, 0), *reversed(model.bfs_size), color='gray')) axes.set_title('Velocity field (normalized)') plt.suptitle(f'Avg mass source per grid point = {model.avg_error()}') plt.xlabel('X') @@ -41,14 +40,14 @@ class Plotter: density = density or int((max(model.domain_size) / model.step) / 40) + plt.contourf(x, y, model.p) + # self.patch = axes.add_patch(Rectangle((0, 0), *reversed(model.bfs_size), color='gray')) + # TODO: allow using streamplot self.plt = plt.quiver( x[::density, ::density], y[::density, ::density], u[::density, ::density], v[::density, ::density], - model.p[::density, ::density], - scale=30, - cmap='inferno' ) self.colorbar = plt.colorbar(label='Pressure') |