From 7ff201ac631d4185a69b7ec144a09eb0f7672495 Mon Sep 17 00:00:00 2001 From: Sietze van Buuren Date: Sat, 9 Nov 2024 11:06:56 +0100 Subject: [PATCH] style: improve readability of full plot example Signed-off-by: Sietze van Buuren --- examples/full.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/examples/full.py b/examples/full.py index a71be90..5ef3e1d 100644 --- a/examples/full.py +++ b/examples/full.py @@ -24,12 +24,20 @@ def main(): axis.grid = True axis.xlabel = 'x' axis.ylabel = 'y' - axis.xticks = ((0.0, '0'), - (np.pi/2.0, 'π/2'), - (np.pi, 'π'), - (1.5*np.pi, '3π/2'), - (2.0*np.pi, '2π'),) - axis.add_legend('y=cos(x)', 'y=sin(x)', 'y=sin(x+π)', 'y=cos(x+π)', 'y=cos(x)/2') + axis.xticks = ( + (0.0, '0'), + (np.pi/2.0, 'π/2'), + (np.pi, 'π'), + (1.5*np.pi, '3π/2'), + (2.0*np.pi, '2π'), + ) + axis.add_legend( + 'y=cos(x)', + 'y=sin(x)', + 'y=sin(x+π)', + 'y=cos(x+π)', + 'y=cos(x)/2', + ) if __name__ == '__main__':