From 9d53d8196ecb182ad6c2338c7afa84fc41071574 Mon Sep 17 00:00:00 2001 From: Paul Garlick Date: Thu, 10 Feb 2022 16:30:06 +0000 Subject: boundary_profile.py: Specify line colour for each boundary. * fullswof-utils/boundary_profile.py: Add lineColour variable. --- fullswof-utils/boundary_profile.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'fullswof-utils/boundary_profile.py') diff --git a/fullswof-utils/boundary_profile.py b/fullswof-utils/boundary_profile.py index 091db8a..22bde1d 100755 --- a/fullswof-utils/boundary_profile.py +++ b/fullswof-utils/boundary_profile.py @@ -14,17 +14,21 @@ args = parser.parse_args() if args.location == 'top': inputFilename = "top_boundary.txt" + lineColour = "tab:blue" elif args.location == 'bottom': inputFilename = "bottom_boundary.txt" + lineColour = "tab:green" elif args.location == 'left': inputFilename = "left_boundary.txt" + lineColour = "tab:red" elif args.location == 'right': inputFilename = "right_boundary.txt" + lineColour = "tab:orange" def detach_display(): x, y, z = np.loadtxt(inputFilename, delimiter=' ', unpack=True) fig, ax = plt.subplots() - plt.plot(x,z, label='elevation') + plt.plot(x,z, color=lineColour, label='elevation') plt.xlabel('x / m') plt.ylabel('z / m') ax.yaxis.set_minor_locator(MultipleLocator(0.2)) -- cgit